1️⃣ What is Linux?
- Linux is an operating system (like Windows or macOS).
- It is widely used in:
- Cybersecurity
- Servers
- Programming
- Cloud computing
- Ethical hacking tools (like Kali Linux)
- Many cybersecurity professionals use Linux daily.
2️⃣ What is the Terminal?
The Terminal (or Shell) is where you type commands to control the computer. Instead of clicking icons, you type instructions.
Example prompt:
joe@linux:~$
3️⃣ File System Basics
Linux folders are organized like a tree:
/
├── home
│ └── joe
├── etc
├── var
└── bin
/= Root directory (top of everything)/home= User folders/etc= Configuration files/bin= Important programs
4️⃣ Navigation Commands
📂 pwd (Print Working Directory)
Shows where you are:
pwd
/home/joe
📂 ls (List)
Lists files and folders:
ls
Useful options:
ls -l # long listing format
ls -a # show hidden files
ls -la # combine both
📂 cd (Change Directory)
cd Documents
cd ..
cd /home/joe/Desktop
Shortcuts:
..= go back one folder~= home directory/= root
5️⃣ File & Folder Management
📄 touch (Create a file)
touch notes.txt
📁 mkdir (Make a folder)
mkdir Projects
🗑️ rm (Remove)
rm notes.txt
Remove a folder (recursive):
rm -r Projects
⚠ Warning: In Linux, deleted files usually do not go to the trash.
Be careful with
rm and especially rm -r.
📄 cp (Copy)
cp file.txt backup.txt
cp -r folder1 folder2
📄 mv (Move or Rename)
mv file.txt newname.txt
mv file.txt /home/joe/Documents
6️⃣ Viewing File Contents
📖 cat (Display file)
cat notes.txt
📖 less (Scroll through a file)
less notes.txt
Press q to quit.
📖 head and tail
head file.txt # first 10 lines
tail file.txt # last 10 lines
7️⃣ System Information Commands
💻 whoami
whoami
💻 uname (System info)
uname -a
💻 top (Running processes)
top
Press q to exit.
💻 df (Disk usage)
df -h
8️⃣ Permissions (Cybersecurity Important)
Files have permissions like:
-rwxr-xr--
r= readw= writex= execute
🔐 chmod (Change permissions)
chmod 755 script.sh
Permission Number Key
7= read + write + execute6= read + write5= read + execute4= read only
9️⃣ Installing Software (Package Management)
On Debian/Ubuntu systems:
sudo apt update
sudo apt install nmap
⚠ Be careful:
sudo runs commands as an administrator.
A mistake with sudo can break the system.
🔟 Networking Commands (Cybersecurity Relevant)
🌐 ping (Test connectivity)
ping google.com
🌐 ip a (View IP address)
ip a
🌐 netstat (Network connections)
netstat -tuln
1️⃣1️⃣ Searching & Finding
🔎 grep (Search inside files)
grep "error" logfile.txt
🔎 find (Find files)
find /home -name file.txt
1️⃣2️⃣ Command Structure
Most commands follow this pattern:
command [options] [argument]
Example:
ls -l Documents
ls= command-l= optionDocuments= argument
1️⃣3️⃣ Why Linux Matters for Cybersecurity
- Most servers run Linux.
- Many security tools run on Linux.
- Log files are stored on Linux systems.
- Ethical hackers must understand permissions and processes.
If you understand Linux, you understand:
- Servers
- Networks
- Cloud systems
- Cyber defense
🧠 Quick Practice Questions
- What command shows your current directory?
- What does
rm -rdo? - What does
chmod 755mean? - What command shows your IP address?
- Why is
sudodangerous?
🚀 Pro Tip: The best way to learn Linux is to install VirtualBox,
install Ubuntu (or Kali Linux), and practice commands daily.