Kali Linux is a Debian-based Linux distribution built for penetration testing and digital forensics, and its most useful beginner commands cover navigation, networking and its security tools. Start with pwd, ls, cd and apt, then learn nmap for scanning, msfconsole for Metasploit, and john or hashcat for password auditing — always on systems you own or have written permission to test.
Key takeaways
- Kali Linux is a Debian-based distribution with hundreds of pre-installed security tools; learn the terminal basics before any hacking tool.
- Only ever test systems you own or have written permission to test — unauthorized access is illegal even when you mean well.
- A typical beginner workflow is scan with Nmap, research the findings, then practice exploitation in a lab with Metasploitable or DVWA.
Kali Linux looks intimidating the first time you open it: a dark desktop, a terminal, and hundreds of tools with names like Nmap, Metasploit and Hydra. The good news is that beginners only need a small set of commands to start, and the rest builds on them.
What is Kali Linux?
Kali Linux is a Debian-based Linux distribution designed for digital forensics, penetration testing and security auditing. It is maintained by Offensive Security and comes with hundreds of pre-installed security tools, so you do not have to install and configure each one yourself.
That is the main difference from a normal Linux distribution such as Ubuntu. Ubuntu is built for everyday use; Kali is built for testing. Its default desktop is Xfce, it includes network scanners, password auditors, web testing tools and exploitation frameworks out of the box, and it is free to download from the official Kali website only. The Kali documentation is explicit: the sites under kali.org are the only official outlets, so download images only from there.
How do you set up a safe Kali Linux lab?
Do not install Kali as the main operating system on your everyday laptop. Run it in a virtual machine instead, using VirtualBox or VMware, so your testing stays isolated from your real files and network.
The official Kali installation guide recommends at least 2 GB of RAM and 20 GB of disk space for the default desktop install, and 8 GB or more when you run heavy tools such as Burp Suite. A basic setup without a desktop can run on far less, but beginners should use the full desktop.
Your lab needs three parts:
- Kali Linux itself — download the installer image from kali.org and install it in a virtual machine, or use a pre-built virtual machine image from the same site.
- A target to practice on — Metasploitable, a deliberately vulnerable Linux virtual machine from Rapid7, and DVWA (Damn Vulnerable Web Application), a practice web app, are the standard starting points.
- An isolated network — keep the lab virtual machines on a host-only or internal network in your virtualization software, so your scans never touch your home network or the internet.
After installing, run sudo apt update && sudo apt full-upgrade to bring the system and its tools up to date. Then take a snapshot of the virtual machine, so you can roll back after a messy experiment.
What are the basic Kali Linux commands every beginner needs?
The basic commands are ordinary Linux commands, and they are the foundation for everything else. If you cannot move around the file system, you cannot use any security tool well.
| Command | What it does | Example |
|---|---|---|
pwd | Shows your current directory | pwd |
ls | Lists files in a directory | ls -l |
cd | Changes directory | cd /home/kali |
mkdir | Creates a directory | mkdir lab-notes |
cp | Copies files or directories | cp report.txt backup/ |
mv | Moves or renames files | mv old.txt new.txt |
rm | Removes files or directories | rm temp.txt |
cat | Shows a file's contents | cat notes.txt |
grep | Searches text for a pattern | grep -i error log.txt |
whoami | Shows the current user | whoami |
Two habits will save you trouble. First, use ls -l instead of plain ls when you need permissions, ownership and file sizes. Second, be careful with rm, especially with the -r flag for directories: deleted files in the terminal do not go to a recycle bin. Practice these commands on throwaway files in your lab before you use them on anything real.
Learn the man command too. Typing man nmap opens the manual page for Nmap, and command --help gives a shorter summary. Reading the manual is faster than guessing at flags, and it is a habit professional testers keep.
Which networking commands should beginners learn?
Networking commands tell you where you are on a network and whether a target is reachable. Learn them before you touch a scanner, because a scan result means little if you do not understand the network it came from.
ip a— shows your network interfaces and IP addresses. It replaces the olderifconfigon modern Linux.ping 192.168.1.1— checks whether a host is reachable and how long replies take.ss -tulpn— lists listening ports and the programs using them on your own machine.curl https://example.com— fetches a web page from the terminal, useful for testing web services.wget https://example.com/file.zip— downloads a file from the terminal.
Try this in your lab: run ip a on Kali, note its address, run ip a on the Metasploitable machine, then ping the target from Kali. If the ping fails, fix the virtual network settings before you try any scanning tool. Most beginner frustration with Kali is a network setting, not a tool problem.
How do you install and update tools in Kali Linux?
Kali uses APT, the Debian package manager, and three commands cover most of what beginners need. Run them with sudo so you have the permissions to change the system.
sudo apt update refreshes the list of available packages without installing anything. sudo apt full-upgrade then upgrades the installed packages to the newest versions. sudo apt install nmap installs a package by name, and sudo apt remove nmap removes it. Run the update step first whenever an install fails, because an out-of-date package list is the usual cause.
Most Kali tools are already installed, so check before you install anything. Type the tool name followed by --help, for example nmap --help, and if you get a usage summary, it is ready. The Kali tools site lists the tools included in the distribution, and the official Kali documentation is the place to check which metapackage a tool belongs to.
How do you scan a network with Nmap?
Nmap, short for Network Mapper, is the first security tool most beginners learn. It discovers hosts on a network and finds which ports and services are open on each one, which tells you where to look next.
nmap 192.168.56.10— scans the common ports on one target in your lab.nmap 192.168.56.0/24— scans every address in a lab subnet to find live hosts.nmap -sV 192.168.56.10— probes open ports to identify the service and version running on each.nmap -sC 192.168.56.10— runs default scripts that check for common issues on the open services.nmap -oN scan.txt 192.168.56.10— saves the results to a file so you can review them later.
Always scan your own lab subnet, never a network you do not own. A scan is noisy: it leaves traces in logs, and on a real network it can look like the start of an attack. In your lab, run the scan, read the output slowly, and write down each open port, the service behind it, and what you want to check next. That note-taking is the real skill — the scan itself takes seconds.
When Nmap finds an old service version, check whether it has a known vulnerability. CISA maintains a catalog of known exploited vulnerabilities that defenders are told to patch first, which is a good guide to what matters in the real world.
How do you use Metasploit in Kali Linux?
Metasploit is a framework for running exploit code against a target, and it is the tool beginners most often misunderstand. It does not magically hack a system; it runs a specific exploit against a specific vulnerability, and it only works when that vulnerability is really there.
Start it with msfconsole. Inside the console, the basic flow is: search for an exploit by name or CVE, use the exploit module, show options to see what it needs, set RHOSTS 192.168.56.10 to point it at your lab target, and run to try it. In a lab against Metasploitable, a known vulnerable service will give you a session; against a patched system, the same exploit will fail, which is the lesson.
Learn searchsploit alongside Metasploit. It searches the local Exploit Database from the terminal, for example searchsploit apache 2.4, and shows public exploits for a product and version. Pair it with Nmap: find the version with nmap -sV, then check it with searchsploit.
What are the password auditing tools in Kali Linux?
Password auditing tools test whether passwords are weak or reused, which is a common finding in real assessments. Use them only on password hashes you own or have permission to test, never on someone else's accounts.
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt— John the Ripper tries words from a wordlist against a password hash file.hashcat -m 0 -a 0 hash.txt wordlist.txt— Hashcat does the same job faster, using your graphics card when one is available.hydra -l admin -P passwords.txt ssh://192.168.56.10— Hydra tries logins against a service such as SSH on a lab target.crunch 8 8 abc123 -o words.txt— Crunch generates custom wordlists of a given length and character set.
The lesson these tools teach is defensive: short, common and reused passwords fall fast. That is why a password manager and unique passwords matter, and why you should check whether a password you use has appeared in a breach.
Our free password strength checker shows how length and variety change the time a password would resist guessing.
You can also see what a hashed password looks like with our free hash generator.
What other Kali tools should beginners know?
Three more tools round out a beginner's set: one for web apps, one for traffic, and one for wireless. You do not need to master them at once — learn what each one is for first.
- Burp Suite — a web proxy that lets you inspect and change the requests between a browser and a website. Practice it against DVWA, and learn how SQL injection and cross-site scripting work in a safe app before you ever look at a real one.
- Wireshark — captures network traffic so you can see what protocols and data actually cross the wire. Start with
wiresharkfrom the menu, capture on your lab interface, and filter by protocol, for examplehttpordns. - Aircrack-ng — a suite for auditing wireless networks, used in labs on your own access point. It captures handshakes and tests Wi-Fi passwords you own.
- SQLmap — automates testing for SQL injection in web apps, with a command such as
sqlmap -u "http://192.168.56.10/dvwa/vulnerabilities/sqli/?id=1"against your DVWA lab. - Nikto — scans a web server for known issues with
nikto -h http://192.168.56.10.
Keep a simple workflow in mind: scan with Nmap, identify services and versions, research them with searchsploit, test in the lab with Metasploit or Burp Suite, and write down what you found and how it would be fixed. That loop — find, understand, prove, fix — is what penetration testing actually is. MITRE ATT&CK, the framework defenders use to classify attacker behavior, lists techniques such as phishing under T1566, which shows how the tools you learn map to real attack patterns.
What mistakes do Kali Linux beginners make?
The biggest mistake is skipping the lab and scanning real networks. That is illegal, it is noisy, and it teaches bad habits, because you cannot freely experiment on a system you must not break. Build the lab first, even if it takes an afternoon.
Other common mistakes: running every command as root without understanding it, copying exploit commands from random videos without reading what they do, and never writing anything down. A penetration tester's report is the product, not the exploit, so keep notes from day one: the command you ran, what it returned, and what it meant.
Finally, do not collect tools instead of learning them. Ten commands you understand beat a hundred you have only pasted. Master nmap, ip a, apt and msfconsole first, then add one tool at a time.
The bottom line
Kali Linux gives you a professional toolkit for free, but the toolkit is not the skill. The skill is a method: set up an isolated lab, learn the terminal basics, scan with Nmap, research what you find, and practice exploitation only where you have permission.
Start today in a virtual machine, with Metasploitable as your target and a notebook beside you. If you want to see how the defensive side works, try our what is my IP tool to see what your own connection exposes, and build from there.
Frequently asked questions
Is Kali Linux legal to use?
Yes, Kali Linux itself is legal. It is a normal Linux distribution with security tools installed. What matters is how you use it: testing a system without the owner's permission is illegal in most countries, including under the US Computer Fraud and Abuse Act.
Do I need to install Kali Linux on my main computer?
No, and beginners should not. Run Kali in a virtual machine with VirtualBox or VMware, or boot it from a live USB. That keeps your main system untouched and keeps your testing isolated in a lab.
What are the first Kali Linux commands I should learn?
Learn pwd, ls, cd, mkdir, cp, mv and rm for moving around the file system, then ip a and ping for networking, then sudo apt update and sudo apt install for managing packages. Those basics underpin every security tool that follows.
What is Nmap used for in Kali Linux?
Nmap maps a network and finds open ports and services on a target. It is usually the first tool in a penetration test, because you cannot assess a service you do not know is running.
What is Metasploit in Kali Linux?
Metasploit is a framework for developing and running exploit code against a target, started with the msfconsole command. Beginners use it in a lab to learn how known vulnerabilities are exploited and how patches stop them.
How much RAM does Kali Linux need?
The official documentation says a basic setup can run with as little as 128 MB of RAM, but the default desktop install needs at least 2 GB of RAM and 20 GB of disk space. For resource-heavy tools such as Burp Suite, 8 GB or more is recommended.
Can I learn ethical hacking with Kali Linux for free?
Yes. Kali Linux is free to download, and the official documentation is free. Free practice targets include Metasploitable and DVWA, and platforms such as TryHackMe and Hack The Box offer free beginner rooms and labs.
What should I learn after the basic Kali commands?
After the basics, learn Nmap scanning, Wireshark traffic analysis, web testing with Burp Suite, and vulnerability research with searchsploit. Then study for a structured goal, such as the CompTIA PenTest+ or the OSCP path.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the official Kali Linux installation documentation, the Kali list of official sites, and MITRE ATT&CK.
How we write and fact-check →