Sie sind auf Seite 1von 2

LINUX Admin Quick Reference

Author: Jialong He
Jialong_he@bigfoot.com http://www.bigfoot.com/~jialong_he

/etc/sysconfig/network (Redhat) etc/resolv.conf /etc/hosts specify name server, DNS domain and search order. host name to IP mapping file. host name information look up order. new way to specify information source. TCP/IP services and ports mapping. RPC service name to their program numbers mapping.

Files
/etc/X11/XF86config /etc/X11/xinit/xinitrc $HOME/.xinitrc /etc/X11/xinit/xinitrc $HOME/.xinitrc /etc/X11/fs/config X window configuration file. clients to run after X server started clients to run after X server started configure X11 font path.

User Management Files


/etc/group /etc/passwd /etc/shadow /etc/bashrc /etc/profile $HOME/.bashrc $HOME/.bash_profile /etc/csh.cshrc /etc/csh.login $HOME/.cshrc $HOME/.tcshrc $HOME/.login /etc/skel /etc/default User account information.

/etc/host.conf /etc/nsswitch.conf /etc/networks /etc/protocols /etc/services /etc/rpc

Commands
startx start X window system.

bash system wide and per user init files. /etc/sysconfig/iptables

Xconfigurator (Redhat) saved iptables with /sbin/iptables-save xfree86setup command. see (Slackware) http://tiger.la.asu.edu/iptables_summary.htm xf86config Ctrl+Alt+Del Ctrl+Alt+F1 Ctrl+Alt+F7 XFree86 -configure SuperProbe xvidtune xmodmap xhost xsetroot xlsfonts

setup X server and generate XF86config.

tcsh system wide and per user init files.

Commands
netconfig menu driven Ethernet setup program. setup PPP connection (Slackware). setup Ethernet during boot, for example /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} pppsetup

stop X server (on some system Ctrl+Alt+ESC). F1 temporary switch to text mode, F7 switch back to graphic mode. XFreee86 auto configuration (Plug-n-Play). detect graphic hardware. adjust X server origin and size. modifying key map and mouse button map. server access control program for X. root window parameter setting utility for X. server font list displayer for X.

contains init files for newly created user. default for certain commands.

Commands
adduser useradd, userdel, usermod newusers groupadd, groupdel, groupmod chage. chfn, chsh script to create an new user interactively (slackware) or link to useradd (Redhat). create, delete, modify an new user or update default new user information.. update and create new users (batch mode). add, delete or modify group. modify account policy (password length, expire data etc.) or finger information (full name, phone number etc.) change default login shell. host arping; arp ipchains ifconfig

/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0 /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1 lookup host name or IP (similar to nslookup). find out Ethernet address by first arping then arp. firewall and NAT (/etc/sysconfig/ipchains on Redhat)

dnsdomainname show DNS domain name.

Printer Configuration Files


/etc/printcap /etc/printcap.local /etc/lpd.conf /etc/lpd.perms /etc/hosts.lpd /etc/hosts.equiv PRINTER /dev/lp0 Printer capabilities data base. LPRng configuration file. permissions control file for the LPRng line printer spooler Access control (BSD lpd). trusted hosts. Environment variable of default printer. parallel port.

linux init=/bin/sh gain root access during boot prompt without mount w -n o remount password, can be used to fix some problems. /

NFS File Sharing Files


/etc/fstab file systems mounted during boot. NFS server export list. auto mount master file. /etc/exports /etc/auto.master

Network Configuration Files


/etc/rc.d/rc.inet1 (Slackware) /etc/sysconfig/neworkscripts/ifcfg-eth0 (Redhat) /etc/HOSTNAME (Slackware) /etc/NETWORKING (Slackware) IP address, Network mask, Default gateway are in these files. Can be edited manually to change these parameters. hostname is set by /bin/hostname during boot and the name is read from these files. Can be changed manually.

Commands
mount exportfs showmount e hostname mount a file system or all entries in fstab. export file system listed in exports show file systems exported

Commands
lpc, lpq, lprm line printer control program, print queue maintain

X Window

Sendmail Files

sendmail.cf sendmail.mc

sendmail.cf is the configuration file, edit sendmail.mc and then run m4 sendmail.mc > sendmail.cf mail aliases, must run newaliases after change. use :include: to include external list in a file. mail access control, FEATURE(access_db) should be set in sendmail.mc. For example, in /etc/mail/access cyberpromo.com REJECT mydomain.com RELAY spam@somewhere.com DISCARD makemap hash /etc/mail/access < /etc/mail/access

make config make menuconfig make xconfig

Configuring the kernel with interactive, menu or X window interface.

lilo -D dos ldd lsof fuser filename ifdown ifup sysctl socklist shutdown [r|h] now

set LILO default OS (default=dos in lilo.conf) find out shared library dependencies. list opened files. show processes that using the file. bring up/down a network interface (Redhat) configure kernel parameters (Redhat). list opened socked. reboot / halt computer scan a host for opened ports. show or edit cron jobs. unconfigure system list services started at different run level. probe for new hardware (Redhat). rpm -i INSTALL a package rpm -e UNINSTALL a package rpm -q QUERY a package rpm -U UPDATE a package save a man page as a text file and remove control characters.

Compile Kernel Source


aliases make dep make zImage make zdisk make zlilo make bzImage Building and installing a new kernel.

access

Compile Modules
make modules make modules_install Building and installing modules.

/etc/mail/relay- list all host/domain accepted for relaying. domains

Manage Modules
insmod, lsmod, modinfo, Manage loadable modules. modprobe, rmmod, depmod

nmap crontab sys-unconfig chkconfig --list kudzu

Commands
newaliases makemap rebuild the data base for the mail aliases file. build access database, e.g, makemap hash access.db<access

Useful Configuration Files Files


httpd.conf smb.conf lilo.conf syslog.conf ssh_config sshd_config ld.so.conf mtools.conf named.conf sysctl.conf ntp.conf inetd.conf Xinetd.conf, Xinet.d directory proftpd.conf amanda.conf /etc/pine.conf /etc/pine.conf.fixed Apache web server configuration file. Samba server (file and print for Windows). LILO boot loder configuration file. System log daemon (syslogd) configuration. SSH client and server configuration files. default dynamic library search path (run ldconfig). mtool configuration file (access DOS file). DNS name server (BIND). kernel parameters by sysctl (Redhat). net time server. Internet super server. Extended inetd configuration. proftpd FTP server. network backup server. PINE mail client system wide settings.

Miscellaneous Files
/etc/shells /etc/ftpusers /etc/host.allow /etc/host.deny /etc/sysconfig (redhat) /dev/fd0 /etc/inittab /etc/init.d allowed login shells user names NOT allowed to use ftp. TCP wrapper host control files. contains system configuration files. floppy drive A system run level control file.

rpm man cmd | col b >cmd.txt

Useful Web Site Useful website


http://www.linux.org/ http://www.linuxdoc.org http://linux.tucows.com/ http://www.sendmail.org http://www.gnome.org

Commands
fromdos, todo s (Slackware) dos2unix, unix2dos (Redhat) pwck, grpck pwconv, pwunconv, grpconv, grpuncov shadowconfig quota, edquota, quotacheck, quotaon, quotaoff, repquota, convert text file from/to linux format.

http://www.kde.org http://www.xfree86.org/ http://www.samba.org http://www.apache.org http://www.linuxapps.com/ http://www.internet.com/sections/linux.html

verify integrity of password and group files. convert to and from shadow passwords and groups. toggle shadow passwords on and off.

Manage disk quota.

Rebuild Kernel Configure Kernel Parameters

Das könnte Ihnen auch gefallen