Yuma Arizona Sunday Sep-05-10 04:29:33



Basic Commands

For those of you who are attending the Linux class or using a Linux Distribution that uses Debian Linux. (Ubuntu uses Debian Linux)
Here are some good places to get help and to learn Linux commands.
Mel

Debian Package commands and source List:
http://www.debianhelp.co.uk/pkgadm.htm


Debian General Help:

http://www.debianhelp.co.uk/general.htm
Debian Help Page and Basics
http://www.debianhelp.co.uk/index.php


A One Page Linux Manual

Linux Manual is a good start with commands. You should download and print this doublesided.


The Linux Shell and Commands

What is a shell, you may ask if you are not familiar with the Linux shell. The Shell is the Command Interpreter. It acts as the interface to the operating  System (Linux) and accepts your input to perform the tasks that you request.

The most common shell found in most Linux Distributions is the BASH Shell. So that is the one that I will discuss. It is worth noting that there are also Graphic User Interface Shells (GUI Shells) for those who want to point and click, and are uncomfortable with the command line shells. Using the Bash Shell from a terminal Can save time and in many cases is the fastest and best way to Make changes or do things in Linux.

For those of you who are typists or familiar with DOS. You should have no trouble using the Bash Shell and it’s command line.


Prompt Basics

From Scot's Newsletter


A One Page Linux Manual is a good start with commands. You should download and print this doublesided.

The Linux Shell and Commands

What is a shell, you may ask if you are not familiar with the Linux shell. The Shell is the Command Interpreter. It acts as the interface to the operating  System (Linux) and accepts your input to perform the tasks that you request.

The most common shell found in most Linux Distributions is the BASH Shell. So that is the one that I will discuss. It is worth noting that there are also Graphic User Interface Shells (GUI Shells) for those who want to point and click, and are uncomfortable with the command line shells. Using the Bash Shell from a terminal Can save time and in many cases is the fastest and best way to Make changes or do things in Linux.

For those of you who are typists or familiar with DOS. You should have no trouble using the Bash Shell and it’s command line.

Prompt Basics

From Scot's Newsletter

Basic Directory Commands

cd directory name changes the current directory

mkdir directory name create a new directory or directories

rmdir directory name removes an empty directory

pwd tells what directory you are in

A Few Basic File Commands

cp source_file Destination_file copies source file to another file

cp source_file directory copies source file to a directory

A summary of useful Linux commands

Starting & Stopping

shutdown -h now
= Shutdown the system now and do not reboot

halt
= Stop all processes - same as above

shutdown -r 5
= Shutdown the system in 5 minutes and reboot

shutdown -r now
= Shutdown the system now and reboot

reboot
= Stop all processes and then reboot – same as above

startx
= Start the X system (the GUI) (usually KDE or Gnome)

Accessing & mounting file systems

mount -t iso9660 /dev/cdrom/mnt/cdrom
= Mount the device cdrom and call it cdrom under the /mnt directory

mount -t msdos /dev/hdd/mnt/ddrive
= Mount hard disk "d" as a msdos file system and call it ddrive under the /mnt directory

mount -t vfat /dev/hda1/mnt/cdrive
= Mount hard disk "a" as a VFAT file system and call it cdrive under the /mnt directory

umount /mnt/cdrom
= Unmount the cdrom

Finding files and text within files

find / -name fname
= Starting with the root directory, look for the file called fname

find / -name "*fname*"
= Starting with the root directory, look for the file containing the string fname

locate missingfilename
= Find a file called missingfilename using the locate command 

- this
= assumes you have already used the command updatedb (see next)

- updatedb
= Create or update the database of files on all file systems attached to the linux root directory

- which missingfilename
= Show the subdirectory containing the executable file called missingfilename

- grep textstringtofind /dir
= Starting with the directory called dir, look for and list all files containing textstringtofind