Last updated: 1 Nov 2008
Overview of Linux and system administration; hands-on experience with basic administration tasks; testing results
use of Unix/Linux
startup and shutdown scripts, in order
0 is stdin: <filename 1 is stdout: >filename (or >> to append) 2 is stderr: 2>filename (common: 2>&1 -- put same place as stdout)
> ls -l -rwxr--r-- 1 labadmin labadmin 267 Nov 6 2006 fix_perms
> df -h
simplicity vs. expandability
fsck for large disks takes a long time. Using journals is much quicker.
If you don't want to mount manually, put the mount info in the /etc/fstab and it will attach at startup or when requested.
device must not be in use, or it will fail. To see who is using a device, use fuser command
environment variables, standard file descriptors, memory map of code
service network restart
All X Window System based, allowing remote display of GUI (keyboard, mouse, display, window movement).
grep root /etc/passwd
Can also send backups over net.
Can also restore files from net.
might have to set EDITOR environment variable
requires periodic process to update the database of files (/etc/cron.daily/mlocate.cron)
finds which command in the PATH
displays network info
From command line:
useradd -d /home/ituser2 -m -G wheel -c "IT User 2" ituser2 passwd ituser2 id ituser2
Use the GUI.
groupadd demo usermod --groups wheel,demo ituser2 id ituser2 usermod --groups demo ituser3 id ituser3
Switch from GUI to console: Ctrl-Alt-F4
Note the difference between standard user and this. Try the same with ituser3 — what happened and what is the difference?
Tilde ("~") in a bash shell means use the current home directory.
tar zpscvf backup.tgz test
Look at contents of the archive:
tar ztvf backup.tgz
rm -ri ~/test
Note the danger of rm -rf.
cd /tmp tar zxvf ~/backup.tgz
Move restored files and directories to correct directory.
chmod o+r ~/test ls -ld ~/test
chgrp demo ~/test ls -ld ~/test
chmod u=rx,g-rwx,o-rwx ~/test/textfile
su ituser3 ls -l /home/ituser/test exit
crontab -e # add this line: 5 * * * * echo 5 minutes passed >/home/ituser/mylog # save the file
service sendmail stop
Very useful to look only at the end of it:
chkconfig sendmail off chkconfig --list sendmail
Useful for building an iptable firewall to base your firewall on
A document repository for everything linux
Clone the disk drives