Productivity
Coding
Video and graphics
System and file repair
sudo fsck -f /dev/sdXNsudo apt --fix-broken installsudo dpkg --configure -asudo kill -9 $(pgrep program)
fsck must run on an unmounted partition, never on the active root filesystem while the system is running.
Network and connectivity
sudo resolvectl flush-cachessudo systemctl restart NetworkManagerping google.com
System information
hostnamectlsudo dmidecode -s system-serial-number
Advanced tools
sudo apt autoremove && sudo apt cleansudo reboot
Application administration
Clear terminal history
cat /dev/null > ~/.bash_history && history -c && exit
Clear APT and Flatpak caches
flatpak uninstall --unusedflatpak repairflatpak update --appstreamflatpak pin --remove <runtime-id>flatpak pinsudo apt cleansudo rm -rf /var/cache/apt/archives/*sudo apt updatesudo apt upgradesudo apt full-upgradeflatpak update -y
Firewall
Debian uses ufw (Uncomplicated Firewall) as a simple front end for iptables.
sudo ufw statussudo ufw enablesudo ufw allow 22/tcpsudo ufw reload
Copying files via terminal
cp file.txt ~/Backup/rsync -av Source/ Destination/scp file.txt user@host:/path/
Disk usage and storage
df -hfor total and free space per filesystemdu -sh *to see folder sizes in the current directory
Scheduled tasks
crontab -efor traditional cron-style schedulingsystemctl list-timersto view active systemd timers
Compression and archiving
zip -r archive.zip folder/andunzip archive.ziptar -czvf archive.tar.gz folder/andtar -xzvf archive.tar.gz
