Clueless at the Prompt Issue 23

#### "Linux Gazette...making Linux just a little more fun!"

## CLUELESS at the Prompt: A Column for New Users

#### By Mike List

#### Welcome to installment 8 of Clueless at the Prompt: a column for new users.

.bashrc and .bash_profile Well, I found out why the bash dotfiles I talked about last month didn't work, and there were a couple things I did wrong. First I didn't recognize the difference between instances of bash and how they differ.

- bash as a login shell reads instructions from .bash_profile
- bash as used in any other instance is a non-login shell and will either use .bashrc or no .dotfile depending on what -option you assign to it.
- presumably the same could go for any preferred shellrc files
- the correct way to specify an alias is

       alias xx=whatever -options.

  notice that there is no white space between the alias name, the equal sign, and the command that the alias represents

Besides aliases you can do also change the color of your console screen with your .bashrc or .bash_profile, by using commands like:

    "/dev/tty1") setterm -background green -foreground black -store;;

By the way I found this out by reading back issues of the Linux Gazette, and you might find some other little gems, just by digging into past issues.

Installing Software

One very tricky procedure for new linuxers is installing software. Several months ago I touched on this subject, apparently not in enough depth, so I'm going to give it another go this time with a little more experience under my belt. The best advice I can give you if you are using debian, redhat, or caldera distributions is to look for the software you would like in a compatible package format, ie. RPM for redhat-caldera, and deb for debian. These are most commonly binaries and don't require much to get running.Slackware has packages in tgz format, but this can be misleading, as some source packages are inexplicably given a .tgz extension. If you get your software from the CDROM you should be set, with packages for a given distribution on that CD. Ifg you got your distribution from an ftp site, try using the most appropriate software found on that site, to see if it fits your needs. If not, you should check out the Linux Software Map, to see what kind of alternatives there are for the kind of applications you want. if you have disk space, I recommend that you choose a couple that seem to be close to what you are looking for, install them and use them for a short period to see which is more suitable for your uses. Sad but true, some software compiles easily, but you will probably find that many others take some hacking, and some doesn't seem to compile at all. You are at a distinct advantage if your Linux distribution conforms to the Linux FSSTND, which tends to assure that paths to libraries are the same in your distribution as they were in the distribution that they were written for/in. With enough hacking however, all of the software that has been compiled on one distribution can be compiled on any other.

- Use Midnight commander or similar filemanager to look at the contents of the compressed archive for clues. look at files called README, README.elf, INSTALL or other similarly named files for information on how to compile or install them. This isn't always easy as it sounds, but often directions are specific enough to get you on your way.
- before unpacking a tarball create a directory to unpack it in and cd to it before using

       tar -zxvf filename

  to unpack it, since sometimes the untarring doesn't create a separate directory and if you just unpack it in an existing directory you could get a real ugly situation when you get a bunch of disjointed files cluttering up your directory. you can also use tar -cxvf or similar combination to get a listing of the files that would be unleashed when you use the -z option. This will tell you if the files have a designated pathname which means that it will create its own directories and subdirectories that will keep the parent directory nice and tidy.
- It's a very good idea to print out the README, INSTALL or similar files before you start to compile the software, so you can refer to the documentation as you go. If you don't have lpr configured properly yet, you can use

      cat README |pr -l 56 >/dev/lp0

  (or lp1, or whatever). Using the -l 56 option should paginate the file so that page breaks occur where they should.
- When you read the documentation, keep an eye out for any indication that you need, say Motif or Xforms or other libraries or toolkits that you don't have installed,if you don't have them you won't have a compiled application either.
- Alternatively to printing the documentation out to paper, if you have X installed use separate xterms to view the docs and configure, and make the application.
- Remember, most Linux archive maintainers keep a close eye on their sites so it's safe to download and install a binary if it's available.

I'm not really a Linux guru, and I'm starting to get into more advanced (??) stuff, and my intent was and still is to present information that a new user can implement now and research at his/her convenience, I'm not trying to be the Weekend Mechanic OR the Answer Guy, although I aspire to their level of Linux prowess. Briefly put, although it's a little late to be brief, I may not be appearing monthly after this issue, since I don't want to write just to hear myself type, I'll likely post a column when I can nail down a column's worth of information.

I still invite questions, suggestions, reasonable criticism and just plain e-mail:

troll@net-link.net

Don't M$ out, try Linux!!

##### Copyright © 1997, Mike List
Published in Issue 23 of Linux Gazette, December 1997