Linux Fundamentals Part 1
TryHackMe Walkthroughs â‹… Guided â‹… Linux Fundamentals Part 1
Task 1: Introduction
This room is the first in a three-part series on Linux fundamentals. This room will have us:
Running our very first commands in an interactive Linux machine
Learning some essential commands used to interact with the file system
Learning how users and groups work on Linux (and why this is important for penetration testing)
Task 2: A Bit of Background on Linux
Linux is an umbrella term for a group of operating systems all based on Unix. We refer to these operating systems as "flavors" of Linux since they have many similarities. Linux operating systems are commonly used for websites, control panels, critical infrastructure, and more.
Task 3: Interacting With Your First Linux Machine (In-Browser)
We can interact with a Linux machine in TryHackMe by pressing the "Start Machine" button on the top-right of each task.
Task 4: Running Your First few Commands
Two basic commands that can be run in the Linux command line are echo
and whoami
. echo <text>
outputs the text we provide to it. whoami
outputs the username we are logged in as.
Task 5: Interacting With the Filesystem!
The Linux command line allows us to interact with the filesystem. cd <directory>
allows us to change directories and pwd
prints which directory we are currently in.
ls
lists the files in the current directory. cat <file1> <file2>
stands for concatenate. The number of files provided to this command can vary since cat
outputs the given files concatenated together. Despite its name, this command is most commonly used to print the contents of a single file.
Task 6: Searching for Files
We can search the filesystem for files by name or other attributes with find
. grep <pattern> <file>
can be used to search the contents of files for specific values.
Task 7: An Introduction to Shell Operators
Various operators in the Linux command line allow us to use commands with more flexibility. &
allows us to run commands in the background of our terminal. &&
looks similar but is unrelated to &
. Rather, &&
allows us to combine multiple commands together in one line of your terminal.
The>
operator is a redirector, meaning that we can take the output from a command (such as using cat to output a file) and direct it elsewhere. >>
has the same functionality as the >
operator but appends the output rather than replacing (meaning nothing is overwritten).
Task 8: Conclusions & Summaries
In conclusion, this room has allowed us to:
Understand why Linux is so commonplace today
Interact with our first-ever Linux machine
Run some of the most fundamental commands
Get an introduction to navigating around the filesystem and using commands like find and grep to make finding data even more efficient
Power up our commands by learning about some of the important shell operators
Task 9: Linux Fundamentals Part 2
My walkthrough for the next room in this Linux introductory series can be found here.
Last updated