

Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!


Bash Commands Bash Commands uname -a Show system and kernel head -n1 /etc/issue Show distribution mount Show mounted filesy‐ stems date Show system date uptime Show uptime whoami Show your username
Bash Shortcuts Bash Shortcuts CTRL-c Stop current command CTRL-z Sleep program CTRL-a Go to start of line CTRL-e Go to end of line CTRL-u Cut from start of line CTRL-k Cut to end of line CTRL-r Search history !! Repeat last command
!$ Last argument of previous command ALT-. Last argument of previous command !* All arguments of previous command
Bash Variables Bash Variables env Show environment variables
variable Bash Variables (cont) Bash Variables (cont)
$PATH Executable search path $HOME Home directory $SHELL Current shell IO Redirection IO Redirection
stdout to same place as stderr
stderr to same place as stdout
Pipes Pipes
Command ListsCommand Lists
Directory OperationsDirectory Operations pwd Show current directory
cd .. Go up a directory ls List files ls Optionsls Options -a Show all (including hidden) -R Recursive list -r Reverse order -t Sort by last modified -S Sort by file size -l Long listing format -1 One file per line -m Comma-separated output -Q Quoted output Search FilesSearch Files
grep -i Case insensitive search grep -r Recursive search grep -v Inverted search grep -o Show matched part of file only
By Dave ChildDave Child (DaveChild) cheatography.com/davechild/ aloneonahill.com Published 28th October, 2011. Last updated 29th February, 2020. Page 1 of 2. Sponsored by CrosswordCheats.comCrosswordCheats.com Learn to solve cryptic crosswords! http://crosswordcheats.com
Search Files (cont) Search Files (cont)
search of system index) File Operations File Operations
Concatenate files and output
Watch a Command Watch a Command watch -n 5 'ntpq -p' Issue the 'ntpq -p' command every 5 seconds and display output Process Management Process Management ps Show snapshot of processes top Show real time processes
Nano Shortcuts Nano Shortcuts Files Files Ctrl-R Read file Ctrl-O Save file Ctrl-X Close file Cut and Paste Cut and Paste ALT-A Start marking text CTRL-K Cut marked text or line CTRL-U Paste text Navigate File Navigate File ALT-/ End of file CTRL-A Beginning of line CTRL-E End of line CTRL-C Show line number CTRL-_ Go to line number Search File Search File CTRL-W Find ALT-W Find next CTRL-\ Search and replace More nano info at: http://www.nano-editor.org/docs.php Screen Shortcuts Screen Shortcuts screen Start a screen session. screen -r Resume a screen session. Screen Shortcuts (cont)Screen Shortcuts (cont) screen -list Show your current screen sessions. CTRL-A Activate commands for screen. 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. CTRL-A " Show current instances of terminals. CTRL-A A Rename the current instance. More screen info at: http://www.gnu.org/software/screen/ File PermissionsFile Permissions
File Permission NumbersFile Permission Numbers First digit is owner permission, second is group and third is everyone. Calculate permission digits by adding numbers below. 4 read (r) 2 write (w) 1 execute (x) By Dave ChildDave Child (DaveChild) cheatography.com/davechild/ aloneonahill.com Published 28th October, 2011. Last updated 29th February, 2020. Page 2 of 2. Sponsored by CrosswordCheats.comCrosswordCheats.com Learn to solve cryptic crosswords! http://crosswordcheats.com