devop:terminal
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
- simply use arrow up/down
or
Ctrl + r
and continue with search termCtrl + r
again for multiple/next matchCtrl + c
to abort
or
history |grep term
keyboard shortcuts
check all with bind -p
Alt + .
prints last argument from previous commandCtrl + x + *
expand glob/starCtrl + arrow
move by wordAlt + f
move to next wordAlt + b
move to prev wordCtrl + u
to delete line to begin of lineCtrl + k
to delete line to end of lineCtrl + l
clear screen (lowerL
)
aliases and functions
reuse/insert last item from previous command
- write
!$
Alt + .
reuse/insert full last command line, e.g. for sudo
sudo !!
combine multiple commands
;
execute sequentially&&
execute next on success|
|
execute next on fail - until first success
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/
Ctrl + Shift + 6
starts markCtrl + K
deletes marked region
Links
- terminal over web
- improved tree
- sparklines:
- generate/analyze/convert colors:
- socket statistics
- ultimate plumber
- analyzing server performance
- fzf: cli fuzzy finder
- thefuck - correct previous console command
- leyrer
- tmux @ GPN18: https://www.youtube.com/watch?v=JhKXOYepX2E
- cli tools @ GPN18: https://www.youtube.com/watch?v=OlQMXu4yCGk
- cli tools @ GPN19: https://www.youtube.com/watch?v=8d8-PpcLc24
- allein zu haus: https://www.youtube.com/watch?v=uEEHq6f8RsM
- Sven Guckes (RIP)
- Grazer Linuxtage (GLT) 2010: https://www.youtube.com/watch?v=lpfurbNXzHM
- Grazer Linuxtage (GLT) 2013: https://www.youtube.com/watch?v=pl1yfqy20Gk
-
- figlet, toilet,
- kielux 2015: https://www.youtube.com/watch?v=prSBaBj-xEA
- Grazer Linuxtage (GLT) 2016: https://www.youtube.com/watch?v=evq2XqSjHDs
- FrOSCon Map 2016: https://www.youtube.com/watch?v=EL6ne4oSjjc
- LUGA 2917: vim fuer Fortgeschrittene 1: https://www.youtube.com/watch?v=YGVeNNFLIBM
devop/terminal.txt · Last modified: 2023/12/26 (external edit)