How to do common admistrative tasks with linux |
|
Logging in remotely from linux: ssh hostname Logging in remotely from windows: start the Putty.exe program, fill in the name, ip, save, load, and put in username and password. Becoming root on a linux machine: su Browsing files in a directory: ls *also use ls | less if there is more than a screen full. b=back, spacebar=forward, you can search with /searchtext Changing to the log directory: cd /var/log Viewing your current directory: pwd Viewing system log: less /var/log/messages Viewing very end of system log: tail /var/log/messages Changing to the mail log directory: cd /var/log/mail Finding something in the mail log: cat /var/log/mail/info | grep reject *this will show all lines with "reject" in them. Watching a Mandrake mail log in real time: tail -f /var/log/mail/info *Ctrl-C to stop viewing. Watching a RedHat mail log in real time: tail -f /var/log/maillog *Ctrl-C to stop viewing. Checking to see if mail is running: /etc/rc.d/init.d/postfix status Starting mail: /etc/rc.d/init.d/postfix start Checking the web proxy (squid): /etc/rc.d/init.d/squid status Checking available disk space: df -h Repeating a command: use the arrow keys Properly Shutting down a Mandrake or Redhat Linux box: Most machines will initiate a shutdown if you type CTRL-ALT-DEL. If not, su root, and type shutdown -r now. Logging out in linux: Ctrl-d Running e2fsck on damaged ext2 partitions: e2fsck -cpvy /dev/hda1 (or hd[a-d][1-n]) (or /dev/md[0-n], for raid) Running fsck on damaged non-ext2 partitions: fsck -CV -t (filesystem) /dev/hda1 (or hd[a-d][1-n]) (or /dev/md[0-n], for raid). Some valid file systems are: ext2, ext3, msdos, ntfs, vfat, and others.
Last updated September 29, 2003.
Jeff Borders |