Skip to content

Instantly share code, notes, and snippets.

@kirksw
Last active March 25, 2020 14:48
Show Gist options
  • Save kirksw/a5d943666b3536be03dc90b97ca32f7d to your computer and use it in GitHub Desktop.
Save kirksw/a5d943666b3536be03dc90b97ca32f7d to your computer and use it in GitHub Desktop.

Linux Reference General

  1. Check kernel version

uname -a (-a = all)

  1. Check current IP
ifconfig
ip addr
ip addr show eno2 # specifically for eno2
  1. Amount of free disk space
df
df -ah # a - all, h - human readable
  1. Service management

systemd

sudo systemctl enable service
sudo systemctl start service
sudo systemctl enable --now service (enables and starts)
sudo systemctl status service
sudo systemctl stop service
sudo systemctl disable service

legacy

service udev status
service udev start
...
  1. Check size of directory
du ./folder
du -sh ./folder # s - summarize, h - human readable
  1. Check open ports
netstat
netstat -tulpn # tcp/udp 
  1. Check to check resource usage

specific process

ps aux | grep process_name

general overview

top
htop
  1. Mounting devices
mount /dev/sda2 /mnt/usb
mount # list mounts

Note: boot mounts are set in fstab.

  1. Man pages
man <command>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment