LINUX • DEBIAN • BASH • JAVA - CHEAT SHEET v19-02-23 Update
A short summary of my personal favorite Linux tools.

Image source: Willi Glenz - Screenshot Desktop
# visudo
$ gnome-characters
$ mpg123 -zvC /home/userxyz/music/*
# tasksel
# tasksel --list-tasks
# service --status-all | less
# service ssh status
# service apache2 start | restart | stop
# apt-get install printer-driver-cups
# ufw status
| TOOL | HOMEPAGE | DOWNLOAD | DOCUMENTATION | TUTORIAL |
|---|---|---|---|---|
| linux | home | kernel | docu | javatpoint.com |
| debian | home | smallcd | docu | debiantutorials.com |
| gnome | home | download | docu | gnome.org |
| update | visudo taskwarrior primitive data types taskwarrior eclipse ssh perl tiddlywiki shortcuts vim crontab tripwire sources permaculture screen java r monitoring cups alias network check scp debian lfs virtualbox python awk html this week • visudo taskwarrior cherrytree primitive data types eclipse last week • ssh perl taskwarrior tiddlywiki shortcuts vim eclipse crontab tripwire |
|---|---|
| task | $ task burndown.daily; task burndown.weekly; task burndown.monthly $ task add project:Running Kissinger Runde; timew running start taskwarrior |
| cherrytree | homepage documentation |
| java | primitive data types java |
| eclipse | ^F11 alt + F11 ^m eclipse |
| networking | H • hostname netstat ifconfig ip iwconfig N • mtr ping traceroute nslookup ssh scp |
| programming | perl r python awk html javac txt2regex netbeans intellij-idea spyder3 drjava bluefish |
| gnu core utilities | basic operations • cp dd install mv rm shred output • cat tac nl od base32 bas64 head tail split csplit formatting • fmt pr fold summarizing • wc sum cksum b2sum md5sum sh1sum sha224sum sha225sum sort • sort shuf uniq comm ptx tsort fields • cut paste join characters • tr expand unexpand directories • ls dir vdir dircolors special file types • link ln mkdir mkfifo mknod readlink rmdir unlink attributes • chown chgrp chmod touch disk usage • df du stat sync truncate printing • echo printf yes conditions • false true test expr redirection • tee file name manipulation • basename dirname pathchk mktemp realpath working context • pwd stty printenv tty user information • id logname whoami groups users who system context • date arch nproc uname hostname hostid uptime sellinux context • chcon runcon modified command invocation • chroot nv nice nohub stdbuf timeout process control • kill delaying • sleep numeric operations • factor numfmt seq fhs coreutils $ info coreutils |
| terminal | tilda guake tmux terminator gnome-terminal gedit gvim mcedit nano • history shortcuts screen alias one-liner bash fish |
| vim | macro qa :reg a @a mark m1 '1 `1 vim |
| crontab | # crontab -e # service cron status crontab |
| tripwire | # tripwire --init # tripwire --check --verbose tripwire |
| rsync | $ rsync -avzP --delete --stats --exclude ’Backup*‘ /home/user/ /media/xyz $ rsync -avzP --delete --stats --exclude-from '/home/user/exclude.txt' /home/user/ /media/xyz |
| documentation | sources man info pinfo apropos whatis help history |
| monitoring | conky kismet bleachbit nagios zabbix cacti ganglia opennms chkrootkit |
| configuration | language swapon gnome-tweak-tool bashrc |
| gui-apps | libreoffice localc lowriter lobase lodraw loimpress lomath loweb gnome-todo |
| printing | cups • lpstat lpq lp lpr cancel • lpadmin lpmove lpc tunelp accept reject enable disable |
| hardware | raspi raspi-config rpi-update • gnome-disks badblocks blkid fdisk • lsblk lshw lspci lsusb • hwinfo e4defrag administration |
| os | debian lfs arch • virtualbox tasksel administration |
| backup | backintime timeshift • grsync rsync |
| user | U • adduser useradd • deluser userdel • addgroup groupadd • usermod chage chfn finger whatis which w whoami passwd id G • delgroup groupdel groups newgrp administration |
| multimedia | vlc youtube-dl simplescreenrecorder |
| processes | kill killall • htop atop top • jobs bg fg administration |
| server | dhcp pi-hole raspiblitz |
| A | apt-get alacarte apt apt-cache apt-config apt-key apt-cdrom archivemount asunder |
| B | basket bc |
| C | curl cal cherrytree clear clipit cmatrix cut |
| D | df dmesg dpkg |
| E | eog exit |
| F | finger for free fuser |
| G | git glances gnome-clocks gnome-disks gparted groupmod grsync grub-mkconfig |
| H | hostname hostnamectl |
| L | lxc lastlog locate lsb_release lvm |
| M | man menulibre mc more mount |
| N | nl nano ncal netatop netstat nmap |
| O | open |
| P | perldoc pinfo popd pushd pwgen |
| R | R |
| S | script scp sed service set sftp shellcheck steghide stat sudo su sync visudo |
| T | tiddlywiki thunderbird tune2fs |
| U | ufw umask uniq update-alternatives updatedb uptime users |
| V | visudo veracrypt vimtutor |
| W | watch w3m |
| X | xdotool xsel |
• alias t='clear; task; timew week; timew'
# chown userXYZ file.txt
$ cmatrix -s -u 9
$ curl rate.sx/steem@90d
$ dd if=/dev/cdrom of=/tmp/isofile.iso
$ df -hT
$ for x in *; do mv "$x" "${x,,}"; done
$ hostname; hostname -d; hostname -f; hostname -i
$ java -jar filename.jar
$ sort -t: -k1 -n /etc/passwd
$ speedtest
$ ssh -X [email protected]
$ stat /home/user
$ timew start | stop | continue
$ tree ~/Downloads
$ type date; type echo
$ umask -S
$ ls -l | xsel --clipboard
$ ^z jobs fg bg
BACKUP
$ archivemount archive.tar.gz ~/mnt/
# dd if=/dev/sdABC of=/dev/sdXYZ bs=64K conv=noerror,sync
$ tar -cvzf ~/backup/backup.tar.gz ~/java
$ tar -tvf backup.tar.gz
$ ssh [email protected] "tar -zcf - /home/user/scripte" > scripte.tar.gz
CRONTAB
# crontab -e
DU
# du -hs / 2> /dev/null
$ du -h --max-depth=1 | sort -rh
$ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e'
FIND
$ find -size +100M | less
# find /home -user userxyz -size +1G
$ find . -name "*.jpg" -exec convert {} -scale 50% +repage {} \;
$ find ~ -maxdepth 1 -type f -exec grep "^alias " '{}' \; -print
$ find ~ -maxdepth 1 -type f -mtime 3
$ find ~ -maxdepth 1 -type f -exec grep "^alias " '{}' \; -print
# find / -uid 1000 -exec chown -v 1002:1002 {} \;
# find / -user userxyz -type f -exec rm -f {} \;
$ find /etc -type f -print 2> /dev/null | less
$ find /etc/*tab -type f -print
# find /home -user userxyz -mtime -3
MAIL
# apt-get install mailutils-doc; info mailutils
$ mail
$ from
MANPAGES
$ man hier
$ man ascii
MONITORING
$ watch -d -n 5 ls -l
MD5SUM
$ md5sum abc.txt
$ md5sum abc.txt > abc.md5
$ md5sum -c abc.md5
PACKAGES
$ apt list --installed | less
$ apt list --installed | grep vim
$ apt list --installed | wc -l
$ dpkg -L vim-doc
SERVICES
# tasksel
# tasksel --list-tasks
# service --status-all | less
# service ssh status
# service cron status
# service apache2 start | restart | stop
# apt-get install printer-driver-cups
# ufw status
SUDO
# visudo
> Defaults:userxyz timestamp_timeout=30
TASKWARRIOR & TIMEWARRIOR
$ task calendar 2019
# task 1 edit
$ timew start | stop | continue