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. Webmaster at https://python.land

Sign up for Tech Explained

By Programming with Erik

Short, low-volume newsletter to keep you up-to-date on my latest articles Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store