Linux Fundamentals (Pt.1)

Linux Fundamentals (Pt.1)

Dec 11, 2022


So lately I've been heavy in the studies of Pentesting. While on the journey I've learned that it's vital to know the world of Linux. Once I've discovered such... I went in on the different linux distros to understand the file structure and commands. While most commands go for the various distros, some of them have slightly different ones as well. This was when I became confused for a moment and wanted to get just the fundamentals of Linux core down. Meaning, I wanted to learn the common usage of Linux and go from there. I also went forth and signed up for Try Hack Me so I can gain direct knowledge of how to become a Pentester. Truly don't have time to waste with studying all that I may not need so I wanted to cheaper option for lessons with approval of many in the community. Given the insights behind the post title, let's dive into the topic of Linux fundamentals.

The terminal is where all of the power resides for it's where you will be focused for the role of pentesting. While using Linux you may have a GUI, but for most of the blog I will be focused on the terminal. To know how to operate in the terminal means supreme power my friends. Let's speak about the basic commands so you can have a reference point. I won't provide the code examples, honestly... because I am just lazy to do so. Links are provided so just thank me for helping the community ok? LOL.

The first two commands I wanted to discuss is "echo" and "whoami".

echo: provides output to the screen.

whoami: Finds out what user is logged in as.

These commands will be on the topic of interacting with the file system. You must know the directories you are in when handling files. Remember... everything is a file in the world of Linux. Wrong thing deleted and all of your distro is destroyed so move proper.

cd: change directory

ls: listing files / folders

cat: concatnate

pwd: print working directory

Ok so now you know a little on how to interact with the file system. Let's move onto searching for files. I'm sure there may be some type of media you will have the desire to search for. These commands will help you.

find: allows the user to search for a file by it's type.

grep: allows the searching of entire contents within a file.

Now we have those down... it's time to speak about Shell operators. Here are a few to keep in the memory bank. The first one is "&".

&: this operator allows users to run the commands in the background of your terminal.

&&: allows users to combine multiple commands in one line via the terminal.

>: we can take the output from one command and direct it somewhere else.

>>: does the same as the one above, however it just appends (add on) instead of replacing the output.

Ok so now you have the ground work of a few commands via Linux. My thought is to make sure you practice in your terminal these and see what you come up with. I've been in my terminal making test files and working with the commands to truly understand what is going on. Being a Windows user for so long it's a little learning curve of Linux. Yes.. the command line can be a fearful thing to ones who haven't programmed before as well. No worries... it's a freaking computer people. Take heed to these fundamentals and watch insights from others in the community like me. I am sure together we can accomplish learning Linux in no time.

Until next post .. Peace!

Enjoy this post?

Buy Orion3000 a coffee

More from Orion3000