The safest way to start this Kali Linux tutorial for beginners is to run Kali in a virtual machine, learn everyday Linux commands first, and practise security tools only against your own lab machines. Kali Linux is a Debian-based distribution maintained by Offensive Security and packed with tools for penetration testing and digital forensics. This step-by-step guide shows you how to set it up, which commands to learn first and how to run your first legal scan.
Key takeaways
- Install Kali as a virtual machine in VirtualBox or VMware so mistakes never affect your main operating system.
- Learn basic Linux commands for files, permissions, packages and networking before touching hacking tools.
- Update Kali regularly with apt update and apt full-upgrade.
- Scan only machines you own or have written permission to test, such as a deliberately vulnerable VM in your own lab.
- Nmap, Wireshark and Burp Suite are good first tools because they teach how networks and web apps really work.
Before you begin: legal and ethical rules
Using security tools against systems you do not own, or without written permission, can break the law in India under the Information Technology Act, as well as company policies. Everything in this tutorial is meant for your own lab. If you are unsure whether Kali is the right first step, read is Kali Linux safe for beginners.
Step 1: Install Kali Linux in a virtual machine
- Install VirtualBox or VMware Workstation Player on your computer.
- Download the official pre-built Kali virtual machine image from the Kali Linux website. Always use the official site and verify the checksum.
- Import the image into your virtualisation software.
- Give it at least 2 CPU cores and 4 GB of RAM if your computer allows.
- Start the VM and log in with the default credentials listed on the Kali download page, then change the password immediately.
Change the password with this command:
passwdStep 2: Update the system
Kali is a rolling release, so packages change often. Update before you do anything else.
sudo apt update
sudo apt full-upgrade -yStep 3: Learn essential Linux commands
Most beginners struggle with Linux itself, not with the security tools. Practise these until they feel natural.
| Task | Command |
|---|---|
| Show current folder | pwd |
| List files with details | ls -la |
| Change folder | cd /etc |
| Create a folder | mkdir lab |
| Read a file | cat file.txt |
| Search inside files | grep -i error log.txt |
| Change permissions | chmod 600 key.pem |
| Show IP addresses | ip a |
| Install a package | sudo apt install tree |
| Read a manual page | man nmap |
Understand users and sudo
Recent Kali versions use a normal user account by default, and you run admin commands with sudo. This is safer than working as root all the time.
Step 4: Build a safe practice lab
You need a target that you are allowed to attack. Good options are:
- A deliberately vulnerable virtual machine such as Metasploitable 2 or a VulnHub machine, running on the same computer.
- OWASP Juice Shop, a vulnerable web app you can run locally with Docker.
- Online platforms such as TryHackMe or Hack The Box that give you legal targets.
Set the network of both VMs to Host-only or an internal network, so the vulnerable machine is never exposed to the internet.
Step 5: Run your first Nmap scan
Nmap discovers hosts and open ports. First find your lab network range with ip a, then discover live hosts and scan the target. Replace the addresses with those in your own lab.
# find live hosts in your lab network
nmap -sn 192.168.56.0/24
# scan common ports and detect service versions on your lab target
nmap -sV 192.168.56.101Read the output carefully. Each open port is a service, and each version number is something you can research for known weaknesses. This habit of reading and researching is the real skill.
Step 6: Capture traffic with Wireshark
Open Wireshark, select your lab network interface and start a capture. Then browse to a page on your target. Apply a display filter such as http to see requests and responses. This shows you why unencrypted protocols are risky.
Step 7: Explore web testing with Burp Suite
Burp Suite Community Edition comes with Kali. Configure your browser to use Burp as a proxy, then browse OWASP Juice Shop. You can inspect and change requests, which is the starting point for learning web vulnerabilities such as SQL injection and cross-site scripting.
Step 8: Take notes like a professional
Write down every command, finding and screenshot. Penetration testers are judged on their reports as much as their technical skills. A simple Markdown notes file per lab is enough to start.
Common beginner mistakes
- Installing Kali as the only operating system on a daily-use laptop.
- Running random scripts from the internet without reading them.
- Scanning public websites or college networks without permission.
- Jumping to exploitation tools before understanding networking basics.
What to learn after this Kali Linux tutorial
Strengthen networking (TCP/IP, DNS, HTTP), learn basic Bash and Python scripting, and work through beginner rooms on legal practice platforms. When you are ready to plan your career, see our guides on cyber security certifications for beginners and starting a cyber security career with no experience.
Frequently asked questions
Is Kali Linux good for beginners?
Kali is fine for beginners who want to learn security, as long as they run it in a virtual machine and already know some Linux basics. For learning Linux alone, Ubuntu is often easier.
Can I install Kali Linux on Windows?
Yes. You can run Kali in VirtualBox or VMware, or use Kali through Windows Subsystem for Linux. A virtual machine gives you the most complete experience for labs.
Is using Kali Linux illegal in India?
Installing and using Kali is legal. Using its tools against systems without permission can be illegal. Always practise on your own lab or authorised platforms.
How long does it take to learn Kali Linux?
You can become comfortable with Kali and core tools in a few weeks of regular practice. Becoming a skilled penetration tester takes much longer and depends on strong networking and web fundamentals.
Explore more guides in our cyber security section.
