Useful Linux Commands for the Lab

5/16/2012 - Optimized for Firefox 12.0

COPYRIGHT 1992 thru 2012 - David R. Woodsmall

cd = change directory chmod = change access modes on files (and directories) cp = copy files clear = clear screen df = show disk space dmsg = A FreeBSD command to peruse the contents of the System Message Buffer that have accumulated since the last reboot. Use to debug boot problems - typically: dmsgq | less du = show disk usage env = show environmental variables ethtool = Display or change ethernet card settings find = find . / -name "filename.suffix" -print > /find-output.log grep = filters out or in, specified strings - usually used with the pipe "|". ls -alF | grep -i myfile ifconfig = manage Network Intraces (list IP addr, etc) info = GNUs version of the man pages for GNU software - can be extensive. info ls insmod ModuleName = install loadable kernel module kill -9 pid# = kills the specified process (usually) ls -alF = lists all files in the working directory (the PWD) lsmod = List loaded modules lspci = Lists hardware using the PCI bus lspcmia = Lists devices using the PCMIA bus lsusb = Lists USB devices man command-name = displays info about specfied command; use q to exit. modinfo = does what it sounds like modprobe modprobe -r ModuleName = (Same as rmmod ModuleName) ps -ef = List all running processes. ps -ef | grep -i myprocess pwd = list the directory in which you are currently working reboot = rmmode = removes the specified module or modules su = become superuser or some other user ("su dave") tee = Simultaneously store output in file and send to screen uname -a = list Host Name, OS, version and other info view = invokes vi in read-only mode; use to read ASCII files. whereis = shows what path contains the module (if the module's DIR is in your path) that you would be executing. If you have 3 different versions of the same command in you path, whereis shows you which one will be executed. whoami = whom are you logged in as

Special Parameters & Options

nohup = Start a background job that will continue after you logout/disconnect & - run in the background, if the first character of the command | = pipe - used to feed output of one command into another command See also Linux(click here) UNIX / LINUX AND VARIANTS