Shell Commands Every Developer Must Know

Improve your productivity with these basic terminal commands

Image for post
Image for post
Image ©2020 by author

pwd — return working directory name

$ pwd
/Users/erik

ls — List directory contents

$ ls
AndroidStudioProjects VirtualBox VMs
Applications Desktop
Documents flutter
Downloads...
$ ls -lhatotal: 32drwxr-xr-x+ 85 erik staff 2.7K May 27 11:11 .
drwxr-xr-x 6 root admin 193B Sep 29 2019 ..
-rw-r--r-- 1 erik staff 2.1K Apr 15 11:06 .gitignore
-rw-r--r-- 1 erik staff 25M May 26 15:44 image.zip
...

cd — Change directory

cp — Copy

mv — Move

mkdir — Make directories

rmdir — Remove directories

rm

cat, less, tail, head — View the contents

control+r — Find your previous command

Further reading

Written by

Software developer by day, writer at night. Author of python3.guide, where you can start learning Python today

Get the Medium app