# Linux Resources

{{< snippet "old" >}}

## Bash (readline) Hints

If you use bash, are as bad a typist as I am, and especially if you came
up in the DOS/Windows world, there is one thing that probably drives you
nuts---the way bash's file/path completion works. I hate that bash
either complains or just gives you a list of the possibilities on an
ambiguous completion. I'd much rather have it cycle through the
possibilities each time you hit TAB the way (shudder) cmd.exe/4NT.exe
does. (See {{< xref "/windows/winshell" >}} to enable this in `cmd.exe`.)

So how can you get bash to cycle though files or directory completion
the way *[4NT](http://www.jpsoft.com/4ntdes.htm)* does? It turns out
this is possible in bash since 2.02, but it's amazingly obscure. The
feature is called "menu-complete", and you can enable it in the
`/etc/inputrc` file by binding it to TAB.

Here are the tweaks I add to the top of my `/etc/inputrc` file in Linux
(note second to last):

```bash
set completion-ignore-case on # Ignore case when doing completion
set mark-directories on       # Completed dir names have a slash appended
set visible-stats on          # List ls -F for completion
"\C-i": menu-complete         # Cycle through ambiguous completions instead of list
#set show-all-if-ambiguous on # List possible completions instead of ringing bell
```

You can edit the file and test it using `bind -f /etc/inputrc` to
activate your changes immediately.

-----

## Why Use Open Source Software?

The two best papers I've seen on the subject are the following:

  - *[The Cathedral and the
    Bazaar](http://tuxedo.org/~esr/writings/cathedral-bazaar/)*, also
    available in book form from O'Reilly.
  - *[Why Open Source Software / Free Software (OSS/FS)? Look at the
    Numbers\!](http://www.dwheeler.com/oss_fs_why.html)*, the conclusion
    of which I quote here:

> > OSS/FS has significant market share, is often the most reliable
> > software, and in many cases has the best performance. OSS/FS scales,
> > both in problem size and project size. OSS/FS software generally has
> > far better security, particularly when compared to Windows. Total
> > cost of ownership for OSS/FS is often far less than proprietary
> > software, particularly as the number of platforms increases. These
> > statements are not merely opinions; these effects can be shown
> > quantitatively, using a wide variety of measures. This doesn't even
> > consider other issues that are hard to measure, such as freedom from
> > control by a single source, freedom from licensing management (with
> > its accompanying litigation), and increased flexibility. I believe
> > OSS/FS options should be carefully considered any time software or
> > computer hardware is needed.

-----

## Linux RPM Packages

The *[RedHat Package Manager](http://www.rpm.org/)* (RPM) is an *[Open
Source](http://www.opensource.org/)* "package manager" for Linux.
Developed by *[RedHat](http://www.redhat.com/)*, it is the defacto
standard used by a majority of Linux developers and distributions. It
offers far better modularity, manageability and ease-of-use than the
more traditional "tarball" distribution method. It's slightly easier to
use than Solaris' package manager, in that there is only one program to
deal with. And it is **vastly** superior to any of the Microsoft
installers because a) it wasn't written by Microsoft, b) it was written
for a decent OS, c) merely installing a simple application (such as a
web browser) will not 1) crash the OS completely or 2) make fundamental
changes to underlying OS services and/or functionality, d) you can
actually completely and cleanly uninstall applications, e) you can
easily get a definitive list of what packages are installed on the
system (rpm -qa).

If you do not understand item c above, go install IE 5.5 on an NT server
and see what happens. Hint, check the "AT" service.

  - *[The RPM FAQ](http://www.rpm.org/RPM-HOWTO/build-it.html)*
  - *[Maximum RPM](http://www.rpm.org/max-rpm/)* especially:
      - *[The Philosophy Behind
        RPM](http://www.rpm.org/max-rpm/s1-intro-to-rpm-rpm-design-goals.html)*
        Excellent material.
        *[Microsoft](http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/msi/vref_0c30.htm)*
        and *[Wise Solutions](http://www.wisesolutions.com/)* should
        read this\!
      - *[rpm -b Command
        Reference](http://www.rpm.org/max-rpm/ch-rpm-b-command.html)*
      - *[Initial Building With
        RPM](http://www.rpm.org/max-rpm/s1-rpm-rw-build-initial-build-with-rpm.html)*

-----

## Linux Backups

See my [OnStream DI-30 + RedHat Backup
mini-HOWTO](OnStream_DI-30-RedHat_Backup_mini-HOWTO.html).

-----

## Keeping Linux Up-to-Date

I never liked Red Hat's "Up to date" service. I never really got it to
work, and I just don't like the idea of how it works. It's also a pain
to have a local repository.

I used to use a Perl based RPM updated called
*[autoupdate](http://www.mat.univie.ac.at/~gerald/ftp/autoupdate/index.html)*.
It worked very well for me. It is highly configurable and supports a
distributed architecture where I can have one server download updates,
then all my other machines get the updates from that local server. I
found autoupdate needed an hour or two's time investment to get set up
and working, but it was well worth it. It's not too complicated, it's
just that there are quite a few options and it may take some reading and
experimentation before you find a setup that works the way you want.

But now I'm using *[cAos Linux](http://www.caosity.org/)*, which uses
*[Yum](http://linux.duke.edu/projects/yum/)* (Yellow dog Updater,
Modified), which rules\! A simple `yum update` updates every single
installed application from my local repository, which I rsync daily. If
I need to install an application, such as NTP, `yum -y install ntp` does
the trick, resolving any dependencies along the way. Yum uses a simple
web site for repositories making it drop-dead simple.
*[Fedora](http://fedora.redhat.com/)* is even using Yum. Yum Just Works,
and is awesome\!

-----

## Links

  - *[Linux Online](http://www.linux.org/)*
  - *[The Linux Kernel Page](http://www.linuxhq.com/)*
  - *[Tom's RootBoot Disk](http://www.toms.net/rb/)* a complete Linux
    system on a single floppy disk
  - *[Linux Mall](http://www.linuxmall.com/)*
  - Lists of Linux Applications
      - *[Linux Online](http://www.linux.org/apps/index.html)*
      - *[Linux Apps](http://www.linuxapps.com/)*
  - *[Linux Certification](http://www.linuxcertification.org/)*
  - *[Linux Support](http://www.linuxcare.com/)*
  - *[Filesystem Hierarchy Standard (Linux directory
    standard)](http://www.pathname.com/fhs/)*
  - *[The Linux Standards Organization](http://www.linuxbase.org/)*
  - *[A Linux Information Resource](http://www.linuxnow.com/)*
  - *[Various Linux Configuration and Setup
    info](http://www.ecst.csuchico.edu/~dranch/LINUX/index-linux.html)*
  - *[Step by step Linux Setup and Config Guide (Trinity
    OS)](http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri)*
  - *[The Linux Router Project](http://www.linuxrouter.org/)*
  - *[The Linux Documentation Project](http://www.linuxdoc.org/)*
      - *[Linux Network Administrator's
        Guide](http://www.linuxdoc.org/LDP/nag2/index.html)*
      - *[Linux System Administrator's
        Guide](http://www.linuxdoc.org/LDP/sag/index.html)*
      - *[Linux System Administration Made
        Easy](http://www.linuxdoc.org/LDP/lame/LAME/linux-admin-made-easy/)*
      - *[Securing and Optimizing Linux: Red Hat
        Edition](http://www.linuxdoc.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/)*
  - *[LinuxSecurity.com](http://www.linuxsecurity.com/)* --
    **Excellent** Linux security documentation, especially including
    (but not limited to):
      - Linux Security Quick Reference Guide
        (*[PDF](http://www.linuxsecurity.com/docs/QuickRefCard.pdf)*)
      - *[Linux Administrator's Security
        Guide](http://www.linuxsecurity.com/docs/SecurityAdminGuide/SecurityAdminGuide.html)*
      - *[Linux Security
        HOWTO](http://www.linuxsecurity.com/docs/LDP/Security-HOWTO/)*
  - *[Essential Linux
    Book](http://linuxworld.com/idgbooks-openbook/home.html)*
  - *[Linux man pages online](http://man-pages.net/linux/)*
  - *[Linux Journal](http://www2.linuxjournal.com/)*
  - Neal Stephenson's "*[In the Beginning was the Command
    Line](http://www.spack.org/index.cgi/InTheBeginningWasTheCommandLine)*"

{{< snippet "old" >}}
