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.

Apr 09, 2025 - 16:30
Updated: 
129.3k

Ethical Hacking in Cybersecurity & Ethical Hacking · Commands & reference

Linux Administration, Security Tools, Authorized Labs & CTFs

Ethical Hacking for Beginners, lesson 4 of 13

Top 100 Most Useful Kali Linux Commands with Practical Examples for Ethical Hackers and Beginners

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.

CommandWhat it does
pwdPrint the directory you are in
ls -laList files, including hidden ones, with permissions
cd /etcChange to the /etc directory
mkdir labCreate a directory called lab
touch notes.txtCreate an empty file
cp file1 file2Copy a file
mv file /tmp/Move or rename a file
rm file / rm -r dirDelete a file or a directory tree
cat, less, head, tailRead file contents in different ways
find / -name "*.conf" 2>/dev/nullSearch the file system for files by name
grep -r "password" /etc 2>/dev/nullSearch 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.

CommandWhat it does
whoami / idShow the current user and its UID, GID and groups
sudo <command>Run a single command with root privileges
passwdChange your password (do this on first boot)
sudo adduser analystCreate a new user account
groups analystShow which groups a user belongs to
sudo usermod -aG sudo analystAdd 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.

CommandWhat it does
ls -lShow permissions, for example -rwxr-xr-x
chmod +x script.shMake a file executable
chmod 640 secret.txtSet numeric permissions (owner read/write, group read)
chown analyst:analyst fileChange the owner and group of a file
umaskShow 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.

CommandWhat it does
ip aShow interfaces and IP addresses (replaces ifconfig)
ip routeShow the routing table
ss -tulnList listening TCP and UDP ports (replaces netstat)
ping -c 4 8.8.8.8Test connectivity with four packets
dig example.comQuery DNS records for a domain
traceroute example.comShow the network path to a host
curl -I https://example.comFetch only the HTTP response headers
wget <url>Download a file over HTTP or HTTPS

System monitoring and processes

CommandWhat it does
top / htopWatch CPU and memory use in real time
ps auxList all running processes
kill <PID> / kill -9 <PID>Stop a process by its ID
df -hShow disk space per filesystem
du -sh *Show the size of each item in the current directory
free -hShow RAM and swap usage
uname -aShow kernel and system information
systemctl status sshCheck whether a service is running
journalctl -u ssh --since todayRead 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.

ToolPurpose (defensive and testing use)
nmap -sV 192.168.56.10Discover open ports and service versions on a host you own, so you can see your own attack surface
wireshark / tcpdumpCapture and analyse network traffic to understand protocols and spot anomalies
nikto -h http://your-lab-siteCheck a web server you control for common misconfigurations
sqlmapTest your own application for SQL injection so you can fix it before an attacker finds it
burpsuiteIntercept and inspect web requests from your own browser while testing your own app
msfconsoleLaunch the Metasploit Framework, used to validate and demonstrate vulnerabilities in a lab
john / hashcatAudit the strength of password hashes you are authorised to assess
hydraTest login resilience and lockout policies on services you own
aircrack-ng suiteStudy 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

Kali Linux is a Debian-based distribution built for security testing, penetration testing and digital forensics. It ships with a large toolkit pre-installed, so professionals use it to assess systems they own or are authorised to test, and to learn how those tools work.

Start with the everyday basics: ls, cd and pwd for navigation, cat and nano for files, apt for software, ip and ss for networking, and sudo, chmod and chown for permissions. These underpin everything the security tools do, so learn them before the specialist tooling.

On a standard Kali install image the default account is the user kali with the password kali. Change it straight away with the passwd command, because a known default password is an obvious weakness if the machine is ever reachable on a network.

Use ip. The older ifconfig and netstat commands still work on Kali but are deprecated and may be missing on minimal installs. Run ip a to see interfaces and addresses, and ss -tuln to list listening ports.

Running Kali is legal, but using its scanning or testing tools against systems you do not own or have written permission to test is not. In India that can breach the Information Technology Act, 2000. Practise only in your own virtual lab or an authorised range.

Beginners can learn a lot from Kali, but it is tuned for security work rather than daily desktop use. If you are new to Linux, get comfortable with general command-line basics first, then move to Kali for hands-on security practice in a lab.

Run sudo apt update to refresh the package list, then sudo apt full-upgrade to install updates. Do this on a fresh install and before each lab session. If an upgrade fails, read the error, as it usually points to a bad mirror or an outdated image.

Use nmap against hosts you own, for example nmap -sV 192.168.56.10 to list open ports and service versions on a lab machine. This shows your own attack surface so you can close unnecessary services. Never scan networks you are not authorised to test.

What's Your Reaction?

Like Like 1
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.