Here's a comprehensive list of Kali Linux commands.
-
Get system information:
uname -a
-
Get detailed system information:
lsb_release -a
-
List hardware information:
lshw
-
Check available disk space:
df -h
-
Check memory usage:
free -h
-
List all running processes:
ps aux
-
Get detailed information about a specific process:
ps -p <PID> -o pid,comm,%cpu,%mem,etime
-
List all installed packages:
dpkg -l
-
Check system uptime:
uptime
-
Get current date and time:
date
-
List files and directories:
ls -la
-
Create a new directory:
mkdir directoryname
-
Delete a directory:
rm -rf directoryname
-
Copy files:
cp sourcefile destinationfile
-
Move files:
mv sourcefile destinationfile
-
Delete files:
rm filename
-
Search for files:
find /path/to/search -name filename
-
Find files containing specific text:
grep -r "searchtext" /path/to/search
-
Get file or directory size:
du -sh filename
-
Get the last modified date of a file:
stat filename
-
Rename a file:
mv oldname newname
-
Ping a host:
ping hostname
-
Trace route to a host:
traceroute hostname
-
Test network connection to a port:
nc -zv hostname port
-
View routing table:
netstat -rn
-
Flush DNS cache:
sudo systemd-resolve --flush-caches
-
Display network interfaces:
ip a
-
Display network connections:
ss -tuln
-
List open ports:
sudo lsof -i -P -n
-
Show firewall rules (using iptables):
sudo iptables -L
-
Show firewall rules (using ufw):
sudo ufw status verbose
-
Configure a static IP address (using netplan for modern systems):
sudo nano /etc/netplan/01-netcfg.yaml
-
List all users:
cut -d: -f1 /etc/passwd
-
Add a new user:
sudo adduser username
-
Delete a user:
sudo deluser username
-
Add a user to a group:
sudo usermod -aG groupname username
-
Remove a user from a group:
sudo deluser username groupname
-
List all groups:
cut -d: -f1 /etc/group
-
Check file permissions:
ls -l filename
-
Change file permissions:
chmod 755 filename
-
Change file ownership:
chown user:group filename
-
Check process usage:
top
-
Stop a process by PID:
sudo kill <PID>
-
Start a process:
./processname
-
View system logs:
sudo journalctl
-
View specific log entries:
sudo journalctl -u servicename
-
Clear logs:
sudo journalctl --vacuum-time=1d
-
View authentication logs:
sudo cat /var/log/auth.log
-
Update package list:
sudo apt update
-
Upgrade all packages:
sudo apt upgrade
-
Install a new package:
sudo apt install packagename
-
Remove a package:
sudo apt remove packagename
-
Search for a package:
apt search packagename
-
Show package details:
apt show packagename
-
Clean up package cache:
sudo apt clean
-
Nmap (Network scanner):
nmap -A target
-
Netcat (Network utility):
nc -l -p port
-
Metasploit Framework (Exploit framework):
msfconsole
-
Burp Suite (Web vulnerability scanner):
burpsuite
-
Wireshark (Network protocol analyzer):
wireshark
-
Aircrack-ng (Wireless network security):
airodump-ng wlan0
-
John the Ripper (Password cracking):
john --wordlist=/path/to/wordlist.txt /path/to/passwordfile
-
Hydra (Password cracking):
hydra -l username -P /path/to/passwordfile target service
-
SQLmap (SQL injection):
sqlmap -u "http://target/vulnerable.php?id=1" --dbs
-
Nikto (Web server scanner):
nikto -h http://target
-
Run a file system check:
sudo fsck /dev/sdX
-
Update the system:
sudo apt update && sudo apt upgrade
-
Reboot the system:
sudo reboot
-
Shutdown the system:
sudo shutdown now
-
Monitor system resources:
htop
-
Check CPU usage:
mpstat
-
Monitor network traffic:
iftop
-
View disk usage:
df -h
-
Monitor disk I/O:
iostat
-
Check battery status:
upower -i /org/freedesktop/UPower/devices/battery_BAT0
-
Manage power settings:
sudo pm-powersave
This list includes commands for general system administration, as well as specialized tools for security testing and penetration analysis commonly used in Kali Linux. These commands cover a broad range of functionality and should be useful for both managing and securing Linux systems.