Common Commands Cheat Sheet by mmorykan via cheatography.com/89673/cs/20411/
Scripting Scripting (cont) GitHub bash filename - Runs script sleep value - Forces the script to wait value git clone
By mmorykan Published 18th December, 2019. Sponsored by CrosswordCheats.com cheatography.com/mmorykan/ Last updated 28th January, 2020. Learn to solve cryptic crosswords! Page 1 of 2. http://crosswordcheats.com Common Commands Cheat Sheet by mmorykan via cheatography.com/89673/cs/20411/
Package / Networking (cont) User/Root Commands (cont) File and Directory Manipul ation (cont) tracer oute -I - Gives list of IPs the machine chmod 1777 filename - Sets all permiss ions awk '{print $1,$2,$3}' filename - Prints first, went through and a sticky bit second, third words of each line wget - Downloads file from internet sort - Sorts lines of text files Samba brctl, nmcli - Creates bridging between vi filename - Opens text editor for file. Hard ports smbpas swd - Sets server password to use file filename - Gives informa tion on file Other Stuff File and Directory Manipul ation more filename - Displays file contents (no Ctrl - U - Deletes command line ls - Shows all files in current directory scrolling) Ctrl - C - Aborts command ls -a - Shows all files including hidden files grep "t ext " filename - Searches for text in current directory Ctrl - Z - Suspends command within file pwd - Shows current directory (present fg - Resumes command after suspension find - Finds files working directory) Ctrl - T - Fix misspelled command whoami - Prints current user cd - Changes curent directory cal - Prints ASCII calendar rmdir - Removes directo ries pstree - Shows running processes as a tree du - Displays file space usage System Informa tion ps - Report a snapshot of current processes yes - Displays the same line of text until free - Displays amount of free and used cp - Copies files interru pted memory in system cp filename newfile name - Creates new file df - Reports file system disk space usage with old file informa tion lsblk - Reports informa tion about block cp filename directo ry/ - Puts file into devices directory fdisk - Manipul ates disk partition table mv - Moves files Uname - Prints system informa tion mv filename directory/ - Moves file into directory top - Display and update sorted info about processes rm - Removes \de letes files uptime - Displays the amount of timed the rm -r - Deletes directo ries machine has been running rm -r directo ry/ - Removes directory rm -rf directory/ - Removes directory to User/Root Commands oblivion useradd - Creates new user mkdir - Creates directo ries passwd - Sets password for new user echo - Moves data (e.g. moves text into a userdel - Removes user file) chsh --shell /bin/sh username - Changes echo text >> filename - Moves text into file shell cat - Reads file text or concate nate files and sudo grouped groupante - Creates group print file text chown - Changes owner touch - Creates any kind of file chgrp - Changes group tail - Outputs last part of files chmod - Changes permiss ions less - Views files instead of opening them. Lets user scroll through chmod ug +x filename - Gives user and group permission to execute file awk - Selects data and presents rows and columns in output
By mmorykan Published 18th December, 2019. Sponsored by CrosswordCheats.com cheatography.com/mmorykan/ Last updated 28th January, 2020. Learn to solve cryptic crosswords! Page 2 of 2. http://crosswordcheats.com