Beginning Linux commands
A table of commands that were useful to me when I first began using Linux. Note that all of these may not apply to your particular distribution, configuration, etc.
adduser USERNAME- Create a new user
alias quit='exit'- Be able to type quit and accomplish the same thing as exit
Ctrl-Alt-FUNCTION_KEY- Switch consoles
apt-cache search PROGRAM- Find a particular program and its spec.s
apt-get clean- Clears out retrieved package files, frees disk space
apt-get install PROGRAM- Install PROGRAM
apt-get install PROGRAM --fix-broken- Fix the broken PROGRAM
apt-get install PROGRAM --fix-missing- Pick up where you left off
apt-get dist-upgrade- Updates everything
apt-get remove PROGRAM- Uninstalls PROGRAM
apt-get update- Do before running apt-get dist-upgrade
aumix- A tool to adjust volume
chmod NUMBER FILE- Change permissions on FILE
depmod MODULE- Lists the dependencies for MODULE
df -h- Lists partitions and their sizes, how much of them has been used, and how much space is left on each
du -h- Shows how much space has been used in the current directory
free -m- Lists the total mem./swap free/total/used/etc. in megabytes
groups- Lists the groups the current user is in
insmod- Add a module
kill -9 PID- If a program has gotten out of control, run ps aux to find out its PID (second column); then, use this command to end that program
ln -s SOURCE DESTINATION- Link something symbolically
lpr -P PRINTER FILE- Print FILE with PRINTER
ls- Lists the files in the current directory
ls -al- Lists the files in the current directory; shows “hidden” files and more information
lsmod- Lists the current active modules
man PROGRAM- Displays a manual for PROGRAM
modprobe MODULE- Activates MODULE
mount WHAT WHERE- Mount WHAT at location WHERE
nslookup URL- Finds an IP address for URL
passwd USER- Changes the password for USER
ps aux- Lists all running processes
rmmod MODULE- Remove MODULE if it is active
rpm --test -Uvh RPM- Test RPM for errors
rpm -Uvh RPM- Install RPM
startx- Start an X session
su- Become root
su USER- Become USER
shutdown -r now- Reboot computer
shutdown -h now- Shut off computer
tar jxvf FILE- Decompress a .tar.bz2 file
tar zxvf FILE- Decompress a .tar.gz file
tar zcvf FILENAME.tar.gz STUFF- Create a .tar.gz archive called FILENAME.tar.gz of STUFF
top- Displays a list of processes and CPU/memory usage
umount DIRECTORY- Unmount DIRECTORY
xv -root -rmode 9 -quit IMAGE- Make IMAGE your desktop wallpaper
comments powered by Disqus