This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set these in your .bash_profile, .bashrc, .zshrc first | |
HISTFILESIZE=100000 # how many lines to keep total | |
HISTSIZE=100000 # how many lines to keep for the current session | |
# oh-my-zsh will default to a reasonable 10000, but most bash defaults to a few hundred | |
# oh-my-zsh by default appends all commands to history after they are run instead of on session end | |
# search the history with control-r | |
# search for commands starting with the one you typed with alt-p | |
# if you don't want something to stay in your history, prefix the command with a space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using screen to maintain sessions on a remote machine. (This also just works locally). | |
# ssh into your remote host e.g. ssh user@host | |
# sets up a screen session called mysession | |
screen -S mysession | |
# Exiting the terminal (e.g. shutting your laptop) will "detach" the screen session (i.e. run it in the background). | |
# To see what screen sessions are running: | |
screen -ls | |
# To reconnect | |
screen -R mysession # resumes a detached session or creates one if it doesn't exist |