0% found this document useful (0 votes)
49 views4 pages

Cs205B - Networking & Administration 1459057 - HOÀNG ĐỨC VIỆT

This document discusses Linux runlevels and shells. It describes the 7 Linux runlevels, their corresponding commands, and purposes. Runlevel 0 halts the system, 1 is single-user mode, 2-5 activate different networking states, and 6 reboots. It also lists 5 common Linux shells (Bourne, C, Bash, tcsh, zsh), explaining their origins and typical usages. Single-user mode commands like fsck and mount are provided.

Uploaded by

Ser Davis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

Cs205B - Networking & Administration 1459057 - HOÀNG ĐỨC VIỆT

This document discusses Linux runlevels and shells. It describes the 7 Linux runlevels, their corresponding commands, and purposes. Runlevel 0 halts the system, 1 is single-user mode, 2-5 activate different networking states, and 6 reboots. It also lists 5 common Linux shells (Bourne, C, Bash, tcsh, zsh), explaining their origins and typical usages. Single-user mode commands like fsck and mount are provided.

Uploaded by

Ser Davis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CS205B – NETWORKING & ADMINISTRATION

1459057 – HOÀNG ĐỨC VIỆT

1) Describe each of runlevels of Linux OS. Please specify which


command is used for each runlevel.
Run Level Name Description
0 Halt System halt, shutdown
1 Single-user mode Administration mode
2 Multi-user mode Doesn’t configure network interfaces
and doesn’t export network services
3 Multi-user mode with Starts the system normally with
networking networking support
4 Undefined For special purposes
5 X11 Same as runlevel 3 with display
manager
6 Reboot Restart the system

Halt
-a Control access to the shutdown command using the control
access file /etc/shutdown.allow
-k Don’t shutdown, but send the warning messages as if the
shutdown were confirm
-r Restart the system after shutdown
-h Instructs the system to shutdown and then halt
-p Instructs the system to shutdown and then power down
-H If -h is also specified, this option instructs the system to drop
into boot monitor on systems that support it.
-f Skip fsck after reboot
-F Force fsck after reboot
-n Don't call init to do the shutdown of processes; instruct
shutdown to do that itself.
-c Cancel a pending shutdown.
-t Tell init to wait sec seconds between sending processes the
warning and the kill signal, before changing to another
runlevel.
Time The time arguemnt specifies when to perform the shutdown
message A message to be sent to all users, along with the standard
shutdown notification.

Single-User Mode Commands


STT
1 Fsck -y Check the boot volume's file system, and repair if
necessary (the "-y" means "Yes, go ahead and fix
any problems you find"). Always do this first.
2 mount Remount the boot volume, enabling write access.
You need to do this before you can change
anything on disk, but always run fsck first.
3 SystemStarter Start up more of the system, including
networking, NFS, and many background
daemons (basically, it runs all of the
StartupItems).
4 Pico Edit text files
5 nicl Edit the local Netinfo database (users & groups,
etc) without going through the netinfo daemon.
6 bless Change the system's boot settings (the "blessed"
system).
7 exit Continue the boot process (i.e. go to multi-user
mode).
8 reboot Restart the computer
9 shutdown Shutdown the computer
2) List all of shells that are available in Linux system. Describe the
meaning and usage of each.

STT Name Description Usage


Provided
support for
environment
variables
using
parameters
$ echo {1..10}
1 B shell and 1 2 3 4 5 6 7 8 9 10
exportable
variables.
Redirection
of program
output and
error .
Similar to the for i in d*
do
C case $i in
2 C-shell programming d?) echo $i is short ;;
*) echo $i is long ;;
language in esac
syntax done
the Bourne
again shell
was
developed by
GNU project
We usually use bash shell in linux
3 Bash .It is based on
command or terminal on Macintosh
B shell
language and
has features
of C and K
shells.
the default if ( "$input" =~ [0-9]* ) then
4 tcsh shell of echo "the input starts with an
FreeBSD and integer"
its else
descendants. echo "the input does NOT start
with an integer"
endif

a Unix shell
that can be
used as an
interactive
5 zsh login shell zsh -x -o shwordsplit scr
and as a
powerful
command
interpreter.

You might also like