Terminal cheatsheet
Some terminal commands that I use repeatedly but not enough that I don’t have to keep looking them up. Credit goes to friend and fellow OSU grad student Joseph Rossetti for many of these.
SSH login
ssh -l username name_of_remote_serverTransfer files between remote and local machines
# From me to remote server
scp my/directory/datafile.txt username@remote_server:/remote/directory
# From remote server to me
scp username@remote_server:/remote/directory/datafilet.txt my/directory/Screen
Screen lets you open multiple windows in Unix. It also lets you run processes after you’ve logged off a remote server or lost connection for some reason.
Start new session
screen -S name_of_new_windowYou don’t necessarily have to name a session but I think it’s helpful to.
List current screen sessions
screen -lsGo to a particular screen session
screen -r name_of_sessionDetach from a session
ctrl + a + dExit screen session
# While in the session
exit
# While detached from the session (http://stackoverflow.com/questions/1509677/kill-detached-screen-session)
screen -X -S [session # you want to kill] quit
Leave a Comment