Table of Contents

Linux Terminal / bash

Shutdown later (at)

https://www.computerhope.com/unix/uat.htm

when leaving office with running processes

sudo at 20:55
shutdown -h now
  # press Ctrl + d

# relative:
sudo at now + 2 hours
sudo at now + 30 minutes

Lock screen (usually Windows key + L) and leave

Bash Console tricks

Tab key

try tab for autocompletion - sometimes even twice

to previous directory

cd -

to home directory

cd ~
# or simpler:
cd

browse/search history

or

or

history |grep term

keyboard shortcuts

check all with bind -p

aliases and functions

https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias

reuse/insert last item from previous command

reuse/insert full last command line, e.g. for sudo

sudo !!

combine multiple commands

following command prints just “hello”

false || false || echo hello || echo world

display output as table

cat /etc/passwd | column -t -s :

history handling with multiple terminals

nano: delete line(s)

https://monovm.com/blog/how-to-delete-line-in-nano-delete-all/