Skip to content

Instantly share code, notes, and snippets.

@BeKnowDo
Last active December 4, 2020 15:00
Show Gist options
  • Save BeKnowDo/af9e9b093f4bea032d964dfef28befe7 to your computer and use it in GitHub Desktop.
Save BeKnowDo/af9e9b093f4bea032d964dfef28befe7 to your computer and use it in GitHub Desktop.
Common Linux Commands

Common Linux Commands

The purpose of this this is to document every day commands we use in the terminal on linux based systems.
(we'll use ZSH as our shell)

Copy files to/from a remote server

The directory on the left is where you're coping FROM
scp -r /YOUR_LOCAL_DIRECTORY YOUR_USER_NAME@REMOTE_SERVER_IP:REMOTE_SERVER_DIRECTORY

Compressing Files

tar -zcvf archive-name.tar.gz directory-name

Extracting Files

tar -zxvf COMPRESSED_FILE_NAME.tar.gz -C /YOUR_DESIRED_DIRECTORY

Screen

Screen is screen/terminal manager for linux. This allows you to continue any running process you begin through an SSH session To begin a screen session, type the following: screen -S NAME_OF_YOUR_SESSION To detach a screen session, type the following: CTRL + A and then CTRL+ D To bring back a screen session, type the following: screen -r NAME_OF_YOUR_SESSION

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment