Useful commands
Find which package contains a particular file π
apt-file
Consume CPU resources π
cat /dev/zero > /dev/null
Check which shells are available π
cat /etc/shells
Show largest folder/files π
du -a -BM . | sort -n -r | head -n 30
Set environment variables in bash π
export VAR=abc
Check what type of file something probably is π
file
Search for a file/folder π
find -name "PATTERN"
Show command history π
history
Show IP Addresses π
ip -c a
Show default gateway and routes π
Source: https://www.rootusers.com/how-to-display-routing-table-in-linux/
ip -c r
See installed kernels π
find /boot/vmli*
Consumes RAM (And CPU) π
memtester
Show network devices π
nmcli device status
Check which shell is in use π
ps -p $$
Get SHA1 hash of a file π
sha1sum
Get SHA256 hash of a file π
sha256sum
Start Discord Minimized π
snap run discord --start-minimized
Get file βpropertiesβ π
stat
Check system to see which sensors are available π
sudo sensors-detect
See bluetooth logs π
sudo systemctl status bluetooth
Get a checksum for a file π
Source: https://www.baeldung.com/linux/sha-256-from-command-line
The source also shows how to verify against the checksum file
sha256sum my_file.txt
sum my_file.txt
Get checksum for a string π
echo string | sha256sum
Manage TexLive Packages π
Was already installed on my system not sure from where or when
tlmgr
Move files to trash from command line π
trash
Check version of linux in use π
uname -a
See power status for connected devices π
upower --dump
Watch the sensor stream π
watch sensors