This article brought to you courtesy of: SymbioticDesign.com Animated TM Logo We have other articles online, as well.
Be sure to check out our CyberGalley.

Indexes: Geek | English | FAQ

UNIX 101: Basic AIX/BSD/Linux/Unix Commands

Commands Index:

 FORWARD

general unix commands:

 logout    man    cd    ls    cp    mv    rm    delete 

 more    mail    pico    elm    pine    finger    talk

 whois    archie    gopher    sz    telnet    mkdir   

 kermit    rz    chmod    grep    ftp  

unix ftp shell commands:

 bye    i    image    binary    ascii    get    mget   

 put    mput    lcd    anonymous ftp login   

 remote ftp notes   

This is the Geek (command names) index. You may use the English index, or to the simple FAQ menu.
To use this article, please read the Free Redistribution License!
Go to the Symbiotic Design™ articles menu page.


Indexes: Geek | English | FAQ

Forward:
These are VERY basic explanations of some basic and often necessary commands for the Unix platform (AIX/BSD/Linux/Unix, others). To see more details on each command than is presented here, use the man command (shown below). This article is merely meant as a quick help file to get a new AIX/BSD/Linux/Linux/Unix user started. To get more info on the Unix OS and Unix Commands, I recommend an nice textbook. I like The Linux Cookbook Tips and Techniques for Everyday Use by Michael Stutz, published by Linux Journal Press.

Originally written well over 6 years ago when I was in college, I've rehashed it for our web site so that our clientele can use it to access Symbiotic Design hosted servers. This short guide might help when using the advanced SSH telnet shell capabilities or if in need of some quick Linux command reminders. This article was written using AIX (IBM's UNIX OS) as a model, as it was handy at the time. Variations of the Unix operating system may differ slightly, such as providing a different character for command prompt than the "%" (percent sign) or using a different code for the chmod command. AIX, BSD and Linux are all different flavors of the Unix OS and are often referred to as Unix even though UNIX is a trademark held by Bell Labs. I continue this tradition in this document.


Indexes: Geek | English | FAQ

Free Redistribution License:
Anyone is welcome to use this article on their web site under the following conditions: I am not held liable for anything by anyone. This document and it's images may be redistributed, used and hosted freely as long as it remains unedited, unaltered and intact (including the provided images and links back to my servers). This document and/or it's supporting files may not be sold.

By downloading, using and/or hosting this document, you agree to abide by the terms of this FREE Redistribution Agreement. Failure to do so constitutes copyright infringement.

If you would like this document on your server, I have archived all of the required files for you. Simply choose whether you want the tar, zip, sit or lha archive below. Then just unpack the downloaded archive to where you want it's "unix101" directory and link to the index.html file within the unix101 directory.

If a custom personalized version of this or any other article is provided, either party in this agreement (either you or I) may terminate this relationship at any time and remove their reciprocal links upon informing the other party. You must delete all copies of any document and supporting files authored or created by Doug Peters upon such a termination notice from either party.

Alternatively, you may simply link back to this document from your server without having to host it. You may also link back to us with a text or a provided approved banner link, whether you host this standard issue document or not. We encourage linking back to Symbiotic Design™ and appreciate it. Tell us and we will probably be quite happy to provide a link back to you as long as your web site is not prejudice, or hate inducing, criminal or contain non family oriented material such as naked pictures.

Comments, criticism, queries and requests for a customized version of this article are welcomed by the author at:


All images used in this document are © copyright Symbiotic Design™ 2001, 2002 and 2003, some even contain Symbiotic Design™ Trademarks, all rights are reserved. This document is © copyright Doug Peters 1994, 1996, 1998, 2002, and 2003, all rights reserved. The most recent update and © copyright information is provided in the last couple of lines at the very end of this HTML document.

To download the most current version, please choose your preferred archive format:   TAR   ZIP   SIT   LHA

Thank you...

-Doug Peters, Symbiotic Design's SDesign TM Logo Animated Banner    February 2, 2003.


Indexes: Geek | English | FAQ

 

Log Out of the System

When I originally wrote this at Augustana College we were all using telnet to bounce around the internet and download files. At that time this command was the most important command to know:

COMMAND:

l
(or:) } Get me outta here!
logout


At the Unix "%" prompt type either an "l" or "logout". It is very important that you understand that you need to do this so that someone else doesn't come along and start committing computer fraud on your account, and to free-up important system resources that if left open can slow down the system. If you use a modem to connect to the internet over phone lines, never simply drop carrier or just quit your terminal software without first using this command. Failure to issue the command could potentially tie up the server or put it in an endless loop as it checks for your connection and tries to resolve it. Use this command religiously so that others on the system may enjoy the internet, too. If you have trouble using this command, be sure that you are at a "%" prompt (that the % sign is the leftmost character next to the cursor). If you are in another command operation, or in another shell such as ftp or kermit, this command won't be available to you until you quit and return to the system shell. The default shell uses the "%" sign to indicate it's ready for input, so when issuing the command it would normally look like so:

% l
(or:)
% logout

Variations of UNIX and the many different Linux distributions may use different characters for the command prompt. logout is actually an alias for the l command, but most systems are setup with this alias as default.


Indexes: Geek | English | FAQ

 

Help with a Command

COMMAND:

% man command_name         - This was concocted from "manual" 

(Where command_name is the name of the command you would like a manual on, and man is the actual command that uses this as the parameter to pass in order to access the correct information, or manual, concerning the desired command.)

The Unix operating system is very robust and almost any command can be researched by looking at it's manual.

To get more information on a command and it's arguments, man is invaluable. I.E. Type "man chmod" and you will see how powerful that command is.


Indexes: Geek | English | FAQ

 

Change to Another Directory

COMMAND:

% cd [target_directory]   -"CD" is an acronym for "change directory."


If the "target" directory is provided, (along with it's path) the CD command will change it to the current directory. To get to the Parent Directory quickly, you can specify ".." (two periods) as the target, which represents the parent directory for all directory commands ("CD .."). To get to the root directory, use "/" alone as the target. To go up one directory, and into another at that level, use: "CD ../target_directory".


Indexes: Geek | English | FAQ

 

Display Directory Contents

COMMAND:

% ls [-a] [target_directory]


ls will list the current directory. If the -a switch is used, it will even list the hidden files preceded with a "." like .plan (if available). The target directory would be the directory to List. If the directory is not within the current directory, a path must be specified. This command will display a short list.


Indexes: Geek | English | FAQ

 

Copy a File

COMMAND:

% cp filename [destination]   = copy.


cp means copy, filename is the name of the file to copy, and destination is the path (if required) and directory where to put another copy of it. Since directories can be nested in a many number of other directories, the path is required when copying a file to a nested directory, as unless the directory name can be found within the current directory, it will need to locate the directory you are targeting as the destination.

In Example:

% cp text.txt folder1/folder2/destinationfolder/

The above command example is copying a file called text.txt to a directory called destinationfolder which is actually a subdirectory of folder2. folder2 in turn, is actually a subdirectory of folder1, which is located in the current directory where our file resides.

Another Example:

% cp text.txt ../destinationfolder/

Now we are copying the file named text.txt up one directory to another folder there by using the "../" annotation. Here, the system will look for a directory destinationfolder and place a copy of the text.txt file there.


Indexes: Geek | English | FAQ

 

Move a File / Rename a File

COMMAND:

% MV filename destination  = move.


MV means move, filename is the specific file, destination is the path and directory where you want that file moved to. Move does NOT keep a copy in the dir where it came from. This is also used to rename a file. If no directory exists to copy the file to, the file will simply be renamed to the name supplied. Watch out, this can getcha!


Indexes: Geek | English | FAQ

 

Delete a File

COMMAND:

% rm filename               = remove (or: delete).

    (Or use the alias, if set up:)

% delete filename          = delete (the obvious one, but only an alias, requires setup).


rm will delete a file specified in the current dir, or you can include the path with which to reach it. This command DOES support wildcarding, so watch it, "rm *" will delete the contents of the entire working (current) directory that you are in.


Indexes: Geek | English | FAQ

 

Delete a Directory

COMMAND:

% rmdir dirname            = remove empty directory.


rmdir directoryname will delete an empty directory specified in the current dir, or you can also include the path with which to reach it. rmdir will only delete empty directories, but if you need to, use rmdir -r dirname to specify an entire directory and that directory's contents to wipe off the hard drive (forever).


Indexes: Geek | English | FAQ

 

View a File

COMMAND:

% more text_filename       = display a text file, one screen full at a time.


more prints the specified text file to the screen 24 lines at a time and prompts you to press the RETURN key to go on and display more text. A path to the file must be included if it is not in the current dir. Many other commands can be "Piped" using | to pipe it (contents) to the more command. This will come in handy. During an FTP, a text or readme file can be read with the get command in the following example: "get file.txt |more".)


Indexes: Geek | English | FAQ

 

Edit Text

APPLICATION:

% pico [text_filename]


pico is much friendlier than "vi", and includes line-wrap. I can handle pico... I hate vi. However, if you are a programmer, you might like vi, it's a very powerful text and code editor, and you are probably already (or going to) use it for programming. With either, You can edit your "Plan" file to personalize your `on-line look' when someone fingers you. Alternatively, there are many other text and code editors available. Check with your system administrator as to what is available on your system, or if he can install your preferred text editing application for you.


Indexes: Geek | English | FAQ

 

Mail a Message

COMMAND:

% mail somebody@address.domain


mail is such an awkward command to use and I recommend forgetting it and using one of the email utilities immediately below. If you make a mistake, you have to start over until you get the address right. Elm and Pine are much friendlier. Other email clients are also available.


Indexes: Geek | English | FAQ

 

Mail Management Utility (AKA: eMail Clients)

UTILITY APPLICATIONS:

% elm
 (or)
% pine


elm is a simple mail management utility and while text based, is very user friendly, all the options are displayed on screen as you use it. Be sure to use the "o" key to set your Options... I recommend changing the editor to "pico".

pine is a great utility for managing your mail, and it is very advanced. The first time you use it, you will be emailed a very complete document on how to use it. This one is more complex though, but great for advanced mail routines such as attaching or detaching files to email.

Other email client applications are also available.


Indexes: Geek | English | FAQ

 

Sending eMail to FidoNet (Another Network)

To send mail from the internet to fidonet, you will need the fidonet address of the system you are trying to reach, as well as the user's login name you want to send email to. Because fidonet uses a different address system, using an entirely different email format, the mail is "gated" through a system which can read both formats and translates the message so that the other network systems can read it. I'll use my old fidonet "Wolves Den BBS" address as an example, it was 1:288/21. The first number is the Zone address (1 is for all of North America). That is separated by a colon, followed by the fido address (288). Then there is a backslash separator, followed by the Node address (21). So we have a Zone:Fido/Node format.

The internet designates this as Z (for Zone address), F (for the Fido address), and N (for Node address)... and then reverses it's order. Therefore, the fidonet address 1:288/21 becomes n21.f288.z1 after inserting the standard internet address separator (which is the period). But this is only the internet translation of the fidonet address, another internet server will not understand it. We need to gate the message to translate it, so we need to send it through the gateway, "fidonet.org". I used Doug Peters as my user name, Thus, the full fidonet address becomes the internet address of:

doug.peters@n21.f288.z1.fidonet.org

Other networks have similar translation schemes, but they are all different. Unlike Internet, Fidonet systems aren't always connected to each other, and only call to transfer mail about once or twice a day, or as required. So it may take a little while for your message to get to it's destination, but it's usually still much faster than the post office. Expect it to take 24-48 hours, your mileage may vary.


Indexes: Geek | English | FAQ

 

Receive eMail From FidoNet (Another Network)

To be able to get email from a friend who only has fidonet access, they would simply send their email through the gateway to your internet address. The gateway's fidonet address is 1:1/31 and this is the address they would type in when asked what address to send the message to. When they are prompted for the user's name at that address they want to reach, (often referred to as the "TO: Field" in BBS lingo), they simply enter your@email.address.

Other networks have similar translation schemes, but they are all different. Unlike the internet, fidonet systems aren't always connected to each other, and only call to transfer mail about once or twice a day, or as required. So it may take a little while for their message to get to it's destination, but it's usually still much faster than the post office. Expect it to take 24-48 hours, your mileage may vary.


Indexes: Geek | English | FAQ

 

Who's Here (Online)

COMMAND:

% finger                   = Find out who's on-line.


Typing finger will bring up a list of users currently online. Useful when you are looking for someone to chat with.


Indexes: Geek | English | FAQ

 

Chat

COMMAND:

% talk user_id


talk to someone (user_id indicated as argument) who is presently online. This command will send a request to someone else prompting them to chat with you online, unless they are ignoring such requests.


Indexes: Geek | English | FAQ

 

What's His/Her Address?

COMMAND:

% whois    


A little obscure, but will allow you to search for a user's internet address. Handier if used on the site he/she is online at.


Indexes: Geek | English | FAQ

 

Search the Internet

NET UTILITY APPLICATIONS:

% archie
  (or)                       }Search database indexes of public files.
% gopher


I shouldn't mislead you, I use these at home with a GUI. But lookup these ("man archie" or "man gopher") if you are interested, they can be absolutely indispensable, esp. if you are limited to text based internet exploring. At school, I would use them from Augie's menus (it's easier for me).

First:


Indexes: Geek | English | FAQ

NET UTILITY APPLICATION (#1):

% archie


The above syntax will use whatever archie server is set to as a default. archie is a powerful search facility, and to use it to it's full effectiveness, it's better to go to a sight with a strong search engine. Examples in the US would be:

Some sites are dedicated to archie searches (information is power). Find one that is powerful enough for you, then simply telnet to the remote archie server and log-on as "archie" (without the quotes), and your prompt will change to:

archie> 

Then you can set the parameters you want for your search. With show search you can find out the remote server's default search parameters. There are several types of searches:


To set the search parameters, use the set command. Example:

archie> set search regex

archie search commands include:

OK, so now you are all setup to do the search, and you type in something in the form of:

archie> prog search_string

Which will return animated incrementing values of the form:

     # matches / % database searched

These only indicate that it's actually working on it, so that you know that you haven't been forgotten. Once the search is complete, the archie server will list the results of where to get this file, starting with the server address name where it is, and then in which directories are located the pattern matching filename, listing it's exact name as well. Armed with this info you can:

archie> quit

 

-which will quit your archie search session and disconnect from telnet. Then go ftp the files from one of the places archie found `em for ya. I recommend AmFTP for Amigas. This software comes with preloaded archie server addresses to search, some specific to the Amiga.

Second:


Indexes: Geek | English | FAQ

 

NET UTILITY APPLICATION (#2):

% gopher


gopher
is another powerful internet search facility with dedicated servers supporting it's function.


Indexes: Geek | English | FAQ

 

Download a File

EXTRA COMMAND:

% sz filename1 [filename2]    = send file(s) using zmodem


This is an old command, but when I was accessing the internet from my dialup connection at home, the sz command was the best. This, of course, was back in the days when 144 and 288 modems ruled. This is not actually a usual Unix command, but an added software tool, your server would have to have and support this command for it to work. sz sends a file via modem to your home computer using the ZModem file transfer protocol when you are logged in to the server . Your term (terminal) software package must support zmodem to use it, and you must be connected to the net via a phone line modem (using terminal program software). sz also supports multiple files (batch downloading), if your term package also supports ZMODEM BATCH for downloading. sz also supports wildcarding (example: "sz *.lha *.zip *.hqx" will send all of the LhArc, Zip, and StuffIt HQX archives you have in the current server directory (the directory you are in). Your terminal must be also be configured to use the ZModem protocol in order for your computer to be able to successfully communicate with the server computer.


Indexes: Geek | English | FAQ

 

Go To Another Internet Site (To Chat or Play a Game)

NETWORKING APPLICATION:

% telnet [internet_site_address]


I shouldn't mislead you, I use another GUI web tool at home. But look it up ("man telnet") if you are interested, it can be indispensable. Some actually prefer using a telnet shell that supports the SSH (Secure SHell) encryption to keep everything secure (SSH is supported by our Symbiotic Design™ servers). If you are limited to text based internet exploring this command can be quite fun. Once you type "telnet" your command prompt will change to "telnet>" and you are in a sort of telnet shell. Here, telnet commands available to you are:

telnet> ?               Help.
telnet> quit            Quit telnet (exit telnet).
telnet> close           Close current connection.
telnet> open [address]  Connect to a site (open a connection).  
                        Prompted for site address if not given as argument (usually). 
telnet> send            Send special characters (use "send ?" for details). 
telnet> status          Display status information.
telnet> display         Display operating parameters.
telnet> toggle          Toggle operating parameters.
telnet> mode            Attempt line-by-line or character-by-character transmission mode.
telnet> set             Set the operating parameters (use "set ?" for details).
telnet> z               Suspend telnet to execute local command(s).  
                        -OR... Exit the shell to return to telnet.  
                        (NOT A GOOD THING TO LEAVE RUNNING!)

Other commands available in telnet will depend upon what the remote host will make available to you, such as News Readers, MUDs (Multi-user Dungeon games) or talk.


Indexes: Geek | English | FAQ

 

Go to Another Internet Site (To Transfer File(s))

NETWORKING APPLICATION SHELL:

% ftp (internet_site_address)     = file transfer protocol (provides it's own shell).

 


ftp is a file transfer protocol so that you can go to other sites and look through their file archives. You can browse them, download the ones you need/want to your local working directory, or use it to upload files to the other server (if you have permission). Once you are in the ftp shell, your prompt will change to:

ftp> 

Note that the ftp shell is an extended shell (as is telnet) because it has extended capabilities. I refer to this as an application shell or a network shell because of the advanced network protocols it uses, providing extra tools and functionality to the user.

For a great Amiga GUI FTP tool to use at home, use AmFTP! It's loaded with features unavailable elsewhere.


Indexes: Geek | English | FAQ

 

Quitting FTP

INTERNAL FTP SHELL COMMAND:

ftp> bye                           = quit ftp and return to default shell.


bye is one of the ways to exit ftp and return to your default shell in the current working directory. This will shutdown your network connection to the remote site and release the resources required to create the connection. quit actually does the same thing. It's up to you which is easier to remember. I like to type less.


Indexes: Geek | English | FAQ

 

Logging into Another Internet Site

THIS PROCEDURE IS DEPENDENT ON THE REMOTE SITE'S CONFIGURATION:

login: anonymous
password: username@internet.address


The above is an example, and is not the case for all sites, but any site supporting "anonymous ftp" will usually support logging into their site as "anonymous". Sometimes, if you can't get in as anonymous, you can get in with "guest". The password is dependent on each system as well, however the remote site will usually indicate what information it's looking for. Usually with anonymous ftp, the remote site will ask for your email address (i.e.: "your_id@inst.augie.edu").


Indexes: Geek | English | FAQ

 

Display a Remote Directory while in an FTP Shell

INTERNAL FTP SHELL COMMAND:

ftp> dir [target_directory]

 


dir
stands for directory (and directories are what Windows and Macintosh refer to as folders) and will give you much more info than Lson the files in a directory. dir alone will give you a longhand listing of the current directory. Used with a specified target directory to list, will give you a directory listing of the specified dir. If the directory you want to list is not directly available from the current directory you can specify it's path of directories by name separated by backslashes. I.E.:

ftp> dir path1/path2/anotherpath/yetanotherdir/targetdir 

-will list the target dir buried deeper into the system. It's usually easier to CD to the directory you want to get files from (or send them to) though.


Indexes: Geek | English | FAQ

 

Getting or Sending Binary Files

INTERNAL FTP SHELL COMMAND:

ftp> i                            = set transfer protocol for binary (image) files.
ftp> image                        = set transfer protocol for image files.
ftp> binary                       = set transfer protocol for binary files.


i
is an important command to use when ftp'ing to other internet sites before you transfer binary files and file archives. If you don't set this before a non-text file transfer, the file will be interpreted as text and the file data will change (altering it as useless). If you are transferring files to/from a remote site using a different text format than your host server does. The alternative commands for i are "image" and "binary". Also, understand that every time you log-on to a remote site, ASCII translation is active by default. If you need to transfer a binary or image file (which is any file but a plain text or html code document), you will need to issue the "i" command.

The server does this because different platforms use different text formatting. Since there is a wide variety of platforms on the internet (Unix, Windows, Mac, Amiga, Be...) the system uses this to translate text, formatting it properly for it's native platform. The architects of the internet never imagined how widely it would be grow, nor how multimedia oriented it would become, so all ftp transfers were originally designed for text with ASCII translation.

This has changed in the past few years now, and usually the software will automatically detect whether a file is text or binary. But this is fallible. It's still a best bet to set this switch before the transfer. The FTP software you use at home probably does a better job of auto detecting whether a file is binary or text.

BINARY FILES:
Executable files (
*.exe), compressed archive files (*.tar, *Zip, *.bin, *.lha & *.lzh are examples of binary archive files), Disk or Drive backup files, word processor files (*.doc, *.wpd... *Unless saved as `ASCII Text'... *.txt, *.asc), compiled data resource files, database files (probably), spreadsheet (usually).


Indexes: Geek | English | FAQ

 

Getting or Sending ASCII (Plain) Text Files

INTERNAL FTP SHELL COMMAND:

ftp> ASCII                        = set transfer protocol for ASCII (plain) files.


This command acts like a translator in that it will translate the plain text formatting used on one machine to the plain text formatting of another. IF however, you are downloading a file or archive that is ANYTHING other than a plain ASCII text document, the translation will mess-up the binary code of the file or archive and what you transferred will be useless garbage. This includes documents that have a specific proprietary text formatting, like a Word or Word Perfect document, because they save their data as proprietary binary code. Therefore, a document created in a word processor must be saved as a plain ASCII document in order to be transferred and interpreted correctly between different platform computers which use different text format coding. Remember, anything transferred with the ASCII translation mode active must be ASCII text or it will be useless. Also, remember that every time you login to a remote site, ASCII translation is active by default.

PLAIN TEXT (ASCII) FILES:
Text files, script files, uncompiled raw program source code, email, UNIX "shell archive", UUEncoded files, Postscript files.


Indexes: Geek | English | FAQ

 

Get a File

INTERNAL FTP SHELL COMMAND:

ftp> get filename                 = get a file from a remote internet site.


get
is used to get a file from another internet site. You must match the filename exactly, including case. You can also use it to view a text file by redirecting this file (with the pipe "|" key) to the program "more". The syntax would be "get filename.readme |more" -notice that there is no space between the pipe character ("|")! This command does not support wildcards. Remember to issue the "i" or "binary" command beforehand if you are getting a binary file; or issue the "ASCII" command before if you are getting an ASCII text file when you require text formatting translation between machines.


Indexes: Geek | English | FAQ

 

Get Multiple Files

INTERNAL FTP SHELL COMMAND:

ftp> mget [filename1] [filename2] = get multiple files from remote site.


mget is used to get multiple files from a remote internet site. To make the retrieval of files easier, this command does support wildcarding for pattern matching. Upon accepting the command (the computer will make sure there is at least one match for the given filenames), you will be prompted as to whether or not you want specific files matching the pattern(s). This prevents loading down your directory with a bunch of files you never wanted, which happen to match the pattern you specified. Remember to issue the "i" or "binary" command beforehand if you are getting a binary file; or issue the "ASCII" command before if you are getting an ASCII text file and require text formatting translation between machines.


Indexes: Geek | English | FAQ

 

Send a File

INTERNAL FTP SHELL COMMAND:

ftp> put filename                 = send a file to a remote internet site.


put will send a file (given as a command argument) to the remote host in the directory where you are located there. Does not support wildcarding for filename pattern matching. This is how to upload your new wiz-bang shoot-em-up to the internet public archive collection. Remember to issue the "i" or "binary" command beforehand if you are sending a binary file; or issue the "ASCII" command before if you are sending an ASCII text file and require text formatting translation between machines.


Indexes: Geek | English | FAQ

 

Send Multiple Files

INTERNAL FTP SHELL COMMAND:

ftp> mput [filename1] [filename2] = send multiple files to a remote internet site.


mput
is used to send multiple files to a remote internet site into the directory where you are currently residing (at the remote site). To make the uploading of files easier, this command does support wildcarding for filename pattern matching. Upon accepting the command, (the computer will first make sure there is at least one match for the given filenames), you will be prompted as to whether or not you want specific files matching the pattern(s). This prevents sending your whole directory with a bunch of files you never wanted to send, which happened to match the pattern you specified. Remember to issue the "i" or "binary" command beforehand if you are sending a binary file; or issue the "ASCII" command before if you are sending an ASCII text file and require text formatting translation between machines.


Indexes: Geek | English | FAQ

 

Change the Local Directory in FTP

INTERNAL FTP SHELL COMMAND:

ftp> LCD [local_target_directory] = change the local working directory.


LCD will change the local directory. When you "get" files, they are sent to the directory you left when you issued the ftp command. This is useful when you want to send the files to a directory other than that one. Note that the specified directory has to exist, and that you must have write privileges to that directory in order to receive files there.


Indexes: Geek | English | FAQ

 

NOTES ON FTP:

The ftp shell can still use UNiX commands *IF* they are available on the remote machine. Therefore, to change directories use the CD command. The Ls command may help you read a directory a certain way (according to the options you use), but this command may not be available to you on the remote machine you have ftp'ed to.

After you "get" archives or "mget" multiple archives, these files only exist in the directory you were in when you transferred them. If you need these archives on your home computer, you will have to download them to it using the "sz" command or "kermit" shell (you would issue a "send" command in the kermit shell, but kermit is much slower than zmodem).


Indexes: Geek | English | FAQ

Commands to Know for Setting Up a Home Page or Web Site


(But are Still Good to Know):


Indexes: Geek | English | FAQ

Make a New Directory

COMMAND:

% mkdir directory_name =    make a directory.

mkdir allows you to make a specified directory within your default directory. This allows you to categorize stuff and organize files, should you want. I do recommend it, the more organized your directory structure is, the easier it will be to deal with as your collection of files grows. But most importantly, you will need it to setup the directory where you will put your home page. Symbiotic Design™ hosted clientele should note that their web page default directory is already set up (it's "www"). Many college servers use a "www" directory to store a user's world wide web materials and documents. Some use a directory named "public_html". Check your school handbook, your internet policy guidelines or ask your computer system administrator. Usually by default, everything in this directory and any sub directories are considered public, although you will probably have to give the world permission to view each file.

1) First, make sure that you are in your home directory. This should be the directory you enter when you log on to the system. If not, use the CD command to change to your home, or log-on directory.

2) Follow the directions below to make either a www or public_html directory or use another required name in substitution of these directory names (remember, these names are case sensitive).

2a) To make a directory called www:

% mkdir www

2b) To make a directory called public_html:

% mkdir public_html

2c) For any other directory name simply type "mkdir" (without the quotes), then add a space and type in the exact name of the directory name you need to create and then press the ENTER key.

-Remember that you have to do this from your default user directory (where you are when you log into your shell account on the server).


Indexes: Geek | English | FAQ

 

Getting Your Home Page onto the Internet

ACCESSORY SHELL:

% kermit

Your terminal must be configured to use the kermit protocol in order for your computer to be able to successfully talk to the server computer. Once it is, you can type:

% kermit

Once in the kermit shell, the prompt will change to "kermit>", type:

kermit> receive filename

-and then manually upload the file from your home computer. When you're done, type:

kermit> ?

-and you will see lots of commands you may be able to use sometime. To exit the kermit shell, type:

kermit> q


Indexes: Geek | English | FAQ

ZModem Upload to Your Shell Account

EXTRA UNIX COMMAND:

% rz               = Upload file(s).


As an alternative to the good ol' reliable and very slow kermit command, you may prefer to use ZModem. With ZModem you can batch upload, (upload several files in one batch) if your terminal program supports the ZMODEM BATCH protocol. If you have several files to upload (a set of linked pages or images for your home page, this makes things much easier and quicker. And it's just as reliable as kermit. To invoke rz, simply type it. Then you have to issue the upload (or send) command from your terminal. rz will time out after a very short while, though, so I recommend that you set up the upload from the terminal side in advance. Also, your terminal must be configured to use ZModem protocol in order for your computer to be able to successfully talk to the server computer.


Indexes: Geek | English | FAQ

 

Change or Modify the Protection Bits of a Directory

COMMAND:

% chmod code filename

chmod isn't easy to explain, because it requires explaining the UNiX filesystem and it's file protection codes. But it is necessary to chmod your home page directory and files to make the home pages available on the world wide web so that everyone can see it (that wants to). Augustana College's AIX system used the code 755 to make pages public. So I'll simply tell you to:

% chmod 755 public_html 

-to make a public_html directory accessible to the public. If you use another directory name for your public world wide web files, you would use that name, instead. Symbiotic Design™ hosted clientele already have theirwww directory set to public.

Also chmod any other directory or files in there that you want to make available for the world to see (with the same command syntax). You will also have to chmod chmod does accept the wildcard, so you can easily make everything available to the world in one fell swoop by changing that directory to the current one ("CD public_html") and "chmod 755 *". Also, if you plan on using "tia" (The Internet Adapter) to connect with PPP or Slip, you will have to use chmod again to make it executable. The tia docs will tell you everything, including how to use chmod on the tia file, they write good docs! If you need it, ftp to marketplace.com.


Indexes: Geek | English | FAQ

Find a Defined Text String in a Text Document

COMMAND:

% grep text_string text_filename


grep
is an extremely powerful text searching tool, and it's options are awesome. So instead of going into it, I'll give you an example. At Augustana College, when I originally wrote this, in order to access the internet with a graphical web browser such as; Netscape, IE, Mosaic, Voyager, AWeb or IBrowse you will needed to know your user ID number and your group ID number. This is contained in a file of all the users at Augie, it's kind of a database for the system located on the inst server. To find out your ID numbers you would need to search the file for the line with your username (your login name) using the command syntax:

% grep login_name /etc/passwd

-it would then be displayed to you. login_name is your user name on the system, /etc/ is the path, passwd is the filename. The first part is your login name which you searched for, then there's a ":!:" and then the user id # ("uid"), another colon (":") and then your group id # ("gid"). That is followed by your real name and the college server name (the actual Domain Name). Warning, don't even try to change this file, you could windup in trouble. You don't have the access, anyway. But, now you can find stuff out about yourself you may not have even known.

grep is a powerful tool to search large text files looking for a text string where your needed information is. Use the "man" command to find out more about it's abundant options.


Indexes: Geek | English | FAQ

 

Final Note:

With today's advancements in technology it's hard to believe that just over 5 short years ago we were still pretty much tied to a command line driven interface when dealing with servers and web sites. And yet, just as many people still prefer to code in assembly language over a high level language like Java or C++ (GO GET 'EM, TIGER!), there are many today who still manage complete and complex servers using a command line interface. Using an SSH enabled telnet client, it is actually more secure. Other users may refuse to update their systems to accept the over bloated code of modern tools, and it's easy to understand why as the modern software gets buggier and buggier. But it is done. If you need a small little UNIX help file to play with the BSD command line interface under MacOS X, or just to access your Linux server from your backup PC while the XP machine is in the shop, I hope this will help.

While tools have improved radically in convenience over the years, some systems just can't support them. I am tired of upgrading my OS to a buggier version all the time just so that I can run the latest Photoshop version. Nevertheless, if you need to put a web site online, even if you are just getting started, you can.

If just one person is just starting out and this is of any help to him or her, I have done what I set out to do reviving and revamping this old article.


Indexes: Geek | English | FAQ

UNIX 101: Basic Unix Commands

Index (English):

FORWARD

general unix commands:

logout of the system help with a command change to a different directory

list a directory contents  copy file move file remove file delete file  

view a text document email another user pico text and code editor

elm email client pine email client who's online? chat 

who is another user? archie search facility gopher search facility

send file(s) via zmodem visit another server via telnet make a directory  

kermit file transfer utility receive file(s) via zmodem

change or modify directory and/or file(s) protection bits

search for a given string within a text document with grep

the network file transfer protocol shell

unix ftp commands section:

logout of the ftp shell ftp image file transfer transfer an image with ftp

transfer a binary file transfer a ascii text file

get a file from the remote server get multiple files from the remote server

put a file onto the remote server put multiple files onto the remote server

change the local working directory from within the ftp shell

log into another server as anonymous or guest

some final notes on accessing remote servers with ftp


This is the English index. Go to the Geek index, or to the simple FAQ menu.
To use this article, please read the Free Redistribution License!
Go to the Symbiotic Design™ articles menu page.


Indexes: Geek | English | FAQ

UNIX 101: Basic Unix Commands

FAQ Index:

Please follow any included links for complete answers to your question.

What's this article's purpose?
How do I log into the system?
How do I log out? 
What is TCP?
What is a LAN?
What is a WAN?

Can I use this document with my pages on my web site?
What do I get if I ask for a customized version without most of the links back to you?
What do you want in return for a personalized custom version of this article?
Do you know your page has funny bullets on it?
Just kidding

Question: What's this article's purpose?
Answer: While many don't use a command line interface when accessing other servers or the internet and such, some still do. Follow the link to this short Forward explaining this article.

Q: How do I log into the system?
A: Your system administrator has assigned you a username and a password. At Symbiotic Design™ these were the selections that you chose when you signed up for our web hosting service (as long as that username wasn't taken, in which case we would have contacted you for an alternate choice). This is usually the case when signing up for a web hosting service such as ours, but procedures for setting a username and password vary widely. Your business or school administrator may have chosen a username and password for you no matter how you feel about it. Nevertheless, you will need these two pieces of information to log into the system. If required you may get a URL (Universal Resource Locator... a means of internet addressing) with which to login to as well.

If you are trying to log onto your own Linux based system, I suggest running out to Barnes and Noble real quick and grabbing a book on Linux, because YOU are the system administrator. But you are probably trying to connect via a remote connection. The one thing you will have to setup is an IP, an Internet Provider, unless you are trying to access the server through school or work. If you are going through school or work for your connection they have probably already set up an IP address and other information you will need to configure your remote access computer system. Be sure to do this first if it isn't already done. If you can access the world wide web, you are already setup, on to the next chore...

Armed with your username and password, it will depend upon who's system you are on, how it is setup, and how you are trying to access it to give you an accurate answer. At one time at Augustana College, all that you had to do was hit RETURN at an online campus AIX terminal and you would be presented with a log-in prompt for your username and password. Now the system servers are usually accessed through remote personal computers using a variety of methods running on top of TCP. Most modern operating systems come with wizards to easily setup both your IP and TCP stack.

First of all, you will need to establish a TCP connection to the network. This could be a connection to the internet or possibly to the server, LAN, or WAN with which you can directly access (through school or business). This connection can be made in a number of ways, through a direct connection (such as on a college campus), via a dialup account. There are also broadband connections such as DSL modems which use your telephone line, or cable modems for access through special coax cable lines. And now satelite has entered the picture. Oh, and laser broadcasting is available in some cities. If you have your choice, stick with broadband! My choices are DSL first, then cable, then laser, then satelite. Only get a dialup account if you only use the internet for email, and that's it.

OK, well you were connected all the time, but I just don't want to miss anything I should tell you. But if you weren't, you decided on your means of connecting, picked an ISP (Internet Service Provider) and are all setup and viewing the web. Believe it or not, you are all ready to log into most web servers and manage accounts, etc. You will need to have a specific url to access into in order to These days it seems as if everything is web based, though there are a wide variety of other tools available.

Terminal software (which makes your computer act like a terminal connected to the server) were often used through dialup accounts. Some terminal software will even support the old kermit transfer protocol. Another option is telnet. Now that SSH encypted telnet shells or client software is available this seems to be growing in popularity. Usually you would run telnet on top of a terminal connection. FTP is also available. FTP comes in a wide variety of flavors. But the single most common way users accesse their accounts on the internet today is through the world wide web. It's just convenient and easy. If you are trying to access your account on one of our servers, we have sent or will send an email to the email address you provided as soon as your account is setup. This email will have important information on how to access your login screen with your browser and you will easily be able to access your control panel.

Q: How do I log out?
A: In a command line interface, the command to use is logout. Or just use a small caps "L" (with no quotation marks). On the web you will probably just click on a link or close your browser or both.

Q: What is TCP?
A: TCP stands for Terminal Communications Protocol. This is the protocol that all of the internet presently uses to contact each other, send files, and stay connected.

Q: What is a LAN?
A: Local Area Network. If you have a network between two computers at home, this is a perfect example of a localized network because the network is local to your building.

Q: What is a WAN?
A: Wide Area Network. A perfect example would be the internet, as it is a global network and covers a wide area. Many large businesses and college campuses also use a WAN with multiple servers which are dedicated to specific tasks.

Q:
A:

Question: I like this article, can I use this document with my pages on my web site?
Answer: If you agree to follow and abide by the FREE Redistribution License, yes. I even provide you an archive in your preferred archive format for immediate downloading there. Plus, I will get you a custom version, link to your site and link to the document on your site if you will link back to me.

Q: What do I get if I ask for a customized version without most of the links back to you?
A: A nice clean customized web document which tailored to your needs with or without your logos and advertisements. I would:

#1) I remove the SymbioticDesign.com logo from the top and bottom of the document and replace them with your own logo(s), or your own banner(s), which you supply, or I can leave the header and footer blank. The top header logo can be any size up to 500 pixels wide by 200 pixels high. The bottom footer is the standard banner dimension of 468 pixel width and 68 pixel hieghth.

#2) I can even insert additional logos or banners. Currently, I don't to include more than four more logos or banners within the actual body of the text. That makes for a total of one logo 500x200 and 5 logos or banners up to 468x68.

#3) I can also include small return buttons or links for users to return to your designated page url in both of the indexes and the FAQ so that readers can easily return to YOUR website. These buttons which you would supply or pick out from our CyberGallery would replace the links that I am currently using in these spots.

#4) You can specify a background color and the header and footer color for your version of this page. Just tell me what color to use. I am using good old black on this page.

#5) You may add a few small text sentences with links for each side of the logo or banner in the header and footer.

#6) If you prefer, you may also include a background that the text will show up on clearly (either a very light or very dark pattern or tile).

#7) I also remove almost most of the links to my servers (including the links to more of our articles and our CyberGallery), except five of these for trademark, copyright and contact purposes. The links I leave: I keep the 10k SDesign™ animated 120x60 logo ad, but this graphic is pulled from my server. My two scrambled Javascript email links stays. One is in the FREE Redistribution License section with the off-loaded SDesign™ logo. This way people can get a copy of the current reincarnation of this article to use with their pages on their website, or contact me. The other email link is in this FAQ section so that someone can easily contact me with an unanwered question. I also keep a text link back to my main entrance page with the text: "This article provided by YOUR (COMPANY) NAME through a reciprocal link with Symbiotic Design™." And I keep one text company link in the footer where I have my copyright notice.

#8) I add a link and description of your website to my links page that will take users back to your website if they click on it. I also add another link to your version of the article

I just need to protect my trademarks and copyrights and the way to do that is to

Q: Sounds good, what's the catch? What do you want in return for a personalized custom version of this article?
A:
I just need a link back to my website in a prominent location such as an entrance page to your web site. You may use a simple text link such as provided below, or a fancier banner of your choice which you may select from our banner page.

<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://www.symbioticdesign.com/">Symbiotic Design</a></font></b>

You can copy and paste the code above into your HTML.

Once the link is prominently displayed in an entrance page on your website, contact me via email, tell me the url of the page, and attach your logo of up to 500 width x 200 height (pixels) and up to 5 other smaller logos or ad banners no larger than 468x68, and any other material you may want to send.

Q: Do you know your page has funny bullets on it?
A: Your system is probably running in a Windows desktop and low on resources? This document is currently 97 kb, the SymbioticDesign.com animated logo is only 45kb, the SDesign™ animated ad logo is only 10kb, and the static bullet and the animated rollover bullet are only 1kb each for a total of less than 160kb. Try rebooting your system and see how it loads.

Q: Don't you have a sense of humor? I meant I like them.
A: Yes.    ;-D    I just have to make sure. Thank you. (see question above)

This is the FAQ section. Go to the Geek index, or to the plain English index.
To use this article, please read the Free Redistribution License!
Go to the Symbiotic Design™ articles menu page.

-dp

SymbioticDesign.com Animated TM Logo We have other articles online, as well.
Be sure to check out our CyberGalley.

FREE Redistribution rights are granted for this article as long as this document and all of it's components (images and links) remain unedited, unmodified and intact. This document may not be sold. By downloading the archive, using and/or hosting this document, you agree to abide by the terms of the FREE Redistribution License.
Comments, criticism, queries and requests for a customized version of this article are welcomed by the author (see contact info).
This document © copyright Doug Peters 1994, 1996, 1998, 2002, all rights reserved. Last update & ©: February 2, 2003 .
All images used on this page © copyright
Symbiotic Design 2001, 2002 & 2003.