Most people avoid the command line like they were being told to take a job using visual basic. I’ve seen the terminal invoke fear in greater men than me. But when you love linux you’re willing to take that dive into the abyss.
So you still wanna build some command line skills huh. Well would you look at that… we got us challenger. Alright, I’m gonna teach you 6 command line tricks that’ll have you navigating linux like a boss.
1. Super User DO -sudo
Super user say what! You want to remove that file that locked by tons of permissions – sudo. You want to create a folder in that directory but linux has the parental controls on cause it thinks you’re retarded -sudo. Just kidding please don’t do any of that, linux provides great security that stops you from deleting necessary system files and keeps malicious activity at bay. But on the off hand you do have what it takes to administer justice amongst your file system sudo is the way to go. Now that you have become super user. You’re ready to do some damage.
2. Change directory -cd
Changing directories is going to be the most used command you’ll be dulling out during your command line adventures. This command also works well in conjunction with cd .. which will take you up one directory. Just keep in my when changing directories all of your file names are case sensitive. So when in doubt…
3. List files -ls
Feeling lazy after all that typing. Don’t feel like checking the spelling on that file you named using your hybrid camel case/snake case naming convention. ls will quickly solve your problems. ls gives you a list of all the files in the current directory. You can also list the file recursively meaning you will see the files inside of the folders of the current directory by typing ls -R.
4. Touch…. yea touch
Touch lets you create a file or multiple files in the directory you’re currently in. Touch also has a myriad of other uses not explicitly pertaining to file creation. But I’ll leave it up to you to discover the almighty powers of touch , just remember though….
5. Remove Files -rm
We all mess up every now and then. I’m sure you have a ton of useless files and directories taking up a bunch of space on your new 2 TB Samsung SSD. Well lets fix that now. Navigate to your desktop and get rid of all those cat photos for practice. Got a cat photos directory try rmdir to delete the entire folder.
Now that I’ve turned you into a command line ninja in less than 5 minutes. Get out there and show your boss what you’re made of. For further reading check out this awesome command line tutorial at How-to Geek that helped me in my times of need .