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.
Topic: Ethical Hacking in Cybersecurity & Ethical Hacking · Commands & reference
Also covers: Linux Administration, Security Tools, Authorized Labs & CTFs
Learning path: Ethical Hacking for Beginners, lesson 4 of 13
Quick answer: The Kali Linux commands worth memorising first are the ones you use every day: moving around the file system (ls, cd, pwd), reading and editing files, managing packages with apt, checking the network with ip and ss, and controlling users and permissions. Security tools such as nmap and wireshark build on those basics, so learn the foundation first, then layer the tooling on top. This guide groups the essential commands by task with short examples.
Key takeaways
- Do not memorise 100 commands; learn a working core for files, permissions, APT, networking and processes, then look the rest up.
- Use ip a, ss and ping before reaching for scanners, since basic troubleshooting commands answer most connectivity questions on Kali.
- Run security tools only on systems you own or are authorised to test, because scanning without permission can be an offence.
Kali Linux is a Debian-based distribution built for security testing, so it ships with a large toolkit pre-installed. You do not need to memorise hundreds of commands. You need a working core you can type without thinking, plus an understanding of what the specialist tools do. Everything below is for learning on systems you own or are explicitly authorised to test.
Use these on your own lab only. In India, accessing or scanning a computer system without the owner's permission can be an offence under the Information Technology Act, 2000 (sections 43 and 66). Build a home lab with virtual machines, or use an authorised training range, before you run any scanning or testing tool.
What are the file and directory commands?
These are the commands you will run most often. They move you around the system and let you read and change files.
| Command | What it does |
|---|---|
pwd | Print the directory you are in |
ls -la | List files, including hidden ones, with permissions |
cd /etc | Change to the /etc directory |
mkdir lab | Create a directory called lab |
touch notes.txt | Create an empty file |
cp file1 file2 | Copy a file |
mv file /tmp/ | Move or rename a file |
rm file / rm -r dir | Delete a file or a directory tree |
cat, less, head, tail | Read file contents in different ways |
find / -name "*.conf" 2>/dev/null | Search the file system for files by name |
grep -r "password" /etc 2>/dev/null | Search inside files for a string |
A common beginner mistake is forgetting that rm is permanent, with no recycle bin. Double-check the path before you run rm -r.
Users, groups and privilege
Kali's default account is the non-root user kali, and the default password on a fresh install image is also kali. Change it immediately with passwd. You raise privileges with sudo rather than logging in as root.
| Command | What it does |
|---|---|
whoami / id | Show the current user and its UID, GID and groups |
sudo <command> | Run a single command with root privileges |
passwd | Change your password (do this on first boot) |
sudo adduser analyst | Create a new user account |
groups analyst | Show which groups a user belongs to |
sudo usermod -aG sudo analyst | Add a user to the sudo group |
File permissions and ownership
Permissions decide who can read, write or run a file. Getting them wrong is one of the most common causes of both broken scripts and security weaknesses.
| Command | What it does |
|---|---|
ls -l | Show permissions, for example -rwxr-xr-x |
chmod +x script.sh | Make a file executable |
chmod 640 secret.txt | Set numeric permissions (owner read/write, group read) |
chown analyst:analyst file | Change the owner and group of a file |
umask | Show the default permission mask for new files |
As a rule, give a file the least access that still lets it do its job. Avoid chmod 777; it makes a file writable by everyone and is almost never what you want.
Package management with APT
Kali updates often, so keep it current. Run these as the first thing on a new install, and again before any lab session.
sudo apt update # refresh the package list
sudo apt full-upgrade # install available updates
sudo apt install nmap # install a package
sudo apt remove nmap # remove a package
apt search wordlist # search for a package
dpkg -l # list installed packages
If an update fails, read the error rather than re-running blindly. A broken mirror or an out-of-date image is the usual cause.
Networking and troubleshooting
Use the modern ip and ss commands. The older ifconfig and netstat still work on Kali but are deprecated, so learn the current tools.
| Command | What it does |
|---|---|
ip a | Show interfaces and IP addresses (replaces ifconfig) |
ip route | Show the routing table |
ss -tuln | List listening TCP and UDP ports (replaces netstat) |
ping -c 4 8.8.8.8 | Test connectivity with four packets |
dig example.com | Query DNS records for a domain |
traceroute example.com | Show the network path to a host |
curl -I https://example.com | Fetch only the HTTP response headers |
wget <url> | Download a file over HTTP or HTTPS |
System monitoring and processes
| Command | What it does |
|---|---|
top / htop | Watch CPU and memory use in real time |
ps aux | List all running processes |
kill <PID> / kill -9 <PID> | Stop a process by its ID |
df -h | Show disk space per filesystem |
du -sh * | Show the size of each item in the current directory |
free -h | Show RAM and swap usage |
uname -a | Show kernel and system information |
systemctl status ssh | Check whether a service is running |
journalctl -u ssh --since today | Read a service's logs |
What are the security tools and what do they do?
These are the headline tools Kali is known for. Learn what each one is for before you touch it, and run it only against your own lab targets. The commands below launch the tool or run a basic, non-destructive task.
| Tool | Purpose (defensive and testing use) |
|---|---|
nmap -sV 192.168.56.10 | Discover open ports and service versions on a host you own, so you can see your own attack surface |
wireshark / tcpdump | Capture and analyse network traffic to understand protocols and spot anomalies |
nikto -h http://your-lab-site | Check a web server you control for common misconfigurations |
sqlmap | Test your own application for SQL injection so you can fix it before an attacker finds it |
burpsuite | Intercept and inspect web requests from your own browser while testing your own app |
msfconsole | Launch the Metasploit Framework, used to validate and demonstrate vulnerabilities in a lab |
john / hashcat | Audit the strength of password hashes you are authorised to assess |
hydra | Test login resilience and lockout policies on services you own |
aircrack-ng suite | Study Wi-Fi security on your own access point to understand weak encryption |
Each of these leaves clear signals that defenders watch for: port scans show up in firewall and IDS logs, repeated login attempts trigger lockouts and alerts, and unusual traffic stands out in packet captures. Learning the defensive side (reading those logs, writing detection rules) makes you a far more employable security professional than knowing the offensive commands alone. For a structured path into the toolkit, see the top ethical hacking tools in Kali Linux.
Scripting to save time
Once you repeat a task more than twice, script it. A short Bash script turns a checklist into one command.
#!/bin/bash
# ping-sweep of your own lab subnet
for host in 192.168.56.{1..20}; do
ping -c1 -W1 "$host" &>/dev/null && echo "$host is up"
done
Save it, make it executable with chmod +x sweep.sh, and run it with ./sweep.sh. Keep scripts in a folder you control and read any script from the internet before you run it.
Where should you go next?
Commands stick when you use them on a real system, so set up a virtual lab and work through tasks rather than reading lists. Strengthen the Linux foundation with common Linux command questions, then test your Kali knowledge against Kali Linux interview questions. If you want a guided, lab-based route into security testing with these tools, a structured ethical hacking and cyber security course gives you authorised targets to practise on. The official Kali Linux documentation is the best reference for tool and installation details.
Related reading
Frequently Asked Questions
What's Your Reaction?
Like
1
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0