UNIX TOOLBOX This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing. 1. System . 2 2. Processes . 7 3. File System . 8 4. Network . 13 5. SSH SCP . 20 6. VPN with SSH . 23 7. RSYNC . 25 8. SUDO . 26 9. Encrypt Files . 27 10. Encrypt Partitions . 27 11. SSL Certificates . 30 12. CVS . 31 13. SVN . 34 14. Useful Commands . 36 15. Install Software . 40 16. Convert Media . 41 17. Printing . 43 18. Databases . 43 19. Disk Quota . 45 20. Shells . 46 21. Scripting . 48 22. Programming . 50 23. Online Help . 52 Unix Toolbox revision 11 The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. Error reports and comments are most welcome -
[email protected] Colin Barschel. — System — 1 SYSTEM Hardware (p2) | Statistics (p2) | Users (p3) | Limits (p3) | Runlevels (p4) | root password (p5) | Compile kernel (p6) Running kernel and system information # uname -a # Get the kernel version (and BSD version) # cat /etc/SuSE-release # Get SuSE version # cat /etc/debian_version # Get Debian version Use /etc/DISTR-release with DISTR= lsb (Ubuntu), redhat, gentoo, mandrake, sun (Solaris), and so on. # uptime # Show how long the system has been running + load # hostname # system's host name # hostname -i # Display the IP address of the host.