WeCodeAcademy

Bash Command Reference

Commands of the practice terminal: files, text tools, pipes and redirection. Examples run in the simulated terminal.

29 of 29
CommandGroupDescription
pwdNavigationPrints the current folder.
lsNavigationLists files and folders.
ls -lNavigationLists with details: type and size.
cdNavigationChanges folder.
cd ..NavigationGoes up one folder.
mkdirFilesCreates a folder.
touchFilesCreates an empty file.
cpFilesCopies a file.
cp -rFilesCopies a folder and its contents.
mvFilesMoves or renames.
rmFilesDeletes a file (no recycle bin).
rm -rFilesDeletes a folder and its contents.
catReadingPrints a file.
echoReadingPrints text.
headReadingPrints the first lines.
tailReadingPrints the last lines.
wcReadingCounts lines, words or characters.
grepSearchingPrints lines that match a pattern.
grep -iSearchingIgnores letter case.
grep -cSearchingCounts matching lines.
grep -vSearchingPrints lines that do not match.
findSearchingSearches for files.
sortTextSorts lines.
uniqTextRemoves repeated neighbouring lines.
| (pipe)PipesSends one command's output into the next.
>RedirectionWrites output to a file, replacing it.
>>RedirectionAppends output to a file.
clearOtherClears the screen.
helpOtherLists the commands of the practice terminal.