Linux command |
Description |
pgm |
start pgm where pgm is a program found in the $PATH |
./pgm |
start pgm (allocated in current dir.) |
cd x or cd /x |
go to directory x |
cd .. or cd ../ or cd /.. |
go back one directory |
ls or dir |
list a directory |
cat |
display a textfile on the terminal |
mv x y |
move or rename file x to file y |
cp x y |
copy file x to file y |
rm x |
delete a file |
mkdir x |
make a directory |
rmdir x |
remove a directory |
rm -r x |
remove directory x and all its underlying files |
df or df x |
Show free space on device x |
top |
view memory status (q to quit) |
man x |
get a manual page about command x |
less x or more x |
view text file x |
echo |
print something on the screen mainly used in scripts |
mc |
similar to Norton Commander in DOS |
mount |
to make a device usable to the system (CD-ROM,other HD) |
umount |
umount to remove the device from being usable to the system |
halt |
to shutdown. It will also power off if APM or ACPI is being used |
reboot |
to reboot the system |
chmod <permissions> <file> |
change file permissions |
chown <owner:group> <file> |
change file ownership |
ls -l x |
perform a detailed directory listing for file or directory x |
ln -s x y |
make a symbolic link to x called y |
find x -name y -print |
find file y, begin the search from within directory x and print the results to screen |
ps |
to view all running processes |
kill x |
to terminate process x (x is PID from ps) |
killall -KILL pgm |
to kill the program called pgm |
killall -HUP pgm |
to force program pgm to restart - used in case configuration is changed |
[alt] + F1 - F7 |
switch to terminal 1 - 7 |
lilo |
to write boot information changes to disk |
startx |
to start the XFree86 GUI |
Directories |
Function |
/ |
the root of the directory tree this is the base |
/dev |
the device pointer directory all devices have an entry here |
/bin |
main CLI executables |
/sbin |
main CLI system executables |
/boot |
location of the kernel and boot information required to boot the system |
/etc |
system configuration files |
/root |
root user home directory |
/home |
normal user base directory |
/lib |
system libraries and kernel modules |
/usr |
main user binary,documentation, library location |
/opt |
extra binary/documentation,library location - eg. KDE,Gnome |
/var |
system log files,spoolers,etc |
/tmp |
temporary folder for running applications that need temp files |
/proc |
proc filesystem for kernel interaction - this is everything the kernel knows |
/mnt |
filesystem mount point for extra devices and drives |
Important Configuration Files |
Function |
/etc/lilo.conf |
boot loader configuration file - you must run "lilo" after any changes |
/etc/modules.conf |
kernel module loader configuration used by the modprobe command |
/etc/inittab |
system runlevel configuration file - tells init what to do for each runlevel |
/etc/fstab |
filesystem mounting configuration file - used by the mount command |
/etc/ld.so.conf |
library configuration file - used by the ldconfig command to find libraries |
/etc/inetd.conf |
tcp wrapper configuration - used to start ftp and other network daemons |
/etc/hosts |
local host resolution file |
/etc/HOSTNAME |
system hostname file |
/etc/profile |
system defaults for bash login default paths,colours,etc |
/etc/rc.d/rc.0 |
system halt script - run when you issue halt |
/etc/rc.d/rc.K |
system reboot script - run when you issue reboot or [ctrl] + [alt] + [del] |
/etc/rc.d/rc.S |
main system boot script - run when you boot up |
/etc/rc.d/rc.M |
main local startup script - activates other services you have chosen |
/etc/rc.d/rc.X |
GUI startup script used when runlevel 5 is selected in /etc/inittab |
/etc/rc.d/rc.sysvinit |
SysV Init script starter |
/etc/rc.d/rc.inet1 |
network startup script |
/etc/rc.d/rc.netdevice |
network card module loader - newer versions will just be added to modules.conf |
/etc/rc.d/rc.modules |
system module loader - run at startup |
/etc/rc.d/rc.hotplug |
hotplug starter script - for USB and PCI hotplug devices |
/etc/rc.d/rc.pcmcia |
pcmcia service script - for use with laptops |
/etc/rc.d/rc.local |
local startup script for user space programs |
/etc/XF86Config |
XFree86 3.3.6 configuration file |
/etc/X11/XF86Config-4 |
XFre86 4.2.1 configuration file |