It is a program that runs in a terminal and renders the output of the commands that you type in. Shell often stands for REPL which means Read Evaluate Print and Loop.1

Commons shells

  • zsh (mac)
  • bash (linux)
  • powershell (windows)

Commands

echo "text" - print
$ - variable
history - shows you a history of all commands that you’ve used
pwd - print working directory
cat - used to view the content of a file
head -n 10 file.txt - allows you to print only 10 lines of text
tail -n n file.txt - allows you to print n lines of text from the back
less {path} - allows you to see a file line by line.
mv {file} {file} - moves a file from one place to another or renames file
rm - Removes a file
cp - Copies file
grep {word as string} {path} - Allows you to search for all phrases in a text file
grep -r {word} {path} - Allows you to search recursively for a word in a path
find {directory} -name {filename} - Allows you to find a file by name
sudo - stands for superuser do and allows you to get superuser privileges
ls -l prints out all files and directories with permissions
ls -a prints out all files, even hidden ones

Footnotes

  1. Terminal Course