Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

LINUX Admin Quick Reference by ybh46000


									  LINUX Admin Quick Reference                                                   /etc/sysconfig/network
                         Author: Jialong He                                                                      specify name server, DNS domain and         /etc/X11/XF86config      X window configuration file.
                                                etc/resolv.conf                  search order.                               /etc/X11/xinit/xinitrc
                                                                                                                                          clients to run after X server started
                                                                                                                 host name to IP mapping file.               $HOME/.xinitrc
User Management                                                                                                  host name information look up order.        /etc/X11/xinit/xinitrc   clients to run after X server started
Files                                                                           /etc/nsswitch.conf               new way to specify information source.
                                                                                                                                                             /etc/X11/fs/config       configure X11 font path.
/etc/group                                                                      /etc/networks
/etc/passwd                 User account information.                           /etc/protocols                   TCP/IP services and ports mapping.          Commands
/etc/shadow                                                                     /etc/services                                                                                         start X window system.
/etc/bashrc                                                                     /etc/rpc                         RPC service name to their program numbers
                                                                                                                 mapping.                                     Xconfigurator
/etc/profile                bash system wide and per user init files.                                                                                         (Redhat)
$HOME/.bashrc                                                                   /etc/sysconfig/iptables          saved iptables with /sbin/iptables-save      xfree86setup            setup X server and generate XF86config.
$HOME/.bash_profile                                                                                              command. see                                 (Slackware)
/etc/csh.cshrc                                                                                          xf86config
/etc/csh.login                                                                                                                                               Ctrl+Alt+Del             stop X server (on some system Ctrl+Alt+ESC).
$HOME/.cshrc                tcsh system wide and per user init files.           Commands
$HOME/.tcshrc                                                                                                                                                Ctrl+Alt+F1              F1 temporary switch to text mode, F7 switch
                                                                                netconfig          menu driven Ethernet setup program.
$HOME/.login                                                                                                                                                 Ctrl+Alt+F7              back to graphic mode.
                                                                                pppsetup           setup PPP connection (Slackware).
/etc/skel                   contains init files for newly created user.                                                                                      XFree86 -configure       XFreee86 auto configuration (Plug-n-Play).
                                                                                                   setup Ethernet during boot, for example
/etc/default                default for certain commands.                                                                                                    SuperProbe               detect graphic hardware.
                                                                                                   /sbin/ifconfig eth0 ${IPADDR} broadcast                   xvidtune                 adjust X server origin and size.
Commands                                                                                           ${BROADCAST} netmask ${NETMASK}
                                                                                                                                                             xmodmap                  modifying key map and mouse button map.
                            script to create an new user interactively          ifconfig
adduser                     (slackware) or link to useradd (Redhat).                               /sbin/route add -net ${NETWORK} netmask                   xhost                    server access control program for X.
                                                                                                   ${NETMASK} eth0
useradd, userdel,           create, delete, modify an new user or update                                                                                     xsetroot                 root window parameter setting utility for X.
usermod                     default new user information..                                          /sbin/route add default gw ${GATEWAY} netmask            xlsfonts                 server font list displayer for X.
newusers                    update and create new users (batch mode).                     metric 1
                                                                                host               lookup host name or IP (similar to nslookup).
groupadd, groupdel,         add, delete or modify group.                                                                                                     Printer Configuration
groupmod                                                                        dnsdomainname show DNS domain name.
                            modify account policy (password length,                                                                                          Files
                                                                                arping; arp        find out Ethernet address by first arping then arp.
                            expire data etc.) or finger information (full                                                                                    /etc/printcap
chage. chfn, chsh           name, phone number etc.) change default login       ipchains           firewall and NAT (/etc/sysconfig/ipchains on Redhat)                               Printer capabilities data base.
                                                                                                                                                             /etc/lpd.conf            LPRng configuration file.
linux init=/bin/sh     gain root access during boot prompt without              NFS File Sharing                                                                                      permissions control file for the LPRng line
mount –w -n –o remount password, can be used to fix some problems.                                                                                           /etc/lpd.perms           printer spooler
/                                                                               Files
                                                                                                                                                             /etc/hosts.lpd           Access control (BSD lpd).
                                                                                /etc/fstab           file systems mounted during boot.
                                                                                                                                                             /etc/hosts.equiv         trusted hosts.
Network Configuration                                                           /etc/exports         NFS server export list.
                                                                                                                                                             PRINTER                  Environment variable of default printer.
Files                                                                           /etc/auto.master     auto mount master file.
                                                                                                                                                             /dev/lp0                 parallel port.
/etc/rc.d/rc.inet1                                                              Commands
(Slackware)                     IP address, Network mask, Default gateway
                                                                                                     mount a file system or all entries in fstab.
/etc/sysconfig/nework-          are in these files. Can be edited manually to   mount
                                change these parameters.                                                                                                                              line printer control program, print queue
scripts/ifcfg-eth0 (Redhat)                                                     exportfs             export file system listed in exports                    lpc, lpq, lprm           maintain
                                                                                showmount –e         show file systems exported
/etc/HOSTNAME                   hostname is set by “/bin/hostname” during       hostname
(Slackware)                     boot and the name is read from these files.                                                                                  Sendmail
/etc/NETWORKING                 Can be changed manually.
(Slackware)                                                                     X Window                                                                     Files
        is the configuration file, edit   make config                                                              lilo -D dos          set LILO default OS (default=dos in lilo.conf)
                                                                                                    Configuring the kernel with interactive, menu      and then run                                              make menuconfig          or X window interface.                          ldd                  find out shared library dependencies.      m4 >                              make xconfig
                                                                                                                                                    lsof                 list opened files.
                                                                           Compile Kernel Source                                                    fuser filename       show processes that using the file.
                 mail aliases, must run “newaliases” after change. use
aliases          :include: to include external list in a file.             make dep                                                                 ifdown
                                                                           make zImage                                                                                   bring up/down a network interface (Redhat)
                 mail access control, FEATURE(access_db) should be set                              Building and installing a new kernel.           ifup
                                                                           make zdisk
                 in For example, in /etc/mail/access          make zlilo                                                               sysctl               configure kernel parameters (Redhat).
        REJECT                                     make bzImage                                                                                  list opened socked.
access  RELAY
        DISCARD                                Compile Modules                                                          shutdown [–r|h]
                                                                                                                                                    now                  reboot / halt computer
                                                                           make modules             Building and installing modules.
                 makemap hash /etc/mail/access < /etc/mail/access
                                                                           make modules_install
/etc/mail/relay- list all host/domain accepted for relaying.                                                                                        nmap                 scan a host for opened ports.
domains                                                                    Manage Modules                                                                                show or edit cron jobs.
Commands                                                                   insmod, lsmod, modinfo,                                                                       unconfigure system
                                                                                                   Manage loadable modules.                         sys-unconfig
                                                                           modprobe, rmmod,
newaliases       rebuild the data base for the mail aliases file.          depmod                                                                   chkconfig --list     list services started at different run level.
                 build access database, e.g,                                                                                                        kudzu                probe for new hardware (Redhat).
                 makemap hash access.db<access
                                                                           Miscellaneous                                                                                 rpm -i INSTALL a package
                                                                                                                                                                         rpm -e UNINSTALL a package
                                                                           Files                                                                    rpm                  rpm -q QUERY a package
Useful Configuration Files                                                                                                                                               rpm -U UPDATE a package
                                                                           /etc/shells       allowed login shells
Files                                                                                        user names NOT allowed to use ftp.
                                                                                                                                                    man cmd | col –b     save a man page as a text file and remove control
                                                                           /etc/ftpusers                                                            >cmd.txt             characters.
httpd.conf                   Apache web server configuration file.
                                                                           /etc/host.allow   TCP wrapper host control files.
smb.conf                     Samba server (file and print for Windows).    /etc/host.deny
lilo.conf                    LILO boot loder configuration file.           /etc/sysconfig                                                           Useful Web Site
                                                                                             contains system configuration files.
syslog.conf                  System log daemon (syslogd) configuration.    (redhat)                                                                 Useful website
                                                                           /dev/fd0          floppy drive A                               
ssh_config                   SSH client and server configuration files.
sshd_config                                                                /etc/inittab      system run level control file.               
                                                                           /etc/init.d                   default dynamic library search path (run                                                                     
                             ldconfig).                                    Commands                                                       
mtools.conf                  mtool configuration file (access DOS file).
                                                                           fromdos, todo s                                                
named.conf                   DNS name server (BIND).                       (Slackware)
                                                                           dos2unix,         convert text file from/to linux format.      
sysctl.conf                  kernel parameters by sysctl (Redhat).
ntp.conf                     net time server.                              (Redhat)
inetd.conf                   Internet super server.                        pwck, grpck       verify integrity of password and group files.
Xinetd.conf, Xinet.d         Extended inetd configuration.                 pwconv,
directory                                                                  pwunconv,                                                      
                                                                                             convert to and from shadow passwords and groups.
                             proftpd FTP server.                           grpconv,                                                       
amanda.conf                  network backup server.
                                                                           shadowconfig      toggle shadow passwords on and off.
/etc/pine.conf               PINE mail client system wide settings.
                                                                                             Manage disk quota.
Rebuild Kernel                                                             quotaoff,
Configure Kernel Parameters                                                repquota,

To top