r/sysadmin • • Oct 31 '22

Question What software/tools should every sysadmin have on their desktop?

Every sysadmin should have ...... On their desktop/software Toolkit ??

Curious to see what tools are indispensable in your opinion!

Greetings from the Netherlands

1.8k Upvotes

972 comments sorted by

View all comments

Show parent comment

1

u/sine-wave UNIX Admin Nov 15 '22

Linux sysadmin for 6 years before I knew of either. Been using screen for the last 6, maybe it’s time for tmux for the next 6.

1

u/[deleted] Nov 15 '22

I just sat down for an evening, went thru manual and switched.

I made sure my tmux bindings are similiar as my terminal ones, for example my bindings to "split window" are - and \ (|) character. So in terminal, splitting window is C-S-\, in tmux is C-b \ etc.

I actually prefer it using C-b by default because screen's default of C-a collides with shell/emacs "jump to beginning of string" shortcut.

I also made a function that's rough equivalent of screen -D -R ("attach to existing session main, create if not exist"), but it ended up being quite long

ᛯ which mux      
mux () {
sessions=$(tmux list-sessions) 
if echo $sessions | grep --color=auto -q -P '^main:'
then
	session_id=$$ 
	tmux new-session -t main -s $session_id -d
	if [ "z$1" != "z" ]
	then
		window=$(tmux new-window -d -P -- $@) 
	fi
	tmux attach-session -t $session_id \; set-option destroy-unattached on \; select-window -t "$window"
else
	tmux new-session -A -s main $@
fi
}