I have become increasingly interested in cybersecurity in the last few months which is a good thing considering that’s what my major is. I’m only technically a sophomore but I’m trying my hardest to learn and digest as much as I can. I want to be as prepared as possible before I enter the workforce.
I would like to document what I learn and the process I use to get to answers. In cybersecurity, pentesting seems to be the most glorious activity. So I’m definitely going to dive into that first. I’ve found various CTFs and vulnerable VMs to attack but the one I’ve decided to go with is the Bandit wargame by OverTheWire.
But first, I need to learn how to use a linux terminal. I get that classic “hackerman” vibe from rectangular black interface. So I learned my first few commands. These are the ones I feel are most important to me at this point:
ls (list files in directory)
mkdir (make directory)
cd (change directory)
cp (copy file)
mv (move file AND rename)
rm (remove [WARNING, potentially dangerous!])
An easy way to find documentation of commands in the terminal is by typing ‘man [cmd]’. It seems as if I’ll be using this often. Example:
This command is used to list the files in the current directory. Easy enough.
This command is used to make a new directory where ever it’s specified.
The terminal “exists” in a certain directory at any given time. If I want to open a file in a certain directory without listing the exact directory every time I open it, I must be in the directory first. This is where the cd command comes in.
Say I’m in the root directory and I have another directory in there named Desktop that I want to enter. I can use the command:
To go back up directories (or multiple), this command is used:
This is used to copy a file from one location to another.
The second use is for renaming files. The file name can be changed by typing the new file name where the path would normally be.
mv file_oldname.txt file_newname.txt
This potentially dangerous command, rm, is used to remove files.
This command is dangerous because it can be easy to delete important files and render your linux system useless. It’s the equivalent to deleting System32 on a Windows machine. This is the exact command that could do such damage:
I keep trying to Ctrl-C/Ctrl-V to copy and paste but I quickly realized that that doesn’t work. It is actually Ctrl-Shift-C/Ctrl-Shift-V to copy and paste. Ctrl-C is used to terminate the action that is currently happening. Sometimes this is really useful when a command takes too long or if I mess up.
Oh yeah, the title of this post is a command. Use ‘whoami’ to find out which user you are. That show up already so I didn’t think it was that important.
There are many more commands that are considered basic but I’ll go over those when I need to use them.
I have a lot left to learn. This is only the beginning.
Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.