|
Commands
|
Description
|
|
# at
<options> TIME
|
Runs a job
specified by <options> at a specified TIME parameter.
|
|
# batch
<options> TIME
|
Run a
command when the load average drops below .80, optionally after a set
TIME.
|
|
# crontab
–e
|
Use this
command to edit the crontab file.
|
|
# dmesg
|
View boot
messages. This log is circular, and limited system errors could
overwrite boot information after a time.
|
|
# echo
<value> > </proc/<file>
|
Write the
new value of a kernel parameter into the /proc file system. To change a
shared memory segment:
# echo
2147483648 > /proc/sys/kernel/shmmax
|
|
# groupadd
|
-g sets the
group id; default is first free value above 500.
|
|
# groupdel
|
Remove a
group from the system.
|
|
# ifconfig
–a
|
Show all
the network devices currently configured.
|
|
# init <runlevel>
|
The init
command causes the rcN.d scripts to be evaluated, for the change in run
level. # init 6 forces a reboot.
|
|
# insmod
|
Load a
loadable module.
|
|
# ipcrm shm
<shmid>
|
Release the
shared memory segment identified by <shmid>. This is very
dangerous. You can corrupt a database that is using the segment that is
released.
|
|
# ipcs
<option>
|
Options: -m
the current usage of shared memory; -s usage of semaphores; -a shows
all.
|
|
# lsmod
|
Show
currently loaded module.
|
|
# modinfo
<options> <module>
|
Display
information about kernel modules: -l shows license, -p parameters, -d
description.
|
|
# mount
<opt> <dev> <mnt-pt>
|
Mount a
file system on device <dev> at <mnt-pt>.
|
|
# rmmod
|
Unload a
loadable module.
|
|
# routed
|
It is
routing daemon
|
|
# rpm –e
package
|
Erase
package –e; with not uninstall if dependencies exist.
|
|
# rpm –ivh
package
|
Install –i,
verbose –v, with progress hash marks –h.
|
|
# rpm –qa
|
Query –q,
All –a, lists all installed packages.
|
|
# rpm –qf
file
|
List the
package when given the full file name.
|
|
# rpm –ql
package
|
List all
the files that are part of a package.
|
|
# rpm –V
package
|
Compares
installed files with the rpm database information.
|
|
# runlevel
|
Show
previous and current runlevel.
|
|
# shutdown
<mode> <delay>
|
Do a
graceful shutdown of the system, shut down processes, run all shutdown
scripts, and sync disks. The modes are –r, reboot and –h, halt.The
delay is a number in seconds or ‘now’.
|
|
# sync
|
Force the
buffer cache and page cache to write all dirty buffers to disk. Use it
before a reboot.
|
|
# sysctl
–a
|
Show
settings of all settable kernel parameters.
|
|
# sysctl
–a | grep net
|
View all
net parameters that are set for the kernel.
|
|
# sysctl
fs.file-max
|
Show the
value of maximum number of file descriptor per process.
|
|
# sysctl
kernel.shmmax
|
Show the
shmmax parameter.
|
|
# sysctl
–w <parameter>=<value>
|
Change a
kernel parameter; the –p option reads the setting from a file and sets
them. The default file is /etc/sysctl.conf.
|
|
# ulimit
|
Without
options ulimit show the current user limit setting.
|
|
# ulimit
<option> <value>
|
Set limits
on a shell and processes started by the shell. Users can make limits
more restrictive; generally ly root can make limit less restrictive;
some ooptions require root privilege. Options: -u sets number of
processes, -n number of file handlers;
|
|
# umount
<dev>
# umount
<mnt-pt>
|
Unmount the
file system or device.
|
|
# uname
–m
|
Show CPU
level. (e.g., i686).
|
|
# uname
–r
|
Show kernel
version.
|
|
# useradd
|
The –D
option alone shows the defaults, -g sets a primary group.
|
|
# userdel
|
Remove a
user and optionally all files.
|
|
# usermod
|
Change
/etc/password information.
|
|
/
|
The root
directory for the system
|
|
/boot
|
A small
partition to hold the kernel image(s) and boot loader instructions.
|
|
/etc/anacrontab
|
Edit the
file to specify a script to run at a particular frequency.
|
|
/etc/group
|
The
/etc/group file defines the groups on a server.
|
|
/etc/hosts
|
A list of
hosts that your machine knows about. At minimum must include the name of
the local machine and loopback IP.
|
|
/etc/inittab
|
Configuration
files are located per the application. Any configuration file that you
change after installation should be included in the backup.
|
|
/etc/issue
|
Banner
message user sees when issued the login prompt.
|
|
/etc/nsswitch.conf
|
Contains
the IP address of the name service switches.
|
|
/etc/passwd
/etc/shadow
|
The /etc/passwd
file holds user information.
The
/etc/shadow file holds the encrypted passwords.
|
|
/etc/sysconfig/network-scripts/
|
This
directory holds scripts executed as part of the boot up sequence by
rc.sysinit.
|
|
/etc/sysctl.conf
|
Compiled in
kernel parameters; may be reset at bootup by setting them in this file.
|
|
/etc/X11/XF86Config
|
The file
that sets the X server settings for your video card, monitor, mouse, and
keyboard.
|
|
/home
|
Typically
the directory in which all user home directories placed.
|
|
/sbin/ypbind
|
Finds and
attaches to a NIS server for name resolution and other services.
|
|
/tmp
|
A temporary
storage area. Don’t put anything here you want to keep.
|
|
/var/log
|
The
location of most system log files.
|
|
65535
|
Maximum
number of user ID.
|
|
|
|
|
{lilo}
control-x
linux S
passwd root
{grub}
c
kernel
vmlinuz-2.4.9-13 single
ro
root=/dev/hda8
initrd
/initrd-2.4.9-13.img
boot
passwd root
|
This is a
procedure to recover the root password if is lost. You start by
rebooting the machine, then during the lilo boot press and hold [Ctrl]+[x]
to get a prompt and command LILO to boot linux to run level S.
The second
procedure uses the grub boot loader.
|