admin:linux:cli:shell_tricks

Shell Tricks

Alt + .
Esc, .
Add last argument of most recent command.
Ctrl + A
Ctrl + E
Jump to start or end of the line.
md5sum -c - <<<"b4460802b5853b7bb257fbf071ee4ae2 file_name.ext"
shuf -n 4 /usr/share/dict/ngerman
losetup --partscan --find --show sd.img
lsblk | grep loop
mount /dev/loop0p2 sd/
ssh -t user@host /bin/bash
mkpasswd # on debian
openssl passwd -crypt myPassword
tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/sdx0
# Use 446 bytes to overwrite or restore your /dev/XYZ MBR boot code only with the contents of $mbr.backup.file.
# Use 512 bytes to overwrite or restore your /dev/XYZ the full MBR (which contains both boot code and the drive’s partition table) with the contents of $mbr.backup.file.
dd if=/dev/sdx of=mbr.img bs=512 count=1
badblocks -t random -wsv /dev/disk/by-id/drive-id
diff -rq dir1 dir2
passwd -d USERNAME
usermod -U USERNAME
chmod 0 /usr/bin/gnome-keyring-daemon
mount -o remount,rw,hidepid=2 /proc
sudo X :2 -configure
cat /proc/cmdline
  • Last modified: 2020-04-11 14:27