Skip to content

Instantly share code, notes, and snippets.

View Ferohers's full-sized avatar
🌴
On vacation

Ferohers

🌴
On vacation
View GitHub Profile
@Ferohers
Ferohers / auto-start-tmux-ssh.txt
Created July 23, 2024 07:37 — forked from ThomasLeister/auto-start-tmux-ssh.txt
Put this into your .bashrc to auto-start a tmux session after SSH login
Put these lines into your server's .bashrc:
##
## TMUX auto attach
##
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session
if which tmux >/dev/null 2>&1; then # check if tmux is installed
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux"
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session
@Ferohers
Ferohers / timemachine.md
Created June 7, 2023 19:08 — forked from HudsonNicoletti/timemachine.md
TimeMachine HomeServer

Time Machine HomeServer

So lets install the dependencies ( I am running ubuntu server 2021 )

$ sudo apt install netatalk
$ sudo apt install avahi-deamon