![]() |
| Kali Linux Essential Commands Should Know |
Whether you’re diving into ethical hacking, penetration testing, or just exploring Linux world, mastering Kali’s basic commands is your first step to moving like a pro.
System Information & Navigation
Every hacker begins with knowing where they are in system and what they’re working with.
🔹 uname -a
Displays detailed system information kernel version, architecture, and OS type.
Perfect for knowing what environment you’re in before starting any operation.
🔹 whoami
Shows your active username. Simple but useful when working with privilege escalation or switching users.
🔹 pwd
Prints your current working directory. Because even hackers get lost sometimes.
🔹 ls, ls -l, ls -a
Lists files and directories in your current location.
ls→ clean listls -l→ long format with permissionsls -a→ shows hidden files (those starting with “.”)
🔹 cd <directory>
Moves between directories.
cd ..→ go up one foldercd /→ go to root directorycd→ return home
Tip: Combine
pwd+ls+cdlike your GPS in Linux world.
File Management Basics
Now that you can move around, it’s time to create, copy, and delete files like a real Linux user.
🔹 touch <filename>
Creates an empty file handy for quick test files or placeholders.
🔹 mkdir <directory_name>
mkdir nmap_scans done.🔹 cp <source> <destination>
Copies files or directories. Always double-check your paths before hitting Enter!
🔹 mv <source> <destination>
mv script.sh exploit_v1.sh🔹 rm <filename> and rm -r <directory>
rm -r is permanent no trash bin in hacker’s world.🔹 cat, less, and nano
cat <filename>→ Displays file contents in one go.less <filename>→ Opens content page by page.nano <filename>→ Opens a lightweight text editor ideal for editing scripts or configs.
Real hackers use
nanomore often than you think. It’s fast, simple, and efficient.
Network Commands for Hackers
Welcome to real playground networking. Kali Linux shines brightest here.
🔹 ip a
ifconfig.🔹 ping <hostname_or_ip>
Tests connectivity. Great for checking if a target is alive before scanning.
🔹 nmap <target_ip>
Scans for service versions a crucial step in ethical hacking.
Nmap is your digital radar once you master it, network is no longer a mystery.
Package Management with APT
Kali Linux uses APT (Advanced Package Tool) to handle software.
🔹 sudo apt update
Refreshes package list from repositories always run this before installing anything new.
🔹 sudo apt upgrade
Updates all installed tools to their latest versions.
🔹 sudo apt install <package_name>
Installs a new tool, like:
Boom. Wireshark installed and ready to sniff packets.
Keeping your system updated isn’t optional it’s part of staying secure.
Permissions & Ownership
Security isn’t just about networks it’s about who can access what.
🔹 chmod +x <filename>
Gives execute permission to a file. You’ll often need this before running a script.
🔹 chown <user>:<group> <filename>
Changes file ownership vital for controlling who can modify sensitive files.
Example:
Useful Everyday Commands
A few more essentials that make your terminal life easier:
🔹 clear
Cleans up terminal screen.
🔹 history
Shows your previously executed commands a lifesaver for remembering that long Nmap scan you ran yesterday.
🔹 man <command>
Displays manual page for a command. For example:
Learn every flag and option directly from source.
🔹 exit
Closes your terminal session. (But who wants to leave Kali, right?)
.jpg)