Linux Cheat Sheet

Under construction

ls - List directory contents

ls -l (long format)

cd - Change directory

cd ~ (change to the home directory)
cd .. (go one level up)

ps - Show processes

ps auxw (show all processes with additional information)

| - Pipe (pass results from command to another command - this is shift-\, not an I or L) grep - Search text

ps auxw | grep -i httpd (look for "httpd" among the process list)

service - stop, start, restart, or check status on services

service postfix restart

find - Find files

find \ -name "*doc" (find files on hard drive that end with .doc)

locate - Find files quickly (uses nightly locate database)


man - Manual

man locate (read locate manual)

df - Report disk space

df -h . (read disk space for this partition in human-readable format)

du - Calculate folder size

du -sh  (report size of folder in human readable format. only show the size of )

xargs ls -l xargs | grep -i hello
find /etc | xargs grep -i

top -p 300

nice ./someprogram

renice -10 300

kill 300

killall httpd

wc -l /some/document

crontab -e

cat /some/document

chown -R root:root /root

chmod 700 /usr/bin/su
chmod o+rwx,u-x,g-x /usr/bin/su




sudo nano /some/secure/document

su - root

it/linux.txt · Last modified: 2007/03/14 02:50 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki