EQuorian Linux FAQ

From The System Administrator Zone
(Redirected from Linux Local FAQ)

General Linux FAQ

libstdc++.so.5 missing

You see the following error when you attempt to run a command that was compiled on an earlier version of linux.

bash-3.2$ ./program_name 
./program_name: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
run # yum install compat-libstdc++*
This will install the compatibility libraries and allow the program to load.

How do I set the location of my home directory?

See: xdg-user-dirs

xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

The way it works is that xdg-user-dirs-update is run very early in the login phase. This program reads a configuration file, and a set of default directories. It then creates localized versions of these directories in the users home directory and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that applications can read to find these directories.

bash-3.2$ cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.

RedHat FAQ

Most of the FAQs here relate to the many RedHat versions of Linux, as that is what we tend to use most of the time.

How do I add a second IP number to an interface?

To add a second IP number to interface eth0 on a redhat linux system with, you need to add a second interface definition file in the /etc/sysconfig/network-scripts directory.

This example file assumes that your local network is and the new, desired IP number is

[root@saturn network-scripts]# cat ifcfg-eth0:0
[root@saturn network-scripts]#

Note that eth0 would contain the original network configuration information.

How do I get rid of LILO or GRUB?

For Win98/ME/XP

  • To delete LILO from the Master Boot Record, from a DOS boot run:
  fdisk /mbr

If you boot from a Windows 2000 CD, select the Repair -> Console mode and use the command FIXMBR.

How do I change keyboard mapping?

The file /etc/sysconfig/keyboard is sourced by the /etc/rc.d/init.d/keytable startup script. It can be used to change the default mapping of keyboard keys.

If /etc/sysconfig/keyboard contains:


Then the keytable initialization script will run the program loadkeys filename, where filename.map is the filename of a keyboard map in /usr/lib/kbd/keymaps.

For example, to swap the control and caps lock keys, install a file /usr/lib/kbd/keymaps/i386/qwerty/filename.map that is a copy of the us.kmap with the following changes.

jupiter [521] > diff filename.map us.kmap
< keycode 29 = Caps_Lock
> keycode 29 = Control
< keycode 58 = Control
> keycode 58 = Caps_Lock

How to create a CDROM?

These instructions create data CDROMs with RockRidge and Joliet extension for long names and Windows/95 and NT compatibility. See the cdrecord man page for detailed information.

  • Create a directory tree with the contents you want to write on the CDROM.
  • Convert the directory tree to an ISO9660 CD image file with the mkisofs cmd.
uranus> mkisofs -R -J -hide-joliet-trans-tbl -T -r -o cd.iso cdrom-dir-tree
    • -R specifies RockRidge extension (long file names)
    • -J specifies Joliet extension (Win/95, NT compatibility)
    • -hide-joliet-trans-tbl
    • -T causes TRANS.TBL files to be generated
    • -r causes all uid/gid to be set to 0
    • This command also tells you how many sectors will be required to hold the iso image.
  • Use the varyon command to dynamically attach a SCSI CDROM writer to the system if necessary. The cdw assumes SCSI id=5.
uranus> /usr/local/etc/varyon cdw
  • To see what devices are attached to the system, use the command:
uranus> cdrecord --scanbus 
  • Write the CD with the cdrecord command. The CDRW installed on uranus is 48x24x48x, dev=0,0,0. Do not exceed the write speed of the CDR blank.
uranus> cdrecord -v speed=24 dev=0,0,0 cdrom.iso
  • CDROM capacity in 2048 byte sectors are:
333,226 Verbatim #90854 Gold 74min
336,075 Generic White with deep blue dye 74min
359,849 Generic Silver on Silver 80min

Dealing With Proxy Servers

Technical Linux Web Links

Linux SCSI Scripts
How to keep older versions of Linux from renaming your SCSI devices?