If you want to get into Software Development, one thing you should know is how to use Terminal?
Yes, it could be Mac's Terminal, Linux's Terminal, or Windows terminal(not exactly, but run Git Shell or Cmder on Windows).
Don't worry I have your back here, just follow this article, and trust me, you'll thank me later for reading this post.
First of all, lets understand what is terminal?
Terminal is a program on your Operating system which lets you navigate throughout your computer’s folders and files, most importantly runs commands to help you perform your task.
First and foremost, we need to open Terminal, it could be different depending on your OS, and here I trust you, you can open Terminal.
Okay, need help, please follow the below steps depending on you OS:
And stay away from
rm, but here I'll teach you how to master that command and use only when really needed.
cd command, stands for "Change Directory". There are multiple ways you could use
cd commands. Here are those:
cd ~: Will take us to the Home directory.
cd ..: Will move us back to the parent folder.
cd ../test: Will move us back and take us to
cd <folder name>: Will take us to the
ls command is the list command, it shows what's present in a folder/directory. Again,
ls could be used in many ways. Here are few which you might want to use:
ls: it will show us everything in that folder.
ls -a: it will show the hidden files along with the other listed previously.
ls -l: it will display in a long listing format
Or you can use Keyboard shortcut for this,
Ctrl + L it is faster on most of the terminals.
man command, is an interface to the system reference manuals, this is something which you should use to understand how a command works and what parameters to be used to get the best out of that command. And to be a master of terminal, always refer to this command.
Now, as said, STAY AWAY FROM
So, here are a few ways you can use
rm in necessary situations.
rm <filename>: Remove(Delete) the file.
rm -i <filename>: It will ask before deleting a file. Remember to use
-i, so it gives you some time to double-check before deleting.
rm -iwill ask before deleting each file.
rm -r <foldername>: It will recursively delete a directory and all its contents. (normally rm will not delete directories, while
rmdirwill only delete empty directories)
rm -f: this will forcibly delete files without asking; this is mostly useful if you have rm aliased to
rm -ibut want to delete lots of files without confirming each one.
rm -rf <foldername>. Always avoid this command, and never run as
With these terminal commands, you are good to go and get ready to explore the learning paths.
Here's a diagram, which shows what are the paths one could take in
And at last, keep learning, keep sharing.