New BASH / Linux Cheat Sheet Wallpaper Download Free 4880 x 3050px
The above is just a screenshot of my old version of the wallpaper in use on a Lubuntu VM. Be sure to download the high resolution updated version below.
I made this wallpaper myself. Enjoy!
DOWNLOADS:
White Background: https://drive.google.com/file/d/1GO9frDLEWnFgUm3LqdGPLMfi1cx6tNmv/view?usp=sharing
Dark Gray Background: https://drive.google.com/file/d/1BjCHbiNJzngvKIHFwb846xmauRVM1sbY/view?usp=sharing
Black Background: https://drive.google.com/file/d/1Mbju2yJpFq80DHDGziPbcGF82ezue1dY/view?usp=sharing
Other Syntax Colors: https://drive.google.com/file/d/1a-TvIR3i_r6FNNB46S4kQjRe-e4HBxc9/view?usp=sharing
Want the text file this wallpaper was made from? Here you go:
FILE COMMANDS ls - directory listing ls -al - formatted listing with hidden files cd dir - change directory to dir cd - change to home pwd - show current directory mkdir dir - create directory dir rm file - delete file rm -r dir - delete directory dir rm -f file - force remove file rm -rf dir - remove directory dir rm -rf ~/ - delete system Home directory (NOT GOOD!) cp file1 file2 - copy file1 to file2 mv file1 file2 - rename or move file1 to path/file2 ln -s file link - create symbolic link 'link' to file touch file - create or update file cat > file - place standard input into file more file - output the contents of the file less file - output the contents of the file head file - output first 10 lines of file tail file - output last 10 lines of file tail -f file - output contents of file as it grows SSH ssh user@host - connect to host as user ssh -p port user@host - connect using port p ssh -D port user@host - connect and use bind port INSTALLATION ./configure make make install NETWORK ping host - ping host 'host' whois domain - get whois for domain dig domain - get DNS for domain dig -x host - reverse lookup host wget file - download file wget -c file - continue stopped download wget -r url - recursively download files from url SYSTEM INFO date - show current date/time cal - show this month's calendar uptime - show uptime w - display who is online whoami - who are you logged in as uname -a - show kernel config cat /proc/cpuinfo - cpu info cat /proc/meminfo - memory information man command - show manual for command df - show disk usage du - show directory space usage du -sh - human readable size in GB free - show memory and swap usage whereis app - show possible locations of app which app - show which app will be run by default SEARCHING grep pattern files - search for pattern in files grep -r pattern dir - search recursively for pattern in dir command | grep pattern - search for pattern in the output of command locate file - find all instances of file PROCESS MANAGEMENT ps - display currently active processes ps aux - ps with a lot of detail kill pid - kill process with pid 'pid' kilalt proc - kill all processes named proc bg - lists stopped/background jobs, resume stopped job in the background fg - bring most recent job to foreground fg n - brings job n to foreground FILE PERMISSIONS chmod octal file - change permission of file 4 - read (r) 2 - write (w) 1 - execute (x) order: owner/group/world eg: chmod 777 - rwx for everyone chmod 755 - rw for owner, rx for group/world COMPRESSION tar cf file.tar files - tar files into file.tar tar xf file.tar - untar into current directory tar tf file.tar - show contents of archive tar flags: c - create archive j - bzip2 compression t - table of contents k - do not overwrite x - extract T - files from file f - specifies filename w - ask for confirmation z - use zip/gzip v - verbose gzip file compress file and rename to file.gz gzip -d file.gz - decompress file.gz SHORTCUTS ctrl+c - halts current command ctrl+z - stops current command fg - resume stopped command in foreground bg - resume stopped command in background ctrl+d - log out of current session ctrl+w - erases one word in current line ctrl+u - erases whole line ctrl+r - reverse lookup of previous commands !! - repeat last command exit - log out of current session VIM quitting :x - exit, saving changes :wq - exit, saving changes :q - exit, if no changes :q! - exit, ignore changes inserting text i - insert before cursor I - insert before line a - append after cursor A - append after line o - open new line after cur line O - open new line before cur line r - replace one character R - replace many characters motion h - move left j - move down k - move up l - move right w - move to next word W - move to next blank delimited word b - move to beginning of the word B - move to beginning of blank delimited word e - move to end of word E - move to end of blank delimited word ( - move a sentence back ) - move a sentence forward { - move paragraph back } - move paragraph forward 0 - move to beginning of line $ - move to end of line nG - move to nth line of file :n - move to nth line of file G - move to last line of file fc - move forward to 'c' Fc - move backward to 'c' H - move to top of screen M - move to middle of screen L - move to bottom of screen % - move to associated (),{},[] deleting text x - delete character to the right X - delete character to the left D - delete to the end of line dd - delete current line :d - delete current line searching /string - search forward for string ?string - search back for string n - search for next instance of string N - search for previous instance of string replace :s/pattern/string/flags - replace pattern with string, according to flags g - flag, replace all occurrences c - flag, confirm replaces & - repeat last :s command files :w file - write to file :r file - read file in after line :n - go to next file :p - go to previous file :e file - edit file !!cmd - replace line with output of cmd other u - undo last change U - undo all changes to line COMMAND LINE FU (functions) echo "ls -l" | at midnight - execute a command at a specified time netstat -tlnp - list all listening ports dig +short txt <keyword>.wp.dg.cx - query wikipedia using DNS mount | column -t - mounted filesystems in nice layout sshfs name@server:/path/to/folder /path/to/mount/point - mount filesystem over SSH <space>command - execute command without saving it in history time read (ctrl-d to stop) - stopwatch net rpc shutdown -I ipAddressOfWindowsPC -U username password - remotely shutdown Windows machine (cd /tmp && ls) jump to dir, exec command, jump back to dir man ascii - ascii table ps aux | sort -nk +4 | tail - top 18 running processes sorted by memory usage ctrl-l - clear terminal screen ssh -t reachable_host ssh unreachable_host - ssh through host in the middle telnet towel.blinkenlights.nl - You could watch Starwars via telnet but don't run this dark-web crap. Buy the movie! ping -i 60 -a IP_address - set audible alarm for when IP comes online lsof -i - watch real time network activity echo "!!" > foo.sh - create a script of the last command curl ifconfig.me - get your external/public IP address pushd /tmp - push a directory to a stack, do some work then go back to previous dir by running popd ps aux | grep -i process - find a process you want !* - reuse all parameters from previous command du -s * | sort -n | tail - get 10 biggest files in the current directory mv filename.{old,new} - quickly rename file vim scp://username@host//path/to/somefile - remotely edit a file mkdir -p a/long/directory/path - make dir, with many intermediate dirs chmod --reference filel file2 - copy perms of file1 to file2 ls -d */ - list only the directories vi */pattern [file] - open file in vim, at pattern leave +15 - remind yourself to leave in 15 minutes
STRING MANIPULATION
# Removing ^M Windows line end characters from file sed 's/\r//g' < input.txt > output.txt # Search <pattern> in all files in the pwd grep -RnisI <pattern> * # Recursive search and replace old with new string, in pwd. grep -rl oldstring . |xargs perl -pi~ -e 's/oldstring/newstring' grep -rl oldstring . |xargs sed -i -e 's/oldstring/newstring/' # -e to search and replace, -i edits in place. sed -e 's/dapper/edgy/g' -i /etc/apt/sources.list # recursive search and replace, in pwd and in subdirs find . -type f -exec sed -i s/oldstring/newstring/g {} + grep . * # Read files recursively with file indication # Quickly generate an MD5 hash for a string using OpenSSL echo -n 'text to be encrypted' | openssl md5 # Print text string vertically, one character per line. echo "vertical text" | grep -o '.' # Convert the first character of a string to uppercase echo 'example of the test text' | sed -e 's/^\(.\)/\U\1/' # Convert the first character of every word to uppercase echo 'example of the test text' | sed -e 's/\b\(.\)/\u\1/g' # Convert all characters in a string to uppercase echo 'example of the test text' | tr '[:lower:]' '[:upper:]' # Convert all characters in a file to lowercase cat file.txt | tr '[:upper:]' '[:lower:]' # Convert all characters in a file to uppercase cat file.txt | tr '[:lower:]' '[:upper:]' # output both to the screen (stdout) and to the file. ls | tee file # You can pipe your output to multiple files and stdout ls | tee file1 file2 file3 #append to the file using the –a option $ ls | tee –a file
Comments
Post a Comment