You are on page 1of 24

Unix First Step

:
Linux Unix
Unix Windows

:
System Outline: Unix
History and Standards:
OS Comparision:
Components:
Hardware Requirements: CPU Arch
Process Essentials: fork
From Unix/DOS to Linux: Linux
Advanced Topics:
: 1 hr
1

System Skeleton
( kernel Operating System)
()
: CPU, memory, basic I/O, root filesystem
: other filesystems (ISO 9660, NTFS), drivers (net card, sound card)

Socket, TCP/IP
/boot -- C Shell (csh), TC Shell (tcsh)

ssdd

Run Levels
RHS runlevel
0 - halt
1 - Single user mode
2 - Multiuser, without NFS
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot
()
: CPU, memory, basic I/O, root filesystem
: other filesystems (ISO 9660, NTFS), drivers (net card, sound card)

System Outline

History
AT&T
A: C: / /mnt
\ /
BSD
Bill Joy
CSRG: Kirk Muckusky
/boot -- C Shell (csh), TC Shell (tcsh)
/proc -- Linux bash

Standards
DOS/Windows
A: C: / /mnt
\ /

/bin -- Bourne Shell (sh), K Shell (ksh), Bourne Agagin Shell (bash)
/sbin -- system binary
/boot -- C Shell (csh), TC Shell (tcsh)
/proc -- Linux bash

Filesystem Outline

A: C: / /mnt
\ /
:
/bin -- Bourne Shell (sh), K Shell (ksh), Bourne Agagin Shell (bash)
/sbin -- system binary
/boot -- C Shell (csh), TC Shell (tcsh)
/proc -- Linux bash

Files
Unix
Regular Files:
Directory Files:
FIFO Files:
Link Files:

Device Files
DOS/Windows :
/dev/fd0 /mnt/floppy / /mnt
\ /
/dev/null

/dev/zero
d
/dev/stdin

/dev/stdout

/dev/stderr

Kernel, Shell and Users


Kernel
ex$ grep marr /etc/passwd
marr:x:501:501:marr:/home/marr:/bin/bash
: Login Shell
Shell
Shell
Shell

10

Kernel, Shell and Users


Kernel Space User Space
ex$ finger marr
Login: marr
Name:
root Directory Home Directory
/
/home
User ID (UID)
0
UID 0
UID
root (super user)
root Unix WinNT Administrator
UID 0

11

Kernel, Shell and Users

Home Directory $HOME ~


/etc/passwd

cd
cd $HOME
cd ~
cd ~username

ex$ cd Tab
ex$ ls /etc/X [tab]
ex$ ls /etc/X11/X [tab]

12

Command Execution

: Shell
:
:

vipw Login Shell

13

Terms and Concept


process
proc
init
initial
daemon
client/server server
client
fork
d.
signal

filter

man/manpage
manual
14

Linux Terms and Concept


cola
comp.os.linux.announce
daemon
Shell
fork
ex$ chsh
Changing shell for marr.
signal

/bin/tcsh Login Shell /bin/bash /bin/tcsh

15

Directory
. ..
selfparent

/ (root path) /home/marr/some_dir/some_file


.. ../some_dir/some_file
$S

16

Unix vs Linux
Unix

POSIX
Linux
Linux ix86 PC
GNU gccbash
glibcgtkqt
GNOMEKDEOpenOfficeKOffice
ApacheSambaSendmailBindSquid
Zope Linux

Linux PC server 27%


Linux Unix

17

Freenix

Linux
FreeBSD
OpenBSD
NetBSD
Hurd
Solaris
BeOS
d
d

18

Working Place Advice

ls --color
prompt
etc


TeX*Office

Linux PC server 27%


Linux Unix

19

From Unix/DOS to Linux

Unix > DOS > WinNT > WinXX

Linux



Linux
Mandrake Linux
Debian Linux

20

Default and Customization

system-wide user-specific
/etc
.dot_file

21

Most Basic Commands


/bin/echo

cd, pwd
Shell
/bin/sh /bin/bash
Login Shell
Shell
$SHELL
exit/logout
exit SubShell/LoginShell
Login Shell logout

22

Linux Standard
Linux Standard Base
http://www.linuxbase.org/
Free Standards Group
http://www.freestandards.org/
Filesystem Hierarchy Standard
http://www.pathname.com/fhs/
Desktop Environment
http://www.freedesktop.org/
Package Management
http://www.rpm.org/
Debian Policy Manual
http://www.debian.org/doc/debian-policy/
API for Embedded System
http://sources.redhat.com/elix/
Linux Internationalisation Initiative
http://www.li18nux.net/
23

Advanced Topics
bashish: theme engine for the console
http://bashish.sourceforge.net/
man/info page:
S
:
bash Basic: shell
Command-Line Editing: emacs readline
Environment Customization:
Input/Output: redirection
Basic Shell Programming:
Process Handling: Process ID Job Number
Advanced Topics: shell
: 3 hr
24

You might also like