Linux Quick Reference
Linux Quick Reference
com
LINUX Administrator’s /etc/NETWORKING
hostname is set by “/bin/hostname” during
(Slackware)
Quick Reference Card boot and the name is read from these files.
May change manually. NFS File Sharing
Jialong He /etc/sysconfig/network
[email protected] (Redhat) Files
http://www.bigfoot.com/~jialong_he specify name server, DNS domain and /etc/fstab file systems mounted during boot.
search order. For Example: /etc/exports NFS server export list.
etc/resolv.conf
User Management search la.asu.edu
/etc/auto.master auto mount master file.
nameserver 129.219.17.200
Files /etc/hosts host name to IP mapping file. Commands
/etc/group host name information look up order. mount mount a file system or all entries in fstab.
/etc/passwd User account information. Example:
/etc/shadow /etc/host.conf exportfs export file system listed in exports
order hosts, bind
/etc/bashrc multi on showmount –e show file systems exported
/etc/profile hostname
BASH system wide and per user init files. /etc/nsswitch.conf new way to specify information source.
$HOME/.bashrc
$HOME/.bash_profile /etc/networks
/etc/csh.cshrc
/etc/protocols TCP/IP services and ports mapping. Printer Configuration
/etc/services
/etc/csh.login
/etc/rpc RPC service name to their program numbers
Files
$HOME/.cshrc TCSH system wide and per user init files.
mapping. /etc/printcap
$HOME/.tcshrc Printer capabilities data base.
/etc/printcap.local
$HOME/.login
Commands /etc/lpd.conf LPRng configuration file.
/etc/skel template files for new users.
netconfig menu driven Ethernet setup program. permissions control file for the LPRng line
/etc/default default for certain commands. /etc/lpd.perms
pppsetup setup PPP connection (Slackware). printer spooler
/etc/redhat-release Redhat and Slackware version info (Linux
setup Ethernet during boot, for example /etc/hosts.lpd Access control (BSD lpd).
/etc/slackware-version kernel version with “uname –a”)
/etc/hosts.equiv trusted hosts.
Commands /sbin/ifconfig eth0 ${IPADDR} broadcast
PRINTER Environment variable of default printer.
${BROADCAST} netmask ${NETMASK}
script to create an new user interactively /dev/lp0 parallel port.
adduser ifconfig
(slackware) or link to useradd (Redhat). /sbin/route add -net ${NETWORK} netmask
useradd, userdel, create, delete, modify an new user or update ${NETMASK} eth0 Commands
usermod default new user information.. line printer control program, print queue
/sbin/route add default gw ${GATEWAY} netmask lpc, lpq, lprm
newusers update and create new users (batch mode). maintain
0.0.0.0 metric 1
groupadd, groupdel,
add, delete or modify group. host lookup host name or IP (similar to nslookup).
groupmod
dnsdomainname show DNS domain name.
Sendmail
modify account policy (password length,
chage. chfn, chsh
expire data etc.) or finger information (full arping; arp find out Ethernet address by first arping then arp. Files
name, phone number etc.) change default login ipchains firewall and NAT (/etc/sysconfig/ipchains on Redhat) “sendmail.cf” is the configuration file. “sendmail.mc” is
shell. sendmail.cf
iptables firewall and NAT (/etc/sysconfig/iptables on Redhat) a macro file which can be used to generate “sendmail.cf”
sendmail.mc
gain root access during boot prompt without by: m4 sendmail.mc > sendmail.cf
linux init=/bin/sh rw ntsysv menu driven SYSV service configuration (Redhat)
password, can be used to fix some problems. mail aliases, must run “newaliases” after change. use
mount –w -n –o remount / chkconfig command line SYSV service configuration (Redhat) aliases
:include: to include external list in a file.
makebootdisk per user aliases, use \yourname to prevent further expand
make a bootable floppy disk .forward
and keeps a copy in mailbox.
Redhat files in /etc/sysconfig
mail access control, FEATURE(access_db) should be set
Network Configuration Configuration Files in sendmail.mc. For example, in /etc/mail/access
keyboard map, e.g., cyberpromo.com REJECT
Files keyboard access mydomain.com RELAY
KEYBOARD=”/usr/lib/kdb/keytables/us.map”
[email protected] DISCARD
/etc/rc.d/rc.inet1 Mouse type, e.g.,
(Slackware) IP address, Network mask, Default gateway mouse MOUSETYPE=Microsoft
makemap hash /etc/mail/access < /etc/mail/access
/etc/sysconfig/nework- are in these files. May edit manually to XEMU3=yes
scripts/ifcfg-eth0 (Redhat) modify network parameters. /etc/mail/relay-
network settings, contains list all host/domain accepted for relaying.
network domains
NETWORKING=yes
Commands Manage Modules unset TMOUT disable BASH auto-logout feature
unset autologout disable TCSH auto-logout feature
newaliases rebuild the data base for the mail aliases file. insmod, lsmod, modinfo,
modprobe, rmmod, Manage loadable modules. kudzu probe for new hardware (Redhat).
build access database, e.g,
makemap depmod rpm -i INSTALL a package
makemap hash access.db<access
rpm -e UNINSTALL a package
Rpm
rpm -q QUERY a package
Useful Configuration Files Miscellaneous rpm -U UPDATE a package
title Windows XP
rootnoverify (hd0,0)