j tan()JTAN
ServicesResourcesContactNewsMembersSignup

Unix Shell FAQ

What is a shell prompt?

If you access your account by SSH, the system drops you right into a Unix shell prompt. A Unix shell is kinda' like DOS, except it works right.

On JTAN, you are allowed to choose a name when you first subscribe, and you are given a home directory. (/home/yourname). When you logon with your name and password at the 'login:' prompt, you will be brought to a prompt that looks something like this:

  callisto:/home/yourname>
This is called the command prompt, and is where all of the Unix commands are executed. The DOS equivalent of this would be the 'C:\>' prompt, except that the slashes go the "right" way on Unix and the drive letter is replaced with the name of the computer, in this case "callisto".

Note that Unix commands are case sensitive. This causes endless grief for people THAT HAVE BROKEN SHIFT LOCK KEYS.

What type of shell/operating system will I be using?

After many years of running SVr4 and Solaris 2.x on the shell machine, home.jtan.com, we are now running OpenBSD, a very powerful and secure flavor of Unix. Depending on the time of day and phase of the moon, your default shell may be sh, ksh, or bash. It's easy enough to change your shell interpreter through the secure members page -- click on the little "config" wrench iccon for your shell and set the interpreter. Numerous shells are available, such as the standard shell ('sh') or the Linux favorite 'bash'. Unless you are having problems with compatiblity between ksh and your programs, or your religion, you shouldn't need to change it.

Some folks wonder why we "chose" to not run Linux. We have nothing against linux, but when we started this operation (1991) Linux in a useable form did not exist. We grew up using Sun workstations and SVr4 unix. Today, The level of crime and fraud on the internet is such that we wanted a stronger, more secure OS. Windoze and Linux (particularly Red Hat) are targeted by many attackers.

Changing Passwords

Periodically you may want to change your password. Normally, if you already have a strong password and only access your account through encrypted connections like SSH, there is probably no need to change your password --- ever.

You may want to occasionally change it if you feel your security has been violated. You may think that someone looked over your shoulder either physically or electronically.

In all seriousness, we have seen many, many instances where ProShell accounts have been compromised by snooping. It's not fun to discover that an account you paid real money for is unaccessable to you because some hacker stole it from you.

For these reasons JTAN requires the use of strong passwords. And the only way JTAN permits you to change your password is through the web based interface in the Members Area. You may not change your password through the shell.

Q: I changed the password for my shell account using the members area. That worked fine, but I noticed that it didn't change the password for the PPP/POP/MySQL/FrontPage... login. How do I do this? Is it covered in the FAQ's?

A: You need to select the feature for which you want to change the password, and change the password separately. There is no way to change ALL PASSWORDS to be the same.

Mail Forwarding

Basic mail forwarding can be accomplished from the Members Area. By default, your mail goes to the POP server. This is what most people want. However, some people want their mail sent to their shell. You can forward your mail to your shell account quite easily in the members area.


Q: Why don't I get any mail in my shell account?

A: Because you didn't forward it there.


Note that if you forward your mail to somewhere other than the POP server, it is no longer acessable on the POP server. (Doh!) You can also forward mail to multiple addresses.

The standard unix .forward mechanism, along with the more powerful .procmailrc mechanism, is available. However you need to forward your mail to your shell account to use these.

How do I send files with mail in UNIX?

Most folks these days will use pine or mutt to send the file as a MIME attachment. This is a lot easier than what we did years ago using uuencode.

A more flexible way to send multimedia from the unix shell is with metamail. See "man metamail" for more information. If you don't like reading instructions, try typing "metasend" and follow the prompts. Pine users can send metamail attachements directly from pine by simply listing a file name. MIME and metamail are compatible with most internet mail systems. They are also compatible with AOL so long as only one attachment is sent at a time.

N.B. Although this is better today than in years gone by, binary files larger than a few megs may not make it through. This is a "feature" of the Internet --- not JTAN. I guess there must be some DOS 3.3 systems out there somewhere.

How do I add a cool signature line?

Most programs get your signature from a file called ".signature" that must be in your home directory. Note that files with a leading dot are invisible under the Unix "ls" command. you need to type "ls -a" to see them. You can create a .signature file with the "em" or "pico" editors. You can also upload one. Be sure to use the "d2u" command to strip off any DOS carriage returns.

A significant exception to the above standardized .signature file is the elm mailer. Elm won't find a .signature file unless you first set your user level to "Intermediate" by typing "o" for "options", change your User level, and save the options. You then need to go into your new .elm directory and edit the new "elmrc" file, adding the lines:

# local ".signature" file to append to appropriate messages...
localsignature = /home/yourname/.signature
# remote ".signature" file to append to appropriate messages...
remotesignature = /home/yourname/.signature

Mutt also requires setup to find .signature files.

Or you can just use pine :)

How do I filter SPAM?

We hate spam too.

Unfortunately, as a service provider we don't like to make judgements about what is or is not acceptable for our customers to receive. All we can do is to require that the mail have a valid domain and not be overtly spam-like, as per the RBL.

A really good way to avoid spam is to do mail filtering with procmail. You can use something like vipul's razor or Spam Assasin to do real-time spam checks with procmail. If you need to know more about mail filtering and how it works, please look at Nacy McGough's Mail Filtering FAQ at http://www.ii.com/internet/faqs/launchers/mail/filtering-faq/

Another good resource is Timo's Procmail Tips and if you really want to get tough, try Foiling Spam with an Email Password System

How do I send the same e-mail message to multiple addresses?

You need to say what email application you are using. If you are using pretty much any Unix mailer (elm, mutt, mail, mailx, etc...) you can simply list addressees separated by blanks (In the actual header, they get commas).

BTW, elm and mutt have a "Group Reply" feature that allows you to reply to all adressees that were listed in your incoming message. It's handy for informal group discussions. That feature, and the "Bounce" reply feature are very useful. Bounce lets you redirect mail to another person without your name appearing on the header --- it's like you never got the mail so the person to whom it was "bounced' thinks it was written directly to him. This is great for redirecting "you're fired" notices, jucy gossip, or playing April fools pranks.

I have never seen these features in any Windoze mailers.

Another feature that elm has that I HAVE seen in PC mailers (it's quite common, actually) is a local group alias. You can make up a single name like "family" that you can use to refer to a group of people. Note, this is different than a mailing list. A mailing list is a single name that anyone in the world can use --- a local group alias only works for the one individual that sets it up.

Usenet News

Refer to the document "What is Usenet" or maybe another opinion for a detailed description of the most underrated part of the Internet. If you think WWW is where it's at, you may be missing the real show.

JTAN offers a Usenet server (news.jtan.com) that handles about 100,000 groups. You can get an idea of the active groups we see from a typical newsrc and newsgroups file. If you understand Usenet, you know that there's nobody in charge, so the content of a feed can vary. If we aren't seeing volume on your favorite group, we can inquire upstream if you ask us to, but we can make no warranty or other promise about our ability to acquire any particular group.

News can only be read from a JTAN shell machine, or via a SSH tunnel through a shell machine. See our tunneling FAQ for all the details on tunneling.

From the shell prompt, usenet news may be read with a reader like "nn" or "tin". Tin is menu driven and very easy for beginners to figure out, although it can be a bit slow to start up. Nn is considered one of the most powerful newsreaders on the planet, and is extremely fast. However, it is very complicated, and may take a while to get used to.

Using the NN Newsreader

The nn newsreader is the fastest on the planet a LOT simpler than it first looks. If you keep in mind that lower case letters select articles and UPPER CASE letters are the commands, then you've got it made. Here's what you do:

  1. Run nn by typing nn from your shell prompt.
  2. Go to the group you want. Type an upper case G and then the group Name. When nn prompts "Number of articles", take the default by hitting enter.
  3. Select the article you want to read by hitting the lower case letter next to it. If you want to see more articles hit the space bar. If you get past the end of the group, nn will move to the next group in sequence.
  4. Hit an upper case Z and read the article. Scroll with the space bar. You'll go automatically back to the menu when you scroll past the end of the article. Hitting N works too.
I use nn every day and I hardly ever use more than these commands. If you want to know more commands, hit ? and print out the one page summary that appears.

HINT: When selecting a group with the "G" command, the space bar completes a partially typed group name and the ? key will give a mini-menu of sub group alternatives. Try it!

Q: How do I make nn display the groups in the order I want to see them.

A: The order is predetermined. However, all you need to do is make a file named "init" and put it in your .nn directory (Did you know that you had a .nn directory? Names starting with a . are hidden in Unix. Use ls -a to see them.) Anyway, the init file should have the word "sequence" in it, followed by a list of groups in order. That does it.

FTP and SCP

FTP, or File Transfer Protocol, allows you to download files from any FTP site on the Internet into your ProShell account. If the files are big, you might then want to burn them on a CD.

You can also use FTP to transfer files between your PC and your ProShell account. Many people use FTP in this way to publish their web pages.

To invoke FTP from the shell prompt, enter the following:

  ftp [sitename]

If you connect to one of the file archive servers on the net, you can usually logon as 'anonymous' and send YOUR e-mail address

  • username@jtan.com
as your password.

Once you're in FTP, typing 'help' at the 'ftp>' prompt will give you a list of available commands, and 'help ' will give details on a specific command. Some commonly used commands:

open {site}
Open a connection to
close
Close connection
cd dir
Change directory to dir
dir or ls
to get a directory list
bin
Switch to binary mode (important for most file transfers)
get {filename}
Transfer to your directory
hash
to show hash marks as file is downloaded
quit
Quit FTP

You can also invoke FTP on your PC to transfer files between your PC and your ProShell account. How you do that depends on your operating system, although most modern PC OS's have a command line ftp program like we described above. For example, on WIn95 you can go to the MSDOS prompt and type "ftp home.jtan.com" to access your account. Alternatively, you can use one of the fine GUI based FTP programs. Here is a decent one for MS Windows.

FTP can transfer files to and from your Proshell account, but it is not a secure as "scp". The scp program is a component of the SSH suite of programs. If you are concerned about security, and you should be, these programs should be on your machine.

SSH

SSH is an Internet protocal that allows you to directly connect to another computer over the Internet. Using SSH is simple. At the command prompt, enter:
ssh sitename
and you should get connected. Once online, all commands and keystrokes are sent to the remote system.

Telnet can log into other computers from your Proshell account, but it is not a secure as "ssh". SSH is a secure telnet replacement. Although we do allow telnet, we strongly encourage all access to other machines from JTAN be through SSH.

IRC

IRC is tolerated at JTAN. EXACT VT-100 emulation is required. To access it, enter 'ircII' at the shell command prompt. After the connection is made, '/help' will list the available IRC commands. '/quit' will quit at any time.

What are some common shell commands I'll be using?

Here's some common Unix commands you'll probably be using that have approximate DOS equivalents.

mv       Move or rename a file   (dos: move and rename)
cp       Copy a file             (dos: copy)
cd       Change directory        (dos: cd)
rm       Remove a file           (dos: del)
ls       Short directory         (dos: dir /w)
ls -l    Long directory listing  (dos: dir)
Other commands don't have much in common with DOS. The first one you should learn how to use is "man"

man
To see the on-line manual for any of these services. See also section 4.6
elm
Invoke the ELM mail system.
pine
Invoke the PINE mail system.
nn
Invoke the NetNews news reader. Very powerful.
tin
Another newsreader. Easier to use, slower.
lynx
A very nice textmode WWW browser for Unix.
sz
Send a file to your computer via Zmodem.
rz
Receive a file from your computer via Zmodem.
sx
Send file, Xmodem.
rx
Receive file, Xmodem.
talk
Talk to another user. ( Ex. talk chris) Give your party time to answer.
finger
To see who is also logged in on other machines.
who
To see who is also logged in here.
em [file]
Edit a text file.
pico [file]
Edit a text file.
d2u [file]
DOS to Unix -- remove carriage returns from DOS files.
u2d [file]
Unix to DOS -- put back in carriage returns that DOS wants.
exit
Logoff.

I need help! How do I get instructions on shell commands?

The Unix shell comes with a built-in manual. To access it, simply enter

  man [commandname]
at the command prompt. This will give you detailed instructions on the use of that particular command. For example, if you want to learn how to use ls, you would enter the following:

  man ls 
"Man pages", as they are called, are written in a terse style that takes some getting used to. Regardless of the discomfort, it is very important that you at least attempt to read them. Otherwise, someday someone you turn to for help will respond with the dreaded: "RTFM".

How do I edit an ASCII file?

We have several editors, but I suggest you use either pico or em if you are not a UNIX expert. To use pico, type:

  pico {filename}
the em editor works the same way. Both of these editors work like most users expect a full screen editor to work (arrow keys move the cursor, etc.)

How do I unzip a file?

Ordinary PKZip compatible files can be manipulated in the same way with the Unix "zip" and "unzip" commands.

For gz extensions you want gunzip, as in:

  gunzip file.gz
will give you "file" in uncompressed form.

For tar, you use tar, as in

  tar xvf file.tar
will extract verbosely to the current directory whatever files were in the file.tar building a whole directory tree if need be.

Often you see files that are both tarred and gzipped. Extract them in one step with

  tar xvfz file.tar.gz

I'm stuck and need immediate help. Is there a way to get in touch with and administrator from the shell?

Use the "who" command to see if chris is logged in. If he is, try the command "talk chris" to contact him. If Chris is available, he will respond and you can chat on-line to ask your question. Note from the Sysop ---- I honestly try to answer those pages. Please give me a few seconds (I might be changing a diaper). Absolutely DO NOT log off immediately after paging. I have no sense of humor about that.

Control-C exits from "talk".


Services  |  Resources  |  Contact  |  News  |  Members  |  Signup

www.jtan.com

() Copyright © 1991-2014
JTAN
All rights reserved
All use of this site subject to terms.