Novell ® Customer CommunitiesLinux Quick Reference Guide ux k e v1.5 Contents Sponsor pages: GroupLink - 3 Steps GroupLink - 3 Solutions Linux Quick References: Console Usage Tips............................................. 1 Boot Information ................................................1 Mount Options ...................................................1 Important Linux Directories, ............................... 2-3 Configuration Files and Block Devices X Window Keystrokes .......................................... 3 Linux Commands ............................................. 4-8 (with DOS/Windows equivalents) Sponsor pages: HOT Labs - Linux Certification Boot Camp HOT Labs - Boot Camp Tour - Dates and Cities Sponsor Partners The premier provider of customer engagement software for Linux and Novell technologies. www.grouplink.net HOT Labs is Hands On Training! Custom training for new technologies. producers of www.HOTlabs.org
Important Linux Directories, /etc/ftpusers User names excluded from the Configuration Files and default operational mode of the ftp Block Devices server. Ie. If all users are denied then these are all of the users who $HOME/.bash_profile are allowed, and if all users are bash system wide and per user init allowed then these are those who files are disallowed. $HOME/.bashrc /etc/group bash system wide and per user init Group listing, passwords, and files member lists. / The root of the filesystem, all /etc/host.allow other files and directories use this TCP wrapper host control files, as a starting point. allows these systems to connect. /bin/ /etc/host.conf Binaries Directory--contains host name information look up common executables for system ordercontents operation, and cannot contain subdirectories in order to comply /etc/host.deny with HFS conventions. This is a TCP wrapper host control file next STANDARD directory. denies listed systems from connecting. /boot/previous Directory containing pertinent boot /etc/HOSTNAME information and executables, such Full hostname including domain as the kernel, and initrd, /etc/hosts grub.conf. Must be within 1024 A list of all known host names and cylinders from the start of the IP addresses physical disk. /etc/hosts.equiv /dev/ Host list of computers that are Devices Directory. This is a trusted to use rsh (remote shell). STANDARD Directory. /etc/hosts.lpd /dev/fd0 Host list of computers that are Block device that refers to the first trusted to send lpr commands to floppy drive. this system. /dev/lp0 /etc/httpd/conf/ Block device that refers to the first Directory for Apache Web Server parallel port (ie LPT1 in configuration DOS/Windows). /etc/init.d/ /etc/ Directory containing runlevel Configuration Files Directory. This scripts for system startup is a STANDARD Directory. /etc/inittab /etc/auto.master Control file that determines how auto mount master file. the system boots /etc/bash.bashrc /etc/lilo.conf Shell variables. LInux LOader configuration that Executes right after /etc/profile specifies boot options, kernels, and and /etc/profile.local on login. other boot parameters. Executes upon opening every new NOTE: Lilo must be re-run after shell. changes are made to lilo.conf /etc/bash.bashrc contains: /etc/lpd.conf - $PS1 - User command prompt Line Printer Daemon configuration - ALIAS - Aliases file - Link to /etc/bash.bashrc.local NOTE: Any changes should NOT be /etc/lpd.perms done in this file, but rather in the Line Printer Daemon permissions /etc/bash.bashrc.local file. configuration file /etc/bash.bashrc.local /etc/motd Overrides /etc/bash.bashrc Message of the Day broadcast to all Changes should ONLY be made in users on login THIS file instead of in the /etc/networks /etc/bash.bashrc file. File that contains network ranges /etc/bashrc and their associated names bash system wide and per user init /etc/nsswitch.conf files. Configuration file that defines the /etc/cron.* order in which lookup of There are 4 directories that hostnames/dns names occurs automatically execute all scriptes /etc/passwd within the directory at intervals of File that has information that hour, day, week or month defines user accounts on the /etc/default server, their shell, UID, default Default for certain commands. group, home directory, and either a hash for their password or a marker /etc/exports indicating that it is in the shadow NFS server export list. password file. 2 /etc/fstab List of block devices and their associated mount points and mount options
Important Linux Directories, /lib/ Library Files Directory. This is a Configuration Files and STANDARD Directory. Block Devices - continued /mnt/ /etc/printcap.local Mount Point Directory. This is a Printer database, changes should be STANDARD Directory. made here as /etc/printcap is /opt/ regenerated each time the daemon Optional Directory. This is a loads. This file is not used nor STANDARD Directory. referenced with a CUPS solution. /proc/ /etc/profile Kernel Process Information Sets up shell variables that are Directory. This is an OPTIONAL global for everyone. Loaded right Directory. after login. Executes once only at login. /proc/interrupts Contains which interrupts are in /etc/profile.local use and which are available. Changes to your global variablescontents should be made here. /proc/ioports Contains which I/O addresses are /etc/protocols in use and which are available. next This file contains protocol IDs and their names. Useful for /proc/pciprevious determining network traffic Lists which PCI devices are problems. already installed and their I/O /etc/rc.d/init.d/lpd [option] addresses and interrupts. [option] should be replaced with: /root/ start - Starts the print daemon Root Users Home Directory. This status - Displays the status of the is an OPTIONAL Directory. print daemon /sbin/ stop - Stops the print daemon System Binaries Directory. This is /etc/rc.d/rc.inet1 a STANDARD Directory. IP address, Network mask, Default /srv/ gateway are in these files. May edit This directory is used for manually to modify network services runtimes and working parameters. files. This is an OPTIONAL /etc/rc.d/rc.local Directory. Bash script that is executed at the /tmp/ end of login process - like Temporary Director. This is a autoexec.bat in DOS STANDARD Directory. /etc/resolv.conf /usr/ Defines IP addresses of DNS servers This directory is used as a system /etc/rpc resource. Many times, libraries, applications, and source code RPC service name to their program are installed in this folder. numbers mapping. Kernel compiling usually takes /etc/services place in the /usr/src/linux/ TCP/IP services and ports mapping. subdirectory. This is a STANDARD /etc/shadow directory. Read-only to Root access processes, /var/ used to avoid theft of user Logfiles are generally stored in passwords. the /var directory or log /etc/shells subdirectory. Variable data from The /etc/shells file serves as the applications and some binaries list of valid shells that may be are installed here. This is a loaded. STANDARD directory. /etc/skel/ ~/.Xdefaults Template folder that contains files Defines some parameters for for new users. X-Windows (~ refers to users Home Directory) /etc/smb.conf ~/.xinitrc Configuration for the SAMBA server to allow file and print sharing with Defines windows manager loaded Windows clients by X-Windows (~ refers to users Home Directory) /etc/sysconfig/ A directory containing system X Window Keystrokes configuration files. ctrl+alt+backspace /etc/sysconfig/network Stop X server (some systems use The networking configuration file, ctrl+alt+esc) specifies network interfaces, IP addresses, and other protocols. ctrl+alt+F1 Switch to text mode console 1 /etc/X11/XF86Config Configuration file for XFree86s X ctrl+alt+F7 Server Switch back to graphic mode /home/ 3 The mountpoint or directory where users personal data is stored. This is an OPTIONAL directory.
Linux Commands cpio (DOS/Windows in red) Copy files to and from archives adduser cron Script to create an new user A program that exeutes interactively commands at scheduled times. alias The file that specifies what This command is used to create this scheduale and commands an alias to a command, can be are is /var/spool/cron. used to simplify or automate long crontab tasks Show or edit cron jobs. apropos [subject] cut Extract columns List manual pages for subject date aspell (date/time) Set/display date Check spelling interactively and time at Schedule a job dd (rawrite) Write directly to a awk Interpreter for awk scripts devicecontents bash df (chkdsk) View amount of disk (command.com) Advanced space available next command interpreter diff bg Move a job to the background (fc) Compare files line by lineprevious break dnsdomainname (break) Break from loop Show DNS domain name. statements dos2unix bzip2 Convert text file from/to linux Compress files (BZip2) format cat [file] du (dir /a /s; chkdsk) View (type) Display the contents of a amount of disk space used by a file; output can be redirected directory recursively cd (cd) Change the current dump directory. Back up a disk cdparanoia e2fsck Rip audio (chkdsk/scandisk) Test a cdrecord filesystem for errors (see also fsck) Burn a CD echo chfn (echo) Display output Modify finger information (full name, phone number etc.) elm E-mail reader chage emacs Modify account policy (password Programming environment and length, expire data etc.) editor chattr env (set) Much like the set Change advanced file attributes command in that without arguements it displays current chgrp environment variables for the Change group ownership of a file current shell, except env DOES chmod NOT display the functions and (attrib) Change file or directory they are not displayed in attributes or (permissions. Note alphabetical order. With that file attributes on DOS are arguements(as in env completely different from $VARIABLE), env can be used permissions on Linux. to change or add environment chown variables to the current shell. Change ownership of a file eval chsh Evaluate arguments Change default login shell exec clear (call) Execute a new shell (cls) Clear the terminal screen exit cmp (fc) Compare files byte by byte (exit) logs out of a SU session comm or shell Compare sorted files exportfs compress export file system listed in Lempel-Ziv compression program exports continue fdformat (format) Format a floppy disk Resume a program loop fdisk cp (copy) The cp command simply (fdisk) Modify the partition copies a file or multiple files to a table target consisting of a file name or directory.cp -l - Will prompt if fg Move a job to the foreground a file exists at destination with file 4 the same file name.cp -r or cp -R Identify file types - Copy a whole directory structure (recursively)
Linux Commands - continued hostname (DOS/Windows in red) Print the system’s hostname find ifconfig (dir /s) Search for a file (ipconfig) Configures network interfaces and displays hardware free and IP addresses for each (mem) Display a summary of interface. current memory usage and availability. ifdown fsck Bring down a network interface (chkdsk/scandisk) Check a ifup disk for errors (see e2fsck) Bring up a network interface ftp (ftp) Get/send remote files inn fuser filename News sever Show processes using the file: ipchains filename FFirewall and NAT gaim (/etc/sysconfig/ipchains oncontents Redhat) Instant messaging/IRC gpm (mouse) Mouse server iptables next Firewall and NAT grep (/etc/sysconfig/iptables onprevious (find) Used to find Redhat) information in a file Format: irc Internet Relay Chat client grep [options] pattern [files] jobs grep -v Print only the lines Display current jobs that do not match joe Wordstar compatible editor grep -c Print only the count (or number) of matching lines kbd_mode (mode) Set or query the grep -l Print only names of keyboard mode files with matches grep -n Print matching lines kbdrate with line numbers (mode) Set the keyboard repeat grep -i Ignore case in letters rate (uppercase and lowercase kill ignored) (taskkill) Sends signals to grep -w Whole word search process IDsSignals: grep -s Suppress all error 01 Hangup; if you logout before messages process is done, then process will hang grip 09 Kill signal Play CDs and rip MP3s 15 Terminate (default) groupadd Add group killall (taskkill /t) Kill processes by groupdel name Delete group ldd <application> groupmod An ldd is a Dynamically Linked Modify group System Library (much like a .dll grpck file in MS Windows). Displays the Verify integrity of group files. shared libraries required by each of the applications listed on its grpconv command line. Convert to shadow groups. less grpquota (more) Page forward and Manage disk space quota per backward through files group ln (mountvol) Create a link to a grpuncov file or directory Convert from shadow groups. locate gv View Postscript/PDF files Search for a file via a database gzip look Program used to compress a Look up spelling file. After it compresses the file, it gives the files the lpc Printer control tool extension .gz to show that it lpq Display jobs in print queue has been compressed. lpr (print) Print a file halt lprm Stop all processes Remove jobs from queue head ls (dir) The list command. Displays the first 10 lines of a ls -a List all files, including any file hidden files (files that begin with head -n filename a period, as in .bash_history) Displayfirst n number of lines ls -l Long format listing of file filename (includes permissions, owner, 5 host size, modification time, etc.) (nslookup) lookup host name ls -R List directories and their or IP contents recursively
Linux Commands - continued paste (DOS/Windows in red) Appends columns lsattr perl List advanced file attributes Interpreter for perl scripts lsof List opened files persist Reestablishes a terminated PPP lspci connection Lists PCI configuration information for currently pico installed PCI buses and devices (edit) Easy to use text editor connected to them pine lynx/links E-mail and news reader Text-only web browser ping mail (ping) Check if host is reachable Minimal email client pppd makewhatis Point-to-Point Protocol (PPP)contents Daemon; Required to establish a Make the whatis database dial-up connection. pppd does NOT next man <command> start up at boot time, and usually (<command> /? ) Get help on a needs to be activated in the command modem "chat" script.previous md5sum pppsetup Compute checksums Setup PPP connection (Slackware). mkdir printtool (md) Create a new subdirectory. Similar syntax Start X printer setup interface mke2fs ps (tasklist) Display list of running processes (format) Create a filesystem on a partition pstree (tasklist) Displays a list of more processes in hierarchal order from (more) Display the contents of a parent to child file one page/screen at a time. The less utility allows scrolling pwck back and forth. Verify integrity of password files mount pwconv (mountvol/net use) Attach a Convert to shadow passwords filesystem to the root filesystem, pwd Print current directory name uses /etc/fstab to define default pwunconv options for drives and mount Convert from shadow passwords points Quota mozilla Manage disk quota (mozilla) Web browser rd (rmdir) mt Control a tape drive (rd) Remove a directory mutt rdate Text-based email client Query a remote host for the date mv (move/ren) Move/rename a file reboot ncftp Stop all processes and then reboot – Fancier version of ftp same as above netstat renice Show networking statistics Change process priorities newgrp reset Change to a new group Reset the keyboard and screen to newusers default modes Update and create new users restore (batch mode) Restore a dump nice rlogin Run a program with modified Remote login scheduling priority rm Delete files nl Returns the number of lines in a -R (del) Delete a directory and all text file its contents, including nmap subdirectories. Scan a host for opened ports -rf (deltree) Recursively delete od a directory tree Octal Dump; dumps the specified rmdir (rd) file to standard output. (rmdir) Delete an empty od -c filename ASCII Characters subdirectory (with -rf it will od -o filename Octal Characters function like deltree) (the default) route od -x filename Hexadecimal Show routing information 6 Characters passwd [accountname] Give accountname a new password
Linux Commands - continued socklist (DOS/Windows in red) List opened socked rpm Red Hat package manager soffice -i INSTALL a package Edit Word/Excel/PowerPoint docs -e UNINSTALL a package sort -q QUERY a package (sort) Sort a file -U UPDATE a package spell -e package DELETE the rpm Check spelling in batch package called package ssh Securely log into remote hosts -i --force name REINSTALL the rpm package called name having startx deleted parts of it (not deleting Start X window system using rpm -e) stat -ihv name.rpm INSTAL the rpm Display file attributes package called name stderr -l package LIST the files in the stderr - Standard Error 2> package called packagecontents stdin -ql package LIST the files and state the installed version of the Standard Input; <0 ( or 0< ) next package called package stdout -Uhv name.rpm UPGRADE the rpm Standard Output >1 ( or 1> )previous package called name stop rsync Suspend a background job Mirror a set of files stty scp Securely copy files between hosts Set/display terminal settings screen su Log in as superuser from current Allows you to use advanced login functions in a console, such as SuperProbe multiple virtual consoles, copy and Detect graphic hardware paste text, and disconnect while leaving the processes and programs suspend active while being able to Suspend a foreground job reconnect later. SVGATextMode sed Stream editor Set the screen to a different set (set) With no arguments, set resolution displays all the variables and all swapoff the functions for a current shell. Turn off a swap partition With arguments (as in set swapon $VARIABLE), set is used to change Turn on a swap partition or add variables to the current shell alphabetically. sync NOTE: This only shows variables Flush disk caches for this shell only. Any child shells sys-unconfig will need to have these variables Unconfigure system exported to them by using the tail export command. Displays the last 10 lines of a file setserial tail -n filename Used to set baud rate on a serial Display last n number of lines of device file filename sftp talk Securely copy files between hosts Linux/Unix chat sh (command.com) Simplistic tar command interpreter This program takes many files and Shadowconfig groups them all into one file Toggle shadow passwords on and archive with the extension .tar. off Tar is often used with compressed shift files from gzip. (shift) Shift positional parameters Common tar Commands: -z GZip; uncompress file using gzip showmount –e hostname while reading data. Show file systems exported -x Extract; Extract files from shutdown archive. -h now Shutdown the system now -v Verbose; Display the files being and do not reboot extracted. -r 5 Shutdown the system in 5 -f File; Read the archive from the minutes and reboot file given (if you dont specify a -r now Shutdown the system now file, tar assumes a tape drive)." and reboot tee sleep Take stdin and sends it to two Wait for some time different files slocate telnet Locate files via index Interact with another host 7 slrn time Threaded news reader with macro Time a command support tin News reader
Linux Certification Boot Camp LINUX PROFESSIONALS NEEDED! Todays employers prefer both experience and certifications. Increase your marketability and add a valuable credential to your resume by attending the Linux Certification Boot Camp. The boot camp tour is produced by HOT Labs, specialists in intensive hands-on training.contents TUITION DISCOUNT — LPI TESTS INCLUDED! The Institute for Network Professionals has arranged a discount for next HOT Labs so that you can save 25% — that’s hundreds of dollars off.previous In addition, the LPI (Linux Professioanal Institute) 101 and 102 exams for Level 1 Certification are included during the class. This intensive boot camp will also help you pass the CompTIA Linux+ exam and will provide a solid foundation for Novells CLP Roadmap*! LINUX IS HOT! Linux is proving its worth in every setting, from enterprise servers to individual workstations. Dont miss this opportunity to take advantage of all of the momentum that Linux and Novell are enjoying. Attend the 5-Day Linux Certification Boot Camp! 2005 PARTICIPANTS RECEIVE: Cities • Objective-based instruction, specifically developed to help you & pass these difficult certification exams Dates • Intensive curriculum taught by the course developers • One Linux laptop per student (to be used for homework, too) See Next • Hands-on practice labs built on Linux certification exam Page questions and objectives • Practice exam questions given and reviewed daily • Final review of objectives and sample test questions SPONSOR / PARTNER • Live, proctored LPI exams on Friday afternoon (exam fees included in tuition) • Course binder/manual and materials • HOT Labs Manual: Linux Certification Boot Camp (350 pp Color) • Linux Quick Reference Guide • HOT Labs Linux Flash Cards document for Study/Exam Preparation • Additional reference and learning tools shipped prior to course, including: • Book (O’Reilly): Linux Pocket Guide • Book (Que): ExamCram 2 - LPIC 1 by Ross Brunson • CD Course (Laura Chappell): TCP/IP Analysis/Troubleshooting • SUSE LINUX Enterprise Server 9 evaluation software • Novell Nterprise Linux Services evaluation software • SUSE LINUX Professional 8.2 and 9.1 evaluation software • Ximian Desktop 2 evaluation software TUITION: $2,495.00 — (only $1,870.00 using the 25% discount code - see below) REGISTER NOW! SEATING IS LIMITED! THANK YOU BONUS Enter code X3G7NU5E for your discount! for checking us out! CLICK TO REGISTER: to get your pdf of the www.HOTlabs.org/lpi Linux Flash Cards