FreeBSD Unix Commands
Useful Unix Command Reference (FreeBSD)
Posted 20.02.06 | Updated 08.03.2007 | Contributed by Andy Mallett


commandexplanation
cdchange directory command
cd /change to root directory
cd ~ or cdchange to your home directory
cd ..change up one directory
cd ../..change up two directories
clearclear the screen (teacher's coming..)
dfshow disk freespace
df -mshow disk usage in megabytes
pwdprint working directory (shows current directory with full path)
lslist directory contents
ls -lalist all details including hidden files (begin with a .)
find / -name filenamefind a file (or directory), systemwide search
alias command(s)create an alias
mvmove (note also used to rename)
cpcopy
cp -priv dirnamecopy a directory
rmremove (delete)
rmdirdelete a directory
rm -frdelete a directory which is not empty
mkdircreate a directory
touchcreate a file
lncreate a symlink
chmodchange permissions on file/directory
chownchange ownership of file/directory
more filenameview clear text file, one page at a time
vi, pico, emacs filenameedit filename (text editors)
suswap user (login as another user)
adduseradd a new user
rmuserdelete a user
cat /etc/passwdlist user accounts on system
passwd userchange user's password (passwd alone changes your password)
whowho is currently logged on
whoamiwho am I logged on as (handy after su command)
exitexit from shell (or from previous su) (esp. telnet/ssh session)
logoutlog out of system (from console)
man commandmanual page for stated command
pciconf -lvdiagnostic utility for the PCI bus
pkg_infoshow installed packages
psshow system processes
ps -auxshow system processes in detail
ps -aux | grep pnameshow specific process name (pname)
top list all processes, starting with those taking the most CPU time
kill [process id]kill a specific running process (by process id number)
kill -9 [process id]kill a stubborn process (take that, muthaf-)
command &run a command in the background
nice command &run command in the background at a reduced priority
datechange system date and time
crontabschedule system tasks
ifconfigshow IP Address information
hostnameshow computername
shutdownshuts down the system
rebootreboots the system