|
/var/log/wtmp |
Login records file. |
|
/fastboot |
This file's existence
|
|
/etc/inittab |
Defines what processes are to be started at what runlevel. |
|
/etc/shutdown.allow |
Users specified in this file are permitted to invoke the shutdown command. |
|
/etc/r |
Multiuser initialization file. |
|
/etc/fstab |
Contain mount information for filesystems. |
|
/etc/hd?? |
Display disk device. |
|
/etc/sd?? |
SCSI disk device. |
|
/etc/initscript |
If the file exists, it is used by init to start new processes. |
|
/dev/console |
Display console device driver. |
|
/etc/ioctl.save |
Specify console's ioctl states. |
|
/etc/lilo.conf |
Specify LILO configuration options. |
dmesg
[ -c ] [ -n level ] [ -s bufsize ]
This command is used to display or control the contents of the kernel ring buffer, which contains the
Example: To get the boot messages from your last system startup, use
dmesg less
Example: To set your console to display messages with annoying frequency, use
dmesg -n 3
|
-c |
Clear the contents of the ring buffer after printing. |
|
-s bufsize |
Specify the
|
|
-n level |
Specify the level at which log messages are displayed to the console. Note that messages are sent to /proc/kmsg regardless of level. Typically, this is set to 1, which filters all but panic messages. |
halt
[-n] [-w] [-d] [-f] [-i] [-p]
reboot
[-n] [-w] [-d] [-f] [-i]
poweroff
[-n] [-w] [-d] [-f] [-i]
Halt and its synonyms tell the kernel to do one of three things: reboot, halt, or power the system off. When called, they make an entry in the /var/log/wtmp file. You must be logged in as the superuser to use this command.
Example: To force a halt of the system, use
halt -f
|
-n |
Do not sync. |
|
-w |
Write the wtmp entry, but do not actually reboot or halt. |
|
-d |
Do not write the wtmp entry. |
|
-f |
Force the halt or reboot. |
|
-i |
Shutdown all network interfaces before
|
|
-p |
After halting, perform a poweroff. |
lilo
options
This program
Example: LILO is usually run without options, as shown here:
/sbin/lilo
|
-v |
Run verbosely. |
|
-q |
Display the currently mapped kernel files as specified in /boot/map. |
|
-m map-file |
Use the specified boot map file rather than /boot/map. |
|
-C config-file |
Use the specified config file, /etc/lilo.conf by default. |
|
-d delay |
Specify the delay time before LILO boots the default kernel. |
|
-D label |
Specify that the kernel with the label will be the default. |
|
-r root-directory |
Force LILO to perform a chroot on the indicated directory. Used for repairing a setup from a boot floppy. |
|
-t |
Test only, do not actually write a new boot sector. |
|
-c |
Map compaction. |
|
-f disk-tab |
Use the specified disk geometry source file (default is /etc/disktab ). |
|
-i boot-sector |
Use the specified file as the new boot sector. |
|
-I |
Use linear sector addresses, rather than sector/head/cylinder addressing. |
|
-P {fixignore} |
Specify whether to fix or ignore faulty partition tables. |
|
-s save-file |
Use the specified file to save data from the overwritten boot sector. |
|
-S save-file |
Allow overwriting of save files. |
|
-u
device-
|
Uninstall LILO. (Copy the specified boot sector save file back to the MBR.) |
|
-U device-name |
Uninstall LILO without checking time stamps. |
|
-R command line |
Set the default command for the
|
|
-I label |
Display the
|
|
-V |
Display version number. |
rdev
[ -rsvh ] [ -o offset ] [ image [ value [ offset ] ] ]
rdev
[ -o offset ] [ image [ root_device [ offset ] ] ]
swapdev
[ -o offset ] [ image [ swap_device [ offset ] ] ]
ramsize
[ -o offset ] [ image [ size [ offset ] ] ]
vidmode
[ -o offset ] [ image [ mode [ offset ] ] ]
rootflags
[ -o offset ] [ image [ flags [ offset ] ] ]
If called with no arguments, rdev displays the following line for the current root file system:
/etc/mtab
This command is
Example: To get mount information for your current root filesystem, use
rdev
Typically, the offsets are among the following:
498 Root Flags
(500 and 502 Reserved)
504 RAM Disk Size
506 VGA Mode
508 Root Device
(510 Boot Signature)
The image parameter is typically one of the following:
/vmlinux
/vmlinux.test
/vmunix
/vmunix.test
/dev/fd0
/dev/fd1
The root device or swap device parameters are one of the following:
/dev/hda[1-8]
/dev/hdb[1-8]
/dev/sda[1-8]
/dev/sdb[1-8]
|
size |
Specify the size of the RAM disk in kilobytes. |
|
flags |
Contain extra information used when mounting root. |
|
mode |
Specify video mode as one of the following: -3 = Prompt -2 = Extended VGA -1 = Normal VGA = as if "0" was pressed at the prompt 1 = as if "1" was pressed at the prompt 2 = as if "2" was pressed at the prompt n = as if "n" was pressed at the prompt |
|
-s |
Cause rdev to act like swapdev. |
|
-r |
Cause rdev to act like ramsize. |
|
-R |
Cause rdev to act like rootflags. |
|
-v |
Cause rdev to act like vidmode. |
|
-h |
Provide help. |
runlevel
[utmp]
Display the previous and current runlevel.
Example: To display the current runlevel as specified by the (non-standard) utmp database file /usr/bin/utmp.old, use
runlevel /usr/bin/utmp.old
shutdown
[-t sec] [-rkhncfF] time [warning-message]
Bring the system down gracefully and securely. Shutdown automatically prints out a notification to any logged-in
Example: To shutdown and reboot the system immediately, use
shutdown -r now
Example:
To shut down and halt the system in 10 minutes with the warning message "Important
shutdown -h +10 "Important repairs going on"
|
|
Shutdowns can be cancelled with the <Ctrl>-C character combination, but it's usually best to just let them run. |
|
-t sec |
Specify a delay in seconds between the warning and the process actually getting
|
|
-k |
Send the warning message, but do not actually shut down. |
|
-r |
Reboot after shutdown. |
|
-h |
Halt after shutdown. |
|
-n |
Perform the actual shutdown, rather than allowing init to do it. Use is discouraged. |
|
-f |
Do not do an fsck after reboot. (Fast reboot.) This option may be ignored at reboot time. |
|
-F |
Force an fsck after the reboot. |
|
-c |
Cancel a shutdown in progress. |
|
time |
Specify a time to shutdown (hh:mm, the word 'now', +minutes). |
|
warning-message |
Optional message to be written to active users. |
swapon
[-h -V]
swapon
-a [-v]
swapon
[-v] [-p priority] specialfile …
swapon
[-s]
swapoff
[-h -V]
swapoff
-a
swapoff
specialfile …
Swapon and swapoff, respectively, enable and disable devices on which paging is to take place. They are normally invoked by /etc/rc .
Example: To disable swapping, use
wapoff
|
-h |
Display help and exit. |
|
-V |
Display version number and exit. |
|
-s |
Provide usage summary of swap device(s). |
|
-a |
Make any swap device (as specified by sw mark in /etc/fstab) available. |
|
-p priority |
Specify priority for swapon. |
sync
The sync command
Example: To force a write of buffered data out to disk, use
sync
init
[ 0123456Ss ]
telinit
[ -t sec ] [ 0123456sSQqabcUu ]
Init
is the ultimate
Telinit is used after system boot to get init to do various things. It is a privileged command.
Example: To switch to runlevel 4, use
init 4
|
0,1,2,3,4,5 or 6 |
Switch to the specified run level. |
|
a,b,c |
Process only those /etc/inittab file entries having runlevel a,b, or c. |
|
Q or q |
Re-examine the /etc/inittab file. |
|
S, s |
Change to single user mode. |
|
U, u |
Re-execute init, returning ultimately to the current state. |