title: Linux Examples breadcrumbs:
gdisk <dev>
or fdisk <dev>
mkfs.<fs> <dev>
mount -a
to make sure it doesn't have errors that may cause boot to fail.systemctl daemon-reload
to avoid having systemd remount stuff that was removed from fstab or other weird shit.find / -user <UID>
find / -nouser
find / -perm /4000
find <dir> \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/123/456/g'
-type d -name .git -prune
skips .git
directories and can be excluded outside of git repos.du -sh <dirs>
k4dirstat
)shred --remove --zero <file>
lolcat
cowsay
fortune
lshw
-X
to show GUI (requires lshw-gtk
).lstopo
(requires hwloc)
lstopo
will try to present as a GUI. Use lstopo-no-graphics
to force console output.lspci
lsblk
lsusb
lscpu
apt rdepends --installed <package>
add-apt-repository <repo-line
/etc/apt/sources.list
, where you can manually remove it again.apt-key list
apt-key del <key-id>
pub
line or as the last 8 hex digits on the continuation line.nload <if>
iftop -i <if>
speedometer -t <if> -r <if> [...]
nethog
speedtest
(the official one, not speedtest-cli
)iperf3
netstat -tulpn
tu
for TCP and UDP, l
for listening, p
for protocol, n
for numerical post numbers.ss <options>
ip -s link
netstat -i
ip [-46] a
ip <-46> a show scope global
ip n
ip r
& ip -6 r
netstat -r
netstat -g
nstat
netstat -s
(statistics)echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo powersave | ...
grep "cpu MHz" /proc/cpuinfo | cut -d' ' -f3
tail -n +1 /sys/devices/system/cpu/vulnerabilities/*
hdparm -t <dev>
(safe)iostat [-dxpm] [-t] [interval]
-d
: Show only device usage.-x
and -p
: Include extended attributes and partitions.-t
and interval: Show timestamp and repeat every x seconds.iotop -o [-a]
/etc/debian_version
/etc/redhat-release
/etc/centos-release
uname -a
lsb_release -a
uptime
iostat [-c] [-t] [interval]
ps
(e.g. ps aux
or ps ax o uid,user:12,pid,comm
)htop
glances
ytop
irqtop
watch -n0.1 /proc/interrupts
stress-ng -c $(nproc) -t 600
woeusb
from ppa:nilarimogard/webupd8
.{% include footer.md %}