Back to Workshop Main Page


Linux Introduction

Quick Links

Bash

The GNU Bourne-Again SHell is a command-line interpreter which serves as the user's interface through a terminal window to the computer.

You can navigate through and investigate the file system. You can also run programs simply by typing in their names. If it is a program which uses X, add an ampersand, &, at the end of the line.

Bash Command-Line Interpreter
UP-ARROW Display previous command
DELETE Delete character under cursor
BACKSPACE Delete character before cursor
HOME Move cursor to start of line
END Move cursor to end of line
TAB Auto-completion of unique filename
TAB TAB Display list of same-starting filenames

Back to Top

Directory Structure

Determining where you are located on the directory tree is done using the pwd program. ls is used to find out what is in one or more directories. Navigating the directory tree is accomplished with cd.

Looking for files is done with two programs: locate uses a data base of all files to provide a listing of all occurrences of a string in directory and file names; find does a search of a specified portion of the directory tree.

The floppy drive is accessible at /media/floppy.

Directory Structure
LiSt filenames ls
  hidden files ls -a
  file permissions ls -l
Print Working Dir pwd
Change to Home Dir cd
Move Up a Dir cd ..
Move Down into a Dir cd dirname
Looking for Files
Find find dirname -name 'item'
Locate locate item

Back to Top

File & Directory Maintenance

Linux/Unix do not ask if you are sure you want to do something when you issue commands from the Command Line. To be safe, you should probably use ls to check for whether the name you plan to use already exists.

File & Directory Maintenance
CoPy file cp srcname dstname
CoPy file to directory cp filename dirname
Rename (MoVe) mv oldname newname
MoVe to Dir mv filename dirname
ReMove (delete) file rm filename
MaKe new DIR mkdir dirname
ReMove DIR rmdir dirname
Permissions & Ownership
CHange File Access Permissions chmod 777 filename
CHange OWNership chown owner:group filename

Back to Top

Web Server & Browser

The Apache web server processes HTTP (HyperText Transfer Protocol) requests. These can include requests for individual graphics files, perl or PHP scripts which are executed on the server, or just simply HTML files.

SuSE Linux provides several web browsers, including Firefox, Konqueror, and Lynx. Lynx was originally developed for Unix workstations which did not have graphics capabilities. Firefox is an open-source web browser descendent of Netscape, while Konqueror is an all-purpose browser and file manager/viewer.

Server/Browser
Apache Web Server
Firefox Web Browser
Konqueror KDE file manager, web browser and file viewer
lynx Text-only Web Browser

Back to Top

Naming & Addressing

At times, it is useful to determine information about who is using what system and what the IP address of a particular machine is.

Naming & Addressing
uname Linux/Unix system information
E.g., uname -a
who show who is logged on
E.g., who
whoami print userid
E.g., whoami
ifconfig configure a network interface
E.g., /sbin/ifconfig
nslookup query Internet name servers
E.g., nslookup www.dfstermole.net

Back to Top

Communicating

Communicating with other systems is what networking is all about. Ping lets you find out if a certain machine is currently online. Telnet and ftp are the original programs for logging in on another machine and for transferring data between machines, respectively. Ssh and scp are modern programs which do the same thing, but with encryption of the information transmitted. Talk allows users to communicate with each other in real time, as opposed to by time-delayed email.

Communicating
ping send ICMP ECHO_REQUEST to network hosts
E.g., ping IPAddr
telnet user interface to the TELNET protocol
E.g., telnet -l userid IPAddr
ftp user interface to the Internet standard File Transfer Protocol
E.g., ftp IPAddr
ssh Secure SHell: OpenSSH remote login program
E.g., ssh -l userid IPAddr
scp Secure CoPy: remote file copy program
E.g., scp filename userid@IPAddr:public_html/
talk visual communication program

Back to Top

File Viewers

Most system data files are saved as plain ASCII text. More was the original file lister; its name came about because all you had to do to see the next screenful was to tap the spacebar. Less came along as enhancement; the program doesn't terminate when it encounters the end-of-file. This gave rise to quips such as "less is more, more or less". Cat concatenates files; as default, they are outputted to the screen. Head and tail display only the beginning or end of a file, respectively.

File Viewers
more filename Classic file lister
SPACE or f -- Screen Forward; b -- Screen Back; ENTER -- Line Forward; q -- Quit; Exits at EOF
less filename More versatile than more
SPACE -- Screen Forward; b -- Screen Back; ENTER -- Line Forward; q -- Quit; Does NOT exit at EOF
cat filename Writes whole file to screen
head [-n5] filename Writes beginning of file to screen
Default is the first 10 lines
tail [-n5] filename Writes end of file to screen
Default is the last 10 lines

Back to Top

Text Editors

Linux comes with many text editors. Some, such as vi and joe, run in a terminal window from the Command Line. Vi is known as the programmer's editor and is found on all Linux/Unix systems. Others are GUI editors which run in X Window, such as OpenOffice and Kword.

Text Editors
Command Linevi The classic Unix line editor
joe Editor like WordStar
X WindowOpenOffice Suite like MSOffice
Kword Simple Editor like MSWord

Back to Top

Image Editors

There are different image editors for different tasks. Xv, unlike kolourpaint and the Gimp, does not have a drawing mode. Besides the abilities listed in the table, you can grab windows or parts of graphics for later display or manipulation. Kolourpaint is a simple, easy to learn drawing program. The Gimp is the top of the line graphics program.

Image Editors
xv Classic Unix Editor for resizing, changing color depth, changing file formats
kolourpaint Simple pixel editor
Gimp Complex Editor like Adobe Photoshop

Back to Top

Programming Languages

Linux comes with a variety of free programs for assembling, compiling and interpreting programming languages.

Programming Languages
Assembler as
GNU C gcc
GNU C++ g++
GNU Debugger gdb
Java java, javac, appletviewer
MySQL mysql
perl perl
PHP php

Back to Top

Online Documentation

Thousands of programs are provided with the SuSE Linux distribution. The oldest programs have manual pages which can be read with man from the Command Line. Xman provides a GUI interface to those pages. The KDE Help Center icon in the panel at the bottom of the desktop opens a Help Center window.

Online Documentation
man progname Original standard version
Uses more; q to Quit
man -k keyword Use man to search for keyword
xman X Window version
SuSE KDE Help Center


© 1998-2006 DFStermole
Modified 20 Mar 2006