CentOS Cheat Sheet Cheat Sheet by bromono via cheatography.com/20940/cs/3795/

Help Commands Partitions and Disk Management Operations (cont) Options whatis View a file on page a -a Show all (including hidden) , allows for going Search whatis database for Report disk space -R Recursive list backwards complete words; used to usage -r Reverse order short descrip​ tions of system Print the first 10 lines of a commands file -t by last modified Show whats mounted or mount Sort by file size Print the last 10 lines of a -S a file system file Long listing format Shows the full path to shell -l unmou​ nt Count the number of commands -1 One file per line Unmount a file system words or characters in a where​ is file -m Comma-s​ epa​ rated output fuser binary, source and man stat Display file of file system -Q Quoted output pages for a command Identifies processes using files status or sockets aprop​ os Remove sections from Options isof lines of input Search through a database of -i Case insensi​ tive search short descrip​ tion to find list open files on the system Merge lines of files -r Recursive search and man pages containing -v Inverted search certain terms and commands Directory Operations Searching Files -o Show matched part of file only man clears your screen grep Search text files for lines Manual pages for commands containing a matching Shows current directory Process Management pattern Change directo​ ries Report on current Bash Variables locate Find files by matching the ls List directory contents whole path name processes List current Create a new directory find search for files in a Display a of environ​ ment variables directory hierarchy processes Delete an empty directory Output value of $NAME Show real time processes $NAME variable Commands to know File Operations Terminate a process by export set $NAME to value in Prints informa​ tion about PID NAME=​ enviroment Print a file on the screen, a machine and operating ​ value concate​ nate files Kill a process by name system it is run on set Change value of shell Create an empty file, Look up or Print who is currently atrributes and positional change file timestamps processes based on same logged in and other attributes parameters or display Copy directo​ ries or files list of shell variables Prints system uptime and Grep for process Moves directo​ ries or files and functions load informa​ tion Removes directo​ ries or $PATH Exectuable search path Execute a command as ctrl+z Stop the job but don't end files (This is how you another user, usually $HOME Home directory process remove recursi​ vely) with higher permiss​ ions $SHELL Current shell & Place this after a Creates a symbolic or shutd​ Bring the system down in command to put the hard for a file own a safe way process in the background

jobs Display all jobs

By bromono Published 1st April, 2015. Sponsored by CrosswordCheats.com cheatography.com/bromono/ Last updated 1st April, 2015. Learn to solve cryptic crosswords! Page 1 of 2. http://crosswordcheats.com CentOS Cheat Sheet Cheat Sheet by bromono via cheatography.com/20940/cs/3795/

File Permiss​ ions Networking (cont) 775 file ifdown Bring network interface down Change file permiss​ ions to 775 ping Send ICMP chmod -R 600 folder ECHO_RE​ QUEST to Recursi​ vely chmod folder to 600 network hosts user.gr​ oup file Accounts and Security Change file owner to user and group to Adminis​ tra​ tion group group​ add

File Permission Numbers Create a new group

First number is the owner permiss​ ion, group​ del second is group and third is every​ one Delete a group Calculate permission digits by adding group​ mod number below: Modify definition of a specified suid=4 421 421 421 group sgid=2 rwx rwx rwx usera​ flag=1 owner group world Create a new user example: cmod 777 /etc/​fil​e.txt userd​ el

Delete a user Networking Directo​ ries userm​ /etc/​ sys​ con​ fig​ /ne​ two​ rk-​ scr​ ipts Modify a user account This folder contains the configu​ ration files for each interface on the system; usually named ifcfg-eth0 or ifcfg-e​ th1. Update a user's password /etc/​ res​ olv​ .co​ nf vipw This file contains the permanent Domain Edit password, group, Name Server (DNS) settings shadow-​ pas​ sword (Updates etc/sha​ dow) Networking vigr ifcon​ Configure network interface Edit password, group, fig shadow-​ group (Updates route Show/Ma​ nip​ ulate the IP routing etc/gsh​ adow) table chage ip Show/Ma​ nip​ ulate routing, devices, Change password policy policy and tunnels; replaces , arp, and route ifup Bring network interface up

By bromono Published 1st April, 2015. Sponsored by CrosswordCheats.com cheatography.com/bromono/ Last updated 1st April, 2015. Learn to solve cryptic crosswords! Page 2 of 2. http://crosswordcheats.com