Command-Line Interface Beginning Commands

CommandMeans/Stems FromPurposeSyntaxExample
cdchange directorymove from dir to dircd DIRcd /home/melissa
lslistlist the contents of a directoryls DIR (if no DIR is given, assumes current directory)ls /usr/local/src
mvmovemove something to somewhere else, rename somethingmv FROM TOmv john.txt mary.txt
mv /home/melissa/john.txt /home/sarah/john.txt
catconcatenatethe intended purpose is to concatenate two files together, but I usually just use it to display short filescat FILEcat jilly.txt
less display, and be able to navigate through and search, a file; hit q to quit; hit / and then type something and hit enter to searchless FILEless missy.txt
grep search for something in file(s)grep QUERY FILE(S)grep "ugly man" *.txt
grep -rI 'frogger' . (searches recursively for 'frogger' in all files and directories starting at the current one)
manmanualdisplay a manual for a given command; hit q to quit; acts like lessman COMMANDman less
rmremovedelete somethingrm FILE_OR_DIRrm pinky.jpg
rm -r directory/
which determine where a program is located, if you even have itwhich COMMANDwhich mozilla-firefox
whoami display which user you arewhoamiwhoami
chmodchange modechange permissions on a file/dirchmod PERMISSION FILE_OR_DIRchmod 755 jim.sh
locate locate instances of a word on your system; good for finding config files, executables, etc.locate FILElocate firefox