| | AIX | Debian | FreeBSD | HP-UX | OpenBSD | RedHat | Solaris |
| Family | SYS V | Linux | BSD | SYS V | BSD | Linux | BSD and SYS V |
| Password file | /etc/passwd | /etc/passwd | /etc/passwd | /etc/passwd | /etc/passwd | /etc/passwd | /etc/password and /etc/default/password |
| Password file consistency | /usr/bin/pwdck and /usr/bin/usrck | pwck | - | /usr/sbin/pwck | Unknown | pwck | pwck |
| Shadow file | /etc/security/passwd | /etc/shadow | /etc/master.passwd | /.secure/etc/passwd and /etc/shadow | /etc/master.passwd | /etc/shadow | /etc/shadow and /etc/oshadow (optional) |
| Valid shells | /etc/shells | /etc/shells | /etc/shells | /etc/shells | /etc/shells | /etc/shells | /etc/shells (optional file) |
| Remarks | Check current runlevel (0-9): who -r | Backup list of installed packages dpkg --get-selections > file.txt Restore list of installed packages dpkg --set-selections < file.txt dselect
Reboot: shutdown -r now | printcap check: chkprintcap | Reboot: shutdown -r 0 | Unknown | Backup list of installed packages: rpm -qa > installed-software.txt
Restore: for i in $(cat installed-software.txt) ; do packages+="$i " ; done yum install $packages
printcap check: checkpc | Default run level can be found with who -r
/usr/proc/bin contains some usefull tools for monitoring PID handling (per process), process stack, process parent/children relation.
Extra binary directories: /usr/openwin/bin /usr/dt/bin /usr/sfw/bin /opt/sfw/bin /usr/xpg4/bin /usr/ccs/bin /usr/ucb |
| Website | www.ibm.com/servers/aix/ | http://www.debian.org/ | http://www.freebsd.org | www.hp.com/products1/unix/operating/ | http://www.openbsd.org | http://www.redhat.com | http://www.sun.com/software/solaris/ |
| Show installed software | lslpp installp -l | dpkg --get-selections | pkg_info pkg_version | swlist | pkg_info | rpm -qa | pkginfo |
| Install package | installp | apt-get install foo dpkg --install foo_xxx-xxx.deb dselect aptitude install | pkg_add cd /usr/ports/category/tool/ && make install | swinstall -s | pkg_add | rpm -i | pkgadd |
| Deinstall package | installp -u | apt-get --purge remove foo apt-get remove foo dpkg --purge foo dpkg --remove foo aptitude remove | pkg_deinstall pkg_delete cd /usr/ports/category/tool/ && make deinstall | swremove | pkg_delete | rpm -e | pkgrm |
| Init default runlevel | 2 (not SYS V style) | 2 | No runlevel | 3 or 4 | - | 3 (cui) or 5 (gui) | 3 |
| Boot to single user mode | Unknown | Unknown | boot -s | Unknown | Unknown | Unknown | b -s |
| Config file for init | /etc/inittab | /etc/inittab | /etc/ttys | /etc/inittab | - | /etc/inittab | /etc/inittab |
| Startup scripts | Directory: /etc/rc.d/rc2.d (/etc/rc.d/init.d on AIX 5.2 and higher)
| /etc/init.d /etc/rcX.d | /etc/rc.d /usr/local/etc/rc.d
| /sbin/pre_init_rc /sbin/rc
Directories: /sbin/rcX.d /sbin/init.d /etc/rc.config.d
| /etc/rc /etc/rc.local | /etc/init.d /etc/rcX.d/ /etc/rc.d/rc.sysinit | /etc/rcX.d /etc/init.d |
| Configure services | Unknown | Add service to startup scripts: # update-rc.d [service name] defaults
Disable service at startup: # update-rc.d -f [service name] remove | /etc/rc.conf to enable services | Unknown | /etc/rc.conf /etc/rc.conf.local | Start/enable a service: # chkconfig httpd --add # chkconfig httpd on --level 2,3,5
Disable: # chkconfig httpd off # chkconfig httpd --del
Check runlevels: # chkconfig --list httpd
Start/stop/restart service: # service httpd start # service httpd stop # service httpd restart
| Unknown |
| | AIX | Debian | FreeBSD | HP-UX | OpenBSD | RedHat | Solaris |
| Log file for login errors | /etc/security/failedlogin | /var/log/auth.log | /var/log/auth.log | Unknown | /var/log/authlog | /var/log/secure | /var/log/secure and /var/log/auth |
| Log file for messages | /var/adm/syslog and /var/adm/messages | /var/log/messages | /var/log/messages | /var/adm/syslog/syslog.log | /var/log/messages | /var/log/messages | /var/adm/messages |
| Accounting related files | Account files: /etc/security/audit/config /etc/security/audit/events /etc/security/audit/bincmds /etc/security/audit/streamcmds /etc/security/audit/objects
Start accounting: /etc/audit start | /var/log/account/pacct /var/run/utmp /var/run/utmpx | /var/account/acct (see man 8 accton) | /usr/adm/pacct | /var/account/acct | accton /var/log/[file] /var/account/pacct | /var/adm/acct/ (directory) |
| Inetd | Unknown | inetd or xinetd | inetd | inetd | inetd | xinetd | inetd |
| System manager/tools | smit, smitty or wsm | - | sysinstall | sam | - | linuxconf | admintool |
| File system tab file | /etc/fstab and /etc/filesystems | /etc/fstab | /etc/fstab | /etc/fstab | /etc/fstab | /etc/fstab and /etc/mtab | /etc/vfstab /etc/fstab |
| Common used file systems | jfs | ext2 ext3 | ufs | VxFS, HFS | ffs | ext2 ext3 | UFS, VxFS, QFS, ZFS |
| Network configuration (files) | Unknown | Configure IP address: # ifconfig eth0 inet up 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
Configure route: # route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.1 dev eth0
Network configuration file: /etc/network/interfaces
DH | Interfaces are configured in /etc/rc.conf
ifconfig_[IFNAME]="inet 172.16.1.1 netmask 255.255.0.0" defaultrouter="172.16.1.254"
| Setting IP address (static): INTERFACE_NAME[0]="lan0" IP_ADDRESS[0]="192.6.1.1" SUBNET_MASK[0]="255.255.255.0" BROADCAST_ADDRESS[0]="" INTERFACE_STATE[0]="" DHCP_ENABLE[0]="0"
Gateway (static): - Open /etc/rc.config.d/netconf - Add gateway to R | /etc/hostname.[IF NAME] | /etc/sysconfig/network
Configuration of interfaces: /etc/sysconfig/network-scripts/ifcfg-*
Static routes: /etc/sysconfig/static-routes
Gateway: route add -net default gw 172.16.1.254 metric 1
| Enable interface: ifconfig [interface] plumb Assign IP address: ifconfig [interface] 172.16.1.1 netmask 255.255.0.0 up Gateway can be specified with: route add default 172.16.1.254 1 and in /etc/defaultrouter Hostname: /etc/nodename |
| Restarting network service | Unknown | /etc/init.d/networking restart | /etc/netstart | Unknown | sh /etc/netstart | /etc/init.d/network restart | /etc/init.d/network and /etc/init.d/inetinit |
| Kernel configuration path | Unknown | /usr/src | /usr/src/sys/[arch] | Unknown | Unknown | /usr/src/linux | /etc/system |
| Tools for showing processes | topas nmom / nmom analyser | ps aux, top | iostat (report IO stats) ps aux top
| glance gpm | ps top pgrep | ps -ef top | ps psig top |
| Trace process calls | Unknown | strace | truss | Unknown | ktrace, kdump | strace | truss |
| Shutdown system | shutdown | shutdown or poweroff | shutdown -p now | shutdown -h -y [seconds] | shutdown -hp now | shutdown -h now | poweroff |
| Enable/disable GUI login | Unknown | Unknown | Unknown | Unknown | Unknown | /etc/inittab | /usr/dt/bin/dtconfig -e / -d |
| Add user | mkuser | useradd or adduser | adduser | useradd | useradd | useradd or redhat-config-users | useradd |
| | AIX | Debian | FreeBSD | HP-UX | OpenBSD | RedHat | Solaris |
| Change user | chuser | usermod | chsh or chpass | usermod | usermod | usermod or redhat-config-users | usermod |
| Delete user | rmuser | userdel or deluser | rmuser | userdel | userdel | userdel or redhat-config-users | userdel |
| Show logged in users | Unknown | w, who, last, lastlog | lastlogin w who
| whodo lastlogin | users, w | users w who
/var/run/utmp contains information | w |
| Group file | /etc/group and /etc/security/group | /etc/group | /etc/group | /etc/group | /etc/groups | /etc/group and /etc/gshadow | /etc/group |
| Check consistency group file | grpck | grpck | /usr/sbin/chkgrp | /usr/sbin/grpck | pwd_mkdb -C | grpck | grpck |
| Add group | mkgroup | groupadd or addgroup | pw groupadd [groupname] | groupadd | groupadd (group add) | groupadd or redhat-config-users | groupadd |
| Change group | chgroup | groupmod | pw groupmod [groupname] | groupmod | groupmod (group mod) | groupmod or redhat-config-users | groupmod |
| Delete group | rmgroup | delgroup | pw groupdel [groupname] | groupdel | groupdel (group del) | groupdel or redhat-config-users | groupdel |
| Show group membership | lsgroup | groups | groups [username] or pw groupshow [group] | Unknown | groups | Unknown | groups |
| Show physical memory | lsattr –El mem0 | grep MemTotal /proc/meminfo | dmesg -a | grep 'real memory' | echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm | grep 'Total Configured'
/etc/dmesg | grep -i phys | dmesg | grep mem top | grep MemTotal /proc/meminfo | prtconf | grep 'Memory size:' |
| Show disk information | Unknown | df, du | # sysctl kern.disks kern.disks: ad4
| Unknown | du, df, atactl, fdisk(8), disklabel | Unknown | iostat -xn (shows disks, fdc) |
| Adding hot plug disks | Unknown | Unknown | Unknown | Unknown | raid, raidctl, softraid, bioctl | Unknown | drvconfig ; disks (both are needed to activate a disk after hot plugging it) |
| Build system | Unknown | apt-get update; apt-get upgrade OR apt-get update ; apt-build world | # make buildworld # make buildkernel # make installkernel # reboot Boot to single user mode (boot -s) # mergemaster -p # make installworld # mergemaster # reboot | Unknown | Compile sources | Unknown | Unknown |
| Build/update kernel | Unknown | Unknown | # cd /usr/src/sys/i386/conf # cp GENERIC CUSTOM Change indent line Optional: backup kernel directory # cp -r /boot/kernel /home/yourname/GENERIC-kernel # cd /usr/src # make buildkernel KERNCONF=CUSTOM # reboot | Unknown | # cd /usr/src/sys/arch/ARCH/conf # config GENERIC # cd ../compile/GENERIC # make clean && make depend && make # make install | # cd /usr/src Unpack kernel # tar xfvz [file] # ln -s linux-[version] linux # cd linux Tip: backup your .config file (/usr/src/linux) # make menuconfig # make dep bzImage modules modules_install Copy the bzImage (kernel) to /boot # cp /usr/src/linux/arch/i386/boot/bzImage /boot/mynewkernel # Edit the boot loader to include the new kernel
Note: most distro's have their own way to upgrade the kernel, so read the distro specific information before doing an upgrade.
| Unknown |
| Download tool | Unknown | Unknown | Unknown | Unknown | ftp (also for other than FTP) | Unknown | curl |