Linux

Resource

Related

Bash Commands

Bash Commands

Bash Shortcuts

Bash Shortcuts

  • ^abc-^-123
  • Run previous command, replacing abc with 123
  • !!
  • Repeat last command
  • !*
  • All arguments of previous command
  • !abc
  • Run last command starting with abc
  • !abc:p
  • Print last command starting with abc
  • !$
  • Last argument of previous command
  • ALT-.
  • Last argument of previous command
  • CTRL-a
  • Go to start of line
  • CTRL-c
  • Stop current command
  • CTRL-e
  • Go to end of line
  • CTRL-k
  • Cut to end of line
  • CTRL-r
  • Search history
  • CTRL-u
  • Cut from start of line
  • CTRL-z
  • Sleep program

Bash Variables

Bash Variables

IO Redirection

IO Redirection

Pipes

Anchros

Command Lists

Command Lists

Directory Operations

Directory Operations

  • cd ..
  • Go up a directory
  • cd dir
  • Change directory to dir
  • ls
  • List files
  • mkdir dir
  • Make directory dir
  • pwd
  • Show current directory

ls Options

ls Options

  • -1
  • One file per line
  • -a
  • Show all (including hidden)
  • -l
  • Long listing format
  • -m
  • Comma--sep-arated output
  • -Q
  • Quoted output
  • -R
  • Recursive list
  • -S
  • Sort by file size
  • -t
  • Sort by last modified

Search Files

Search Files

File Operations

File Operations

Process Management

Process Management

  • kill pid
  • Kill process with id pid
  • killall name
  • Kill all processes with names beginning name
  • pkill name
  • Kill process with name name
  • ps
  • Show snapshot of processes
  • top
  • Show real time processes

Nano Shortcuts

Files

Images

  • ALT-A
  • Start marking text

Navigate File

Search File

Screen Shortcuts

Screen Shortcuts

  • CTRL-A "
  • Show current instances of terminals.
  • CTRL-A A
  • Rename the current instance.
  • CTRL-A c
  • Create a new instance of terminal.
  • CTRL-A n
  • Go to the next instance of terminal.
  • CTRL-A p
  • Go to the previous instance of terminal.
  • screen
  • Start a screen session.
  • screen -list
  • Show your current screen sessions.
  • screen -r
  • Resume a screen session.

File Permissions

File Permissions