You are on page 1of 2
makeuseof.com Unix/Linux Command Reference File commands is Directoy isting kat Farmattac isting with hidden fles cdi Change directory to cir cd Change to home pwd Show current directory mean ar Create o arectory a mile Delete fle m-rde Delete directory dr rm fle Force remove fre mtd For temove drectory dr pile! fie2_ Copy fie! to fie2 cp-fdirl di2_— Copy dir! to di: create di tit doesn't ext mvtie! lez Rename or move fie! 10 tle2. It led 2s an existing drectory, moves fle] into directory fle2 In-sfileink Create symbolic ink ink to fle touch fle Croste or update fie, cat> file Places standard input into lle more file Output the contents of fle eos fle Output the fest 10 ines of fle tail fle Output the last 10 tines of fle taille Output the contents of fle osit grows, starting with ne ast 10 nes Process Management ps splay all curenty active processes Top display all running processes al pa Kil process ia pia Kila proc kil all processes named proc* bo Ists stopped or background jobs: resume a stopped jah in tha nackornine fg Brings the most recent job to the foreground fg0 brings job a to the foreground File Permissions J] chmod octal fie change the permissions of fle to octal, which con be found separately for user, ‘group, ond world by adcing: *4=tead (1) write (Wd) + execute (x) Examples: ‘chmod 777-read, write, execute for al ‘chmod 755 rx for owner, 1x Tor group and ‘world. For mare options, see man chmod, = connect fo host as user ‘connect fo host on port port as user ‘add your key to host for user 10 enable a keyed or passwordless login ssh user@host ssh-p port user@host ssh-copyd user@host Searching J Seni ies search tor pattem in ties pecceteneh search recuse fr pattem nt anion search for pattem in te output of command Eommand | grep pattem sre inetancar off System Info dote show the current date and time cal show this month's calender uptime show current uptime w display who is onine whoami who you are logged in as finger user ‘splay information about user uname -o show kernel information {cpu information Cat fproc /cpuinfo ‘memary information Cat /proe /meminfo man command show the manual for command at show disk usage ou. show directory space usage free show memory and swap usage where's app show possible locations of app which app show which opp willbe run by default Compression tar ef fle.tor fles create c tar named fle.tar containing fles tars fie.tor extract the fies from fe.tor faredffilefarge fies creote c tar with Gz compression torvat fle.tor.gz extract a fer using Gzip far gf fle-torb22 create o tar with Bzip2 compression lex if feta. extract a ter using Baip2 axip fle ‘compresses fle and reniamesit to fle.gz gap -dfle.gz decompresses fle.gz back to fle Network J ping host ping host and output resus ‘whois domain {get whois information for domain dig domain {get DNS information for domain dig ~chost reverse lookup host wget fle download fie wget le continue a stopped download Installation J Install from source: [configure make ‘make install dpkg -i pkg.deb install a package (Debian) tpm-Uvh pkgspm __ install a package [RPM) Shortcuts | CinltC halts the current command Cinlt7 stops the current command, resume with fg in the foreground or bg in the background Cin+D og out of current session, similar to exit CintW erases one word in the current line CiritU erases the wnole line Cine type to bring up a recent command y repeats the last command ex? log oul of current session. . use with extreme caution iiakeuseof.com Did you like this CheatSheet? Then why not visit MakeUseOf.com for daily posts on cool websites, free software and internet tips. lf you want more great CheatSheets and MakeUseOf Guides join using the link below. http://www.makeuseof.com/pages/ Over 50 free, Downlodable, PDF Guides. Download SO+ MakeUseOf Guides on a wide range of subjects. More than a milion downloads so far. Al free. Enjoy and share! Get printable cheat sheets and shortcuts for your favorite brograms and sites. These cheat sheets will make you more productive!

You might also like