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

LINUX Admin Quick Reference by ybh46000

VIEWS: 304 PAGES: 2

									  LINUX Admin Quick Reference                                                   /etc/sysconfig/network
                                                                                (Redhat)
                                                                                                                                                             Files
                         Author: Jialong He                                                                      specify name server, DNS domain and         /etc/X11/XF86config      X window configuration file.
                          Jialong_he@bigfoot.com                                etc/resolv.conf                  search order.                               /etc/X11/xinit/xinitrc
                    http://www.bigfoot.com/~jialong_he                                                                                                                                clients to run after X server started
                                                                                                                 host name to IP mapping file.               $HOME/.xinitrc
                                                                                /etc/hosts
User Management                                                                                                  host name information look up order.        /etc/X11/xinit/xinitrc   clients to run after X server started
                                                                                /etc/host.conf
                                                                                                                                                             $HOME/.xinitrc
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.
                                                                                                                                                             startx
/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                                                                                                   http://tiger.la.asu.edu/iptables_summary.htm 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).                              0.0.0.0 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/printcap.local
                            shell.
                                                                                                                                                             /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.
                                                                                                                                                             Commands
/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
                 sendmail.cf is the configuration file, edit sendmail.mc   make config                                                              lilo -D dos          set LILO default OS (default=dos in lilo.conf)
                                                                                                    Configuring the kernel with interactive, menu
sendmail.cf      and then run                                              make menuconfig          or X window interface.                          ldd                  find out shared library dependencies.
sendmail.mc      m4 sendmail.mc > sendmail.cf                              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 sendmail.mc. For example, in /etc/mail/access          make zlilo                                                               sysctl               configure kernel parameters (Redhat).
                 cyberpromo.com REJECT                                     make bzImage                                                                                  list opened socked.
                                                                                                                                                    socklist
access           mydomain.com RELAY
                 spam@somewhere.com 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.
                                                                                                                                                    crontab
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
                 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                                         http://www.linux.org/
ssh_config                   SSH client and server configuration files.
sshd_config                                                                /etc/inittab      system run level control file.                         http://www.linuxdoc.org
                                                                           /etc/init.d
ld.so.conf                   default dynamic library search path (run                                                                               http://linux.tucows.com/
                             ldconfig).                                    Commands                                                                 http://www.sendmail.org
mtools.conf                  mtool configuration file (access DOS file).
                                                                           fromdos, todo s                                                          http://www.gnome.org
named.conf                   DNS name server (BIND).                       (Slackware)
                                                                           dos2unix,         convert text file from/to linux format.                http://www.kde.org
sysctl.conf                  kernel parameters by sysctl (Redhat).
                                                                           unix2dos                                                                 http://www.xfree86.org/
ntp.conf                     net time server.                              (Redhat)
                                                                                                                                                    http://www.samba.org
inetd.conf                   Internet super server.                        pwck, grpck       verify integrity of password and group files.
                                                                                                                                                    http://www.apache.org
Xinetd.conf, Xinet.d         Extended inetd configuration.                 pwconv,
directory                                                                  pwunconv,                                                                http://www.linuxapps.com/
                                                                                             convert to and from shadow passwords and groups.
                             proftpd FTP server.                           grpconv,                                                                 http://www.internet.com/sections/linux.html
proftpd.conf
                                                                           grpuncov
amanda.conf                  network backup server.
                                                                           shadowconfig      toggle shadow passwords on and off.
/etc/pine.conf               PINE mail client system wide settings.
                                                                           quota,
/etc/pine.conf.fixed
                                                                           edquota,
                                                                           quotacheck,
                                                                                             Manage disk quota.
                                                                           quotaon,
Rebuild Kernel                                                             quotaoff,
Configure Kernel Parameters                                                repquota,

								
To top