This is just a quick overview of the basic terminal commands that I use on a daily basis and I believe, most of the developers use as well.
If you're completely new to this or if you want to learn more about the Linux terminal, I strongly recommend that you check on the links that I put down below in the resources. They will provide you with more in-depth explanations :)
pwd (Print Working Directory) - use this command to know in which directory you are currently in.
ls (list) - list all the files and directories of the directory you are currently in.
mkdir mydir (make directory) - create a new, empty directory.
cd mydir (change directory) - go to a directory.
rmdir mydir (remove directory) - delete a directory, but this will only work if the directory is empty. If it isn't and you still want to delete it, use
rm -r mydir. I advise you to use this command very cautiously since you could end up deleting all or most of your files.
touch newfile - easiest way to create new, empty files.
cp filelocation newlocation (copy) - copy a file from one location to a new one.
mv myfile newfile (move) - the primary purpose of this command line is moving files and folders. It can also rename them since the act of renaming a file is interpreted by the filesystem as moving it from one name to another.
rm myfile (remove) - delete a file.
man mycommand (user manual) - if don't know how to use a command or if you just want to know more about it, use
man. You can't go wrong with that one.
- Ubuntu Official Site
- How-To Geek - 8 deadly commands you should never run on Linux
- GeeksforGeeks - man command in Linux with exemples