Kali Linux for Beginners: 10 Essential Terminal Commands You Should Master First
If you’re new to Kali Linux, it’s tempting to jump straight into hacking tools. But here’s the truth: the fastest way to get good at ethical hacking is to first master the Linux terminal. Think of it like learning to drive before hopping into a race car. When you can move around your file system, edit files, manage permissions, and read logs without thinking, every tool you touch becomes easier—and safer—to use.
In this guide, you’ll learn the first 10 commands every Kali Linux beginner should master. These are the building blocks of everything you’ll do in penetration testing: navigating directories, listing files, copying data, managing permissions, and using help like a pro. I’ll also share practical tips to avoid common mistakes, so you can stay efficient and confident in the terminal.
Let’s start strong.
- What you’ll get: simple explanations, quick examples, caution notes, and how each command applies to real-world security work.
- Why that matters: in Kali, speed and precision count. These commands help you work faster, avoid breaking things, and understand what your tools are doing under the hood.
Before we dive in, if you want the official docs handy, bookmark these: – Kali Linux Docs: https://www.kali.org/docs/ – Linux man pages: https://man7.org/linux/man-pages/ – tldr (simplified pages): https://tldr.sh
Why Core Linux Skills Matter Before Penetration Testing
Kali is a Linux distribution built for security professionals. But at its core, it’s still Linux. Your tools run as Linux processes. Your wordlists, payloads, and logs live as Linux files. Misplace a path, run with the wrong permissions, or mistype a destructive command, and you’ll lose time—or data.
Here’s why mastering the basics first is crucial:
- Speed: You’ll set up labs, switch directories, and manage files fast.
- Safety: You’ll avoid risky mistakes (like deleting the wrong directory).
- Understanding: You’ll know what tools actually do and where they store output.
- Transferable skills: Every Linux-based OS (Ubuntu, Debian, Parrot) follows similar patterns.
If you’re serious about ethical hacking, Linux fundamentals aren’t optional. They’re your foundation.
How to Follow Along (Safely)
To practice without risk, work in a dedicated lab folder in your home directory:
mkdir -p ~/lab && cd ~/lab
Everything we do below can be tested here without touching system files.
1) pwd — Confirm Where You Are
pwd prints your current directory (folder) path. It’s your anchor in the terminal.
- Use it when you feel lost.
- Use it before running commands that modify files.
Example:
pwd
/home/kali/lab
Why it matters: tools and scripts often assume a certain working directory. Knowing exactly where you are prevents confusion and errors.
Tip: Learn the Linux filesystem layout. The Filesystem Hierarchy Standard explains what lives where (like /etc, /var, /usr): https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
2) ls — List Files and Directories
ls shows what’s in your current path. It’s simple, but its options are powerful.
Common flags you’ll use daily: – ls -l: long listing (permissions, owner, size, modified time) – ls -a: include hidden files (those starting with a dot) – ls -h: human-readable sizes (e.g., KB, MB) – ls -lah: a common combo for everything at once – ls -lt: sort by time (newest first)
Examples:
ls
ls -l
ls -lah
ls -lt /etc
Why it matters: when you’re working with configs, logs, or wordlists, quickly scanning files and permissions is key.
Deep dive: GNU ls options explained: https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html
Pro tip: colorized ls output helps spot directories and executables at a glance. Kali typically enables this by default.
3) cd — Move Around Like a Pro
cd changes your current directory. It’s how you navigate the filesystem.
Essentials: – cd path: go to a directory – cd ..: go up one level – cd ~: go to your home directory – cd -: go to the previous directory
Examples:
cd ~/lab
cd ..
cd /etc
cd -
Why it matters: speed. Navigating fast is half the battle when working from the terminal.
Time-saver: use Tab to auto-complete paths. Type cd /etc/s and press Tab to see suggestions like ssh or systemd. This avoids typos and speeds you up.
4) mkdir — Create Directories (The Right Way)
mkdir creates new folders. Use it to structure your projects or tool outputs.
- mkdir name: create a single directory
- mkdir -p parent/child/grandchild: create nested directories in one go
Examples:
mkdir reports
mkdir -p notes/engagement-01/logs
Why it matters: organized directories are the difference between “I can find it” and “I lost it.” Many tools let you choose output directories—create them first.
5) cp — Copy Files and Directories
cp copies files or directories. This is how you duplicate configs safely or back up critical files before editing.
Common flags: – cp source dest: copy a file – cp -r dir1 dir2: copy a directory recursively – cp -i: interactive mode (prompts before overwrite) – cp -v: verbose (show what’s being copied) – cp -a: archive (preserves permissions, timestamps, links)
Examples:
cp wordlist.txt wordlist_backup.txt
cp -r /etc/ssh ~/lab/ssh-backup
cp -ai /etc/hosts ~/lab/hosts.backup
Why it matters: copy before you edit. If something breaks, you can revert.
6) mv — Move or Rename Files
mv moves or renames files and directories. It’s how you organize output or fix naming mistakes.
- mv oldname newname: rename
- mv file dir/: move a file into a directory
- mv -i: prompt before overwrite
- mv -n: never overwrite
- mv -v: verbose
Examples:
mv results.txt results-2025-01.txt
mv results-2025-01.txt reports/
mv -i notes.txt notes/notes.txt
Why it matters: clean, clear names help you (and your team) understand what’s what.
Tip: combine with ls -lt to move the newest file quickly:
mv $(ls -t | head -n 1) latest.txt
Caution: subshells and wildcards are powerful; verify with echo first:
echo mv $(ls -t | head -n 1) latest.txt
7) rm — Delete Files Safely (Please Read This One Twice)
rm removes files and directories. It’s permanent by default. There’s no recycle bin.
Common flags: – rm file: delete a file – rm -r dir: delete a directory and its contents (recursive) – rm -i: prompt before deleting (safer) – rm -rf dir: force delete recursively (dangerous—avoid unless you’re absolutely sure)
Examples:
rm old.txt
rm -i sensitive.txt
rm -r old_reports
Important safety habits: – Prefer rm -i to get a prompt before deletion. – Double-check your path with pwd and ls before deleting. – Avoid running rm as root unless necessary. – Be careful with wildcards like *—they can match more than you expect.
Safety tip: make rm interactive by default. Add this alias to your shell config (Kali uses Zsh by default):
echo "alias rm='rm -i'" >> ~/.zshrc && source ~/.zshrc
Here’s why that matters: a single typo in rm -rf can wipe out the wrong directory. Build safe defaults now, not after a mistake.
8) less — View Files Without Overwhelm
less displays file contents one screen at a time. It’s better than cat for long files because you can scroll, search, and exit cleanly.
Usage: – less file: open the file – Space/PageDown/PageUp: navigate – /pattern: search forward – n/N: next/previous match – q: quit
Examples:
less /etc/apt/sources.list
less results.log
Why it matters: logs, tool output, and configs can be long. less lets you skim and search quickly.
Related tools: – head file: show the first lines – tail -f file: watch a file as it grows (great for logs) – zless file.gz: view compressed files
9) chmod — Manage File Permissions
chmod changes permissions on files and directories. In Linux, permissions control who can read, write, or execute. You’ll use this when running scripts, securing files, or preparing tools.
Basics: – Permissions are for user (u), group (g), and others (o) – Each can have read (r), write (w), execute (x) – Use symbolic or numeric modes (e.g., 755, 644)
Common patterns: – chmod +x script.sh: make a script executable – chmod 644 file: owner can read/write; others can read – chmod 600 key: only owner can read/write (good for SSH keys) – chmod -R 755 dir: apply recursively to a directory
Examples:
chmod +x setup.sh
chmod 600 ~/.ssh/id_rsa
chmod -R 755 ~/lab/scripts
Why it matters: tools won’t run without execute permission. Sensitive data should not be world-readable.
Deep dive: – chmod man page: https://man7.org/linux/man-pages/man1/chmod.1.html – File permissions explained: https://help.ubuntu.com/community/FilePermissions
Note: chown changes file ownership (user/group). You’ll need sudo for that:
sudo chown root:root /some/file
Use this with care.
10) man — Help Yourself (and Keep Learning)
man shows manual pages for commands. It’s your built-in documentation.
- man command: open the manual
- /pattern: search within man
- q: quit
- man -k keyword: search by keyword (apropos)
Examples:
man ls
man chmod
man -k permission
Also try: – command –help: quick summary – tldr command: simplified examples (install via apt: sudo apt install tldr)
Why it matters: you won’t memorize everything, and you don’t have to. The best terminal users know how to find answers fast.
References: – Linux man pages: https://man7.org/linux/man-pages/ – TLDR pages: https://tldr.sh
Putting It Together: A Realistic Mini-Workflow
Let’s say you downloaded a script and want to organize it, run it, and save results.
1) Confirm where you are:
pwd
2) Create a project folder:
mkdir -p ~/lab/project-01
cd ~/lab/project-01
3) Move the script in and rename it clearly:
mv ~/Downloads/script.sh recon.sh
4) Make it executable:
chmod +x recon.sh
5) Run it and save output:
./recon.sh > output.log
6) View results:
less output.log
7) Copy results to a reports folder:
mkdir reports
cp output.log reports/recon-2025-01.log
8) Keep things tidy:
ls -lah
You just used most of your essentials in a practical flow. That’s the point: these commands work together.
Tips for Terminal Efficiency (That Beginners Often Miss)
- Use Tab completion. It saves you from typos and speeds up navigation.
- Use history search. Press Ctrl+R, then type a few characters to find a recent command.
- Use clear to tidy the screen, or Ctrl+L to redraw the terminal.
- Quote paths with spaces: cd “My Folder”
- Learn globs (wildcards) safely: *.txt, data-??.log. Read about pattern matching: https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching
- Always back up config files before editing:
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
Bonus Commands You’ll Use All the Time
These aren’t in the “first 10,” but they’re worth learning early.
- grep: search inside files
- grep -i: case-insensitive
- grep -n: show line numbers
- grep -r: search recursively
- Example: grep -in “port” /etc/ssh/sshd_config
Docs: https://man7.org/linux/man-pages/man1/grep.1.html
- find: locate files by name, type, or time
- find . -name “*.conf”
- find /var/log -type f -mtime -1
- Docs: https://man7.org/linux/man-pages/man1/find.1.html
- sudo: run commands as root (minimal use; think twice)
- Docs: https://www.sudo.ws/docs/man/sudo.man/
- apt: manage software on Kali (Debian-based)
- sudo apt update && sudo apt upgrade
- sudo apt install tldr
- Docs: https://wiki.debian.org/Apt
- ip: view network interfaces and routes (modern replacement for ifconfig)
- ip a
- ip r
- Docs: https://man7.org/linux/man-pages/man8/ip.8.html
Common Pitfalls (And How to Avoid Them)
- “Permission denied”: you may lack rights to read, write, or execute. Check with ls -l. Fix with chmod for permissions or sudo for operations requiring root. Only use sudo when necessary.
- Overwriting files by accident: use -i with cp and mv to prompt before overwriting.
- Deleting the wrong thing: avoid rm -rf unless you’ve double-checked. Use aliases to make rm interactive.
- Editing system files without a backup: always make a .bak copy first.
- Running commands in the wrong directory: use pwd first, then ls to confirm contents.
Here’s why that matters: avoiding these mistakes saves hours of recovery—and your sanity.
FAQs: Kali Linux Beginner Questions People Also Ask
Q: Do I need to know Linux to use Kali for penetration testing? A: Yes—at least the basics. Kali is a Linux distribution. Tools rely on Linux paths, permissions, and processes. Learn navigation, file management, and permissions first. It accelerates everything else.
Q: How do I open the terminal in Kali Linux? A: Click the terminal icon on the dock or press Ctrl+Alt+T. Kali often defaults to Zsh, which offers great completion and theming. More: https://www.kali.org/docs/general-use/shell-zsh/
Q: What are the most important commands to start with? A: Start with pwd, ls, cd, mkdir, cp, mv, rm, less, chmod, and man. Then add grep, find, sudo, and apt.
Q: How do I update and upgrade Kali safely? A: Use:
sudo apt update
sudo apt upgrade
Review what will change. For a full distribution upgrade, use:
sudo apt full-upgrade
More: https://www.kali.org/docs/general-use/updating-kali/
Q: Why am I getting “Permission denied” when running a script? A: The script may not be executable. Run:
chmod +x script.sh
./script.sh
If it still fails, check the interpreter line (e.g., #!/bin/bash) and permissions with ls -l.
Q: What’s the difference between cat and less? A: cat prints the whole file to your terminal (great for short files). less lets you scroll and search (better for long files, logs, and configs). For most reading, prefer less.
Q: Can I undo rm? A: Not easily. rm deletes immediately. Use rm -i to prompt before deletion, back up important files, or consider installing a “trash” tool if you prefer a recycle-bin-like workflow.
Q: Is Kali a good first Linux distro? A: Kali can be used as a first distro, but it’s tuned for security work. If your primary goal is learning Linux basics, Ubuntu or Debian might feel friendlier. That said, if your aim is ethical hacking, learning basics on Kali is fine—just be careful with system-level changes.
Q: Where do tools and logs live in Kali? A: Tools are installed under /usr/bin or /usr/share, configs under /etc, and logs often in /var/log. Understanding the filesystem helps a lot: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
Q: What shell does Kali use? A: Kali switched to Zsh as the default shell starting in 2020.4. Bash is still available. You can switch and customize either. Docs: https://www.kali.org/docs/general-use/shell-zsh/
Final Takeaway
Master these 10 commands—pwd, ls, cd, mkdir, cp, mv, rm, less, chmod, and man—and you’ll be dangerous in the best way: fast, precise, and informed. They’re simple, but they compound. The more you use them, the more fluent you become. That fluency carries into everything else in Kali—running tools, parsing output, and keeping your system tidy and secure.
Ready for the next step? Practice these commands in your ~/lab directory today. Then explore your next tier: grep, find, sudo, apt, and ip. If you found this helpful, stick around for more Kali essentials and practical walkthroughs—your future self (and your terminal) will thank you.
Discover more at InnoVirtuoso.com
I would love some feedback on my writing so if you have any, please don’t hesitate to leave a comment around here or in any platforms that is convenient for you.
For more on tech and other topics, explore InnoVirtuoso.com anytime. Subscribe to my newsletter and join our growing community—we’ll create something magical together. I promise, it’ll never be boring!
Stay updated with the latest news—subscribe to our newsletter today!
Thank you all—wishing you an amazing day ahead!
Read more related Articles at InnoVirtuoso
- How to Completely Turn Off Google AI on Your Android Phone
- The Best AI Jokes of the Month: February Edition
- Introducing SpoofDPI: Bypassing Deep Packet Inspection
- Getting Started with shadps4: Your Guide to the PlayStation 4 Emulator
- Sophos Pricing in 2025: A Guide to Intercept X Endpoint Protection
- The Essential Requirements for Augmented Reality: A Comprehensive Guide
- Harvard: A Legacy of Achievements and a Path Towards the Future
- Unlocking the Secrets of Prompt Engineering: 5 Must-Read Books That Will Revolutionize You