From WikiPaul - Paul Swanson's wiki
Hello, CIOS212! Feel free to edit this page to add stuff. So long as it's right. :)
Networking
| ifconfig | shows all
|
| ifconfig eth0 10.10.0.1
|
| ifconfig eth0 (|-)multicast
|
| iptables
|
| /etc/sysconfig/iptables | configuration
|
| /etc/sysconfig/network-scripts
|
| /etc/sysconfig/ifcfg-eth0
|
| neat, system-config-network
|
| route | show/manage routes
|
| netstat | active internet connections
|
| service network (stop|start|restart)
|
etc
| /etc/hosts | Give IP addresses a local name (localdns)
|
| /etc/resolve.conf | nameserver/dns host
|
| /etc/hosts.(allow|deny) | host based restrictions
|
| /etc/hosts.conf | domain name resolution
|
| /etc/services | port assignments - protocols/names/port
|
| /etc/hosts | IP address - name
|
Software management
| rpm | a package manager
|
| source
|
| rpm -i <package> | install
|
| tar xf <file>.tar(.gz|.bz2) && cd <file> && ./configure && make && sudo make install
|
| rpm -e <package> | erase
|
| rpm -q <package> | query
|
| rpm -qa | all
|
| rpm -q --filesbypkg <package> | what files come from which package
|
| rpm -q --whatprovides /path/to/file | what package provided file
|
| rpm -U <package> | Update
|
Jobs
| jobs | show backgrounded jobs
|
| ctrl+z | suspend
|
| bg | resume suspended jobs in the background
|
| <command> & | start in background
|
| ctrl+c | sends term interrupt signal
|
| ctrl+d | sends EOF character
|
| fg <job id> | foregrounds job id
|
| kill | sends a term signal to a process
|
| killall | kills processes by name
|
Scheduling
| cron | processes recurring scheduled events
|
| crontab -(l|e|) | list, edit, or remove scheduled tasks
|
| MAILTO=fspas10
|
| SHELL=/bin/bash
|
| Minute Hour Dayofmonth Month Dayofweek Command
|
| 5 * * * * rm -rf ~/temp | every five minutes, delete your temp directory
|
| */5 * * * * cat /dev/urandom > ~/owned.txt | every fifth minute
|
| 6-14 * * * * echo hi | every minute between and including 6 and 14
|
Sharing
|
| NFS | Samba | FTP
|
| Connect command
| mount | smbclient | ftp
|
| Other commands
| bash shell | list/connect | get/put
|
| Use
| unix sharing | Windows sharing | any host
|
| Files
| /etc/exports | /etc/samba/smb.conf | /etc/vsftp/vsftpd.conf
|
Startup
| /etc/inittab
|
| /etc/rc<runlevel>.d (/etc/rc3.d)
|
| Files in ^ are links to /etc/init.d/
|
| S - start
|
| K - kill
|
| number - priority
|
| init <runlevel> | changes your current runlevel to <runlevel>
|
| service | manages services in /etc/init.d/
|
| chkconfig -list | list all
|
| chkconfig --level <level> <name> on|off|reset
|
Logs
| /var/log
|
| */messages
|
| */seruce
|
| */anacron
|
| */maillog
|
| */boot.log
|
| syslog
|
| /etc/syslog.conf
|
| /etc/syslog.d/
|
| logrotate
|
| /etc/logrotate.conf
|
| /etc/logrotate.d
|