If you can see this check that

next section prev section up prev page next page

Basic Administration Concepts

Disks and Partitions

Disks

Partitions

> sfdisk -l /dev/sda

Disk /dev/sda: 8924 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12      13-    104391   83  Linux
/dev/sda2         13    1287    1275   10241437+  83  Linux
/dev/sda3       1288    1542     255    2048287+  82  Linux swap
/dev/sda4       1543    8923    7381   59287882+   f  W95 Ext'd (LBA)
/dev/sda5       1543+   1797     255-   2048256   82  Linux swap
/dev/sda6       1798+   8923    7126-  57239563+  83  Linux

$ cat /etc/fstab

$ df

Filesystem           1K-blocks      Used        Available Use% Mounted on
/dev/sda2             10080520     3142968   6425484    33%	/
/dev/sda1             101086         9665         86202        11% 	/boot
none                     1038660       0              1038660     0% 	/dev/shm
/dev/sda6             56340828      3853984  49624868   8% 	/home

*UML

Disk Usage

Linux Boot Process

Booting to kernel

$ cat /etc/grub.conf

default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.6-1.435.2.3)
        root (hd0,0)
        kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.6-1.435.2.3.img
title Fedora Core (2.6.5-1.358)
        root (hd0,0)
        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.5-1.358.img

Startup Commands

/etc/init.d/*

Run levels

$ ls /etc/rc5.d

K01yum           K35vncserver  K74ypxfrd            S13portmap    S80sendmail
K05saslauthd   K35winbind     K89netplugd         S14nfslock      S90crond
K10dc_server   K45named      K95kudzu             S18rpcgssd     S90xfs
K10psacct        K50netdump   K96init.cssd          S19rpcsvcgssd S95anacron
K12dc_client    K50snmpd      S00microcode_ctl  S20random     S95atd
K12mysqld      K50snmptrapd  S04readahead_early  S25netfs   S96init.cssd
K20nfs            K50tux           S06cpuspeed         S26apmd        S96readahead
K24irda           K54dovecot    S08iptables           S28autofs       S97messagebus
K25squid         K70aep1000   S09isdn                S44acpid         S97rhnsd
K34dhcrelay     K70bcm5820  S10network          S55sshd          S99local
K34yppasswdd  K74ntpd        S12syslog             S56rawdevices S99mdmonitor
K35dhcpd         K74ypserv     S13irqbalance       S56xinetd

S/K priority service-name

Link management

The syslog

The xinetd super-daemon

XINETD

$ cat /etc/xinetd.d/telnet

service telnet
{
        flags           	= REUSE
        socket_type 	= stream
        wait            	= no
        user            	= root
        server          	= /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
}

Terminating a process

User Management

User Management

Manual Creation

$ adduser gordon

Skel files

$ ls /etc/profile.d

colorls.csh  gnome-ssh-askpass.csh  	krb5.csh  less.csh  vim.csh
colorls.sh    gnome-ssh-askpass.sh	krb5.sh    less.sh    vim.sh
glib2.csh     kde.csh                          	lang.csh  qt.csh      which-2.sh
glib2.sh       kde.sh                         	lang.sh    qt.sh

$ cat /etc/profile.d/vim.sh

if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
  # for bash, pdksh and zsh, only if no alias is already set
  alias vi >/dev/null 2>&1 || alias vi=vim
fi

Example

Moving a uid or gid

Useful Commands

$ chown jim.staff filename
$ chown jim filename
$ chgrp staff filename

When a User logs in

FILE SEARCHING

A file CONTAINING something

A FILENAME containing something

Find to do something

Discussion

Discussion

Discussion

Question 1

Question 2

Question 3

Question 4

  • The following commands are typed on a Unix computer.
    $ mkdir temp
    $ cd temp/
    $ mkdir txt.txt/
    $ cd txt.txt/
    $ touch hello
    $ cd ..
    $ ls *.*
    
    What is printed on the screen in response to the last line of the commands?

  • Tutlinks: intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2
    Useful: Quiz Forums
    Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo