Useful Linux Commands Flashcards
You must know all of these 100%
Show system information
uname -a
Display memory usage
free -h
Show disk space usage
df -h
Show disk usage per directory
du -sh [directory]
Show running processes
ps aux
Show real-time system resource usage
top
Interactive system monitoring tool
htop
Show system uptime and load average
uptime
Display last system boot time
who -b
Show currently logged-in users
who
Show last login history
last
Check system logs
journalctl -xe
Show kernel logs
dmesg
Display open network connections
netstat -tulnp
Display listening ports
ss -tulnp
Display current network interfaces and IP addresses
ip a
Restart a service
systemctl restart [service]
Stop a service
systemctl stop <service></service>
Start a service
systemctl start [service]
Enable a service to start on boot
systemctl enable [service]
Disable a service from starting on boot
systemctl disable [service]
Check service status
systemctl status [service]
List all active services
systemctl list-units –type=service
Show disk partitions
lsblk