Mastering the Linux Command Line

Fortune Edema
5 min readJan 29, 2023

--

It was a typical Saturday afternoon, and like any other day, my tech buddies and I set out to fulfill our daily tech routine. As a cybersecurity enthusiast, I am always striving to be better everyday, so I decided to take an 8-hour course in mastering the Linux command line. My goal was to become comfortable with the Linux command line, and I was determined to do so little by little.

My Ubuntu Home Screen

According to the tutorials, I was supposed to download and install Ubuntu on a virtual machine. So what’s a virtual Machine? In Simple terms it is a virtual environment that can be used to host,emulate or represent a physical computer. But, as luck would have it, I already had Ubuntu operating system as my primary OS for day-to-day activities, so I decided to skip that step.

I opened my terminal by using the shortcut “ctrl+alt+t” and my terminal popped up with a blinking green cursor, ready to accept my commands.

The first command I learned was “ls”, which is used to list the contents of a particular directory. For example, if you are in your home directory, the “ls” command will list all the content or folders of that directory.

There are other options to the “ls” command that I learned and would love to share. The “ls -l” command will list the folders of a particular directory in a long or let’s call it a more detailed format.

It shows the username, group name, file size and the date and time the file was last modified. The “ls -lh” command will do the same thing but the file size will be in a more human-readable format especially the file size.

As we continued to learn, our terminal screens filled up with output from our commands. That’s when we learned about the “clear” command, which is used to clear the terminal from any output.

Embarking on this journey of mastering the Linux command line has been an exciting and enjoyable experience for me, and I hope it has been the same for you. Let’s dive deeper and explore the powerful “ls -ld” command, which allows us to view the a quick detailed look at contents of any specified directory.

Whether it’s the “Documents” folder or any other directory, this command gives us a quick look at the details.

Going on we also learned about the “ls -a” command, which will list all hidden files of all of a particular directory.

The command “ls -al” is almost the same thing as the previous but it displays the hidden files of a particular directory in a more detailed format, showing the user, group, file size and date and time the file was last modified.

We also covered the “cd” command, which stands for “change directory”. Using this command, we can change our directory to the document directory with the “cd Document” command. We can also go back to the home directory using the “cd” command.

The “pwd” command is also an important one. It stands for “present working directory” and is used to show you the path to your current location in the terminal according to the directory structure.

To make things a bit clearer, we can change our directory to the document directory using the “cd Document” command and then use the “pwd” command to show the present working directory as shown below.

We also learned a simple trick,that when typing file names that are long using the “tab” key in the keyboard will auto-complete the words. Finally, we learned how to specify the full path of a directory or a specific file path on that particular directory using the “cd Documents/COURSE WARE/CISCO COURSE WARE” command where “Documents/COURSE WARE/CISCO COURSE WARE” is the specific file path.

Note: Backlashes are substitute to spaces in the linux kernel. That’s why we are having it in the pictures below.

Then we use the command “cd ..” to go back one file path or “cd” to go back to the home directory.

I hope you enjoyed following me on this journey of understanding the Linux command line. This isn’t all i will be sharing more later in the future. Stay tuned! Until next time, happy reading!

--

--

Fortune Edema
Fortune Edema

Written by Fortune Edema

Information Security Associate ISO IEC 27001 ||Tech Enthusiast||InfoSec Researcher|| Jnr SOC Analyst ||Security Awareness||Computer Science Student

No responses yet