Unsurprisingly Microsoft Windows dominates the desktop Operating System (OS) market with nearly 75%. But it would be hard pressed to navigate a career in cyber security without needing to use, defend or configure a Linux (or macOS/Unix) OS.
For those who have barely touched a Linux OS, it can seem insurmountable to master. But learning even only a handful of tools or commands will end up adding more than one string to your bow.
Below explains common and useful commands to help with security-related tasks and queries.
I would recommend having an understanding on Linux permissions, stdin, stdout and stderr, directory structures including .
and ..
.
Not exclusive to bash
, the pipe character (|
) is perhaps the most valuable character you will ever use. It facilitates the feeding the output of one command as the input into the next, enabling the chaining of several commands together and producing more efficient results. Many examples of | can be found in my post on One Liners.
<aside>
⚠️ If a command is running and you want it to stop, simply hit CTRL
+ C
</aside>
<aside>
⚠️ If you execute a command which displays tons of errors, we can redirect those errors to /dev/null i.e. discard them. We achieve this by appending 2>/dev/null
to the command we are running. A useful scenario for this is when running find
. The 2
represents stderr
(as in stdin
, stdout
and stderr
).
</aside>
<aside>
⚠️ To stop a hanging process, open up your Terminal and kill it using, kill
. simply provide the process ID (PID) of the process. You may need to leverage ps
to identify the process ID.
</aside>