Are you a tech enthusiast but have been putting off learning Linux? Do you think that Linux is neat but not necessary to use in your work environment? Are you slightly embarrassed because you do not really know what Linux is and why it is important in the tech world? If you answered yes to any or all those questions, do not fret, I was right there with you in the beginning. In fact, I am still learning the joys and efficiencies of Linux. I know you may be comfortable working in Windows or Mac, and they are great operating systems but learning at least the core concepts and usability of Linux can greatly increase your productivity and help you better understand the inner workings of an operating system.
So, what is Linux? Linux is a family of open-source Unix-like operating systems built upon the Linux Kernel. Linux comes in many different flavors (distributions). Ubuntu and Red Hat are examples of popular Linux distros. Here is a handy guide on the Linux Directory Structure, and here is a video on why Linux is awesome. I may go over the different Linux distros, virtual machines, and Linux use cases in another article, but for now I want to show you some really cool terminal commands that will get you started working in the Linux environment today!
*(If you want to follow along, you will need to install a Linux distro or install WSL2 on Windows)
Once you have your Linux Terminal open, type pwd to get started. This is the print working directory command which prints the full pathname of the current working directory. It might look something like /home/<my_super_secret_linux_username>. Next type ls to see all your handy dandy Linux folders. You can also type ls -l for an easier to read list with metadata or ls -la to also see your hidden files/folders. Now choose one of your folders and type cd <folder name>. The command cd, change directory, will allow you to navigate to that directory. Type ls again and now your subfolders and/or files will be displayed. Pretty neat! If you want to go back one step in your relative path just type cd .. , and if you want to go all the way back to the user’s default home directory type cd ~ . *(FYI! There is a space between cd and .., and a space between cd and ~)
What if you want to create or modify a file/folder? If you want to make a directory, then use the mkdir <name of folder> command. If you want to make a new file, then use the touch <filename> command. Just make sure to change into the correct directory when creating new files.
Here are a few other file/folder modification commands:
rmdir — remove directory
mv — move file or folder
cp — copy file or folder
rm — remove file
Hopefully, these simple commands will start getting you familiar with Linux. At the very least, you will save some time creating and managing files and folders. Please let me know if you would like some more articles on the Linux Terminal or Linux in general. I love learning about Linux and happy to share any knowledge. Until next time, go play around in a virtual Linux machine and discover your inner penguin.