User configuration files in linux

Guide to linux configuration files

This guide will show where various linux configuration files are located, shows howto configure them.

In many cases are global config files, and local config files.

  • Global config files
    • Apply to all users
    • Usually located in /etc
    • Applies to a specific user
    • Stored in the users home dir, as ~/.example or ~/.config/example
    • AKA dot files

    Locations of config files change name and location over time and different Linux Distributions, so the files listed here may not match your Linux installation, but the are generally close.

    • bashrc may be located in /etc/bash/bashrc or /etc/bashrc
    • kdmrc may be located in /usr/share/config/kdm/kdmrc, /usr/local/share/config/kdm/kdmrc, or /opt/kde/share/config/kdm/kdmrc

    Contents

    • 1 /etc — the basics
    • 2 Users and Groups
      • 2.1 Users: /etc/passwd
      • 2.2 Groups: /etc/group
      • 3.1 LILO
      • 3.2 Grub
      • 4.1 portage
      • 4.2 Paludis
      • 4.3 pacman
      • 4.4 apt
      • 4.5 yum
      • 4.6 rpm
      • 4.7 dpkg
      • 4.8 opkg
      • 4.9 Smart Package Manager
      • 9.1 Setting System/Hardware Clock
      • 9.2 Hard/USB/floppy/CDROM/Network Drive Mounts
      • 9.3 Locale
      • 9.4 locate/slocate/mlocate
      • 9.5 sudo
      • 9.6 Kernel
      • 9.7 Kernel Modules
      • 9.8 Cron
      • 9.9 mdadm (RAID)
      • 9.10 mkinitcpio (RAM disk init)
      • 9.11 syslog
      • 9.12 ALSA
      • 9.13 DBUS
      • 9.14 udev
      • 9.15 logrotate
      • 9.16 AT
      • 9.17 PAM
      • 11.1 bash
      • 11.2 csh
      • 11.3 zshell (zsh)
      • 11.4 tcsh
      • 11.5 ksh
      • 11.6 sh
      • 12.1 Look and Feel (User Interface)
      • 12.2 Display Managers
        • 12.2.1 XDM
        • 12.2.2 GDM
        • 12.2.3 KDM
        • 12.2.4 SLiM
        • 13.1 Redhat
        • 13.2 Suse
        • 13.3 Fedora
        • 13.4 Gentoo

        /etc — the basics [ ]

        • /etc/DIR_COLORS — colors use by the «ls» command
        • /etc/X11/ — config files for X-Windows
        • /etc/adjtime — correction factor for the RTC (do not edit)
        • /etc/bash/ — config files for bash
        • /etc/conf.d/ — config dir for Gentoo and other Distributions
        • /etc/cron.d/
        • /etc/cron.daily/ — scripts within are run daily by cron
        • /etc/cron.deny — list of users for which cron is denyed
        • /etc/cron.allow — list of users for which cron is allowed
        • /etc/cron.hourly/ — scripts within are run hourly by cron
        • /etc/cron.monthly/ — scripts within are run monthly by cron
        • /etc/cron.weekly/ — scripts within are run weekly by cron
        • /etc/crontab — general config for cron
        • /etc/cups/ — config dir for CUPS printer server
        • /etc/dbus-1/ — dir for dbus config files
        • /etc/default/ — dir for dbus config files like adduser
        • /etc/dhcpcd.conf
        • /etc/dispatch-conf.conf
        • /etc/e2fsck.conf — config for fschk for ext2 and ext3 filesystems
        • /etc/env.d/ — dir for environment variables in Gentoo and other distributions
        • /etc/environment — environment variables [1]
        • /etc/exports — file systems are exported to remote hosts [2]
        • /etc/filesystems — defines the filesystems search order used by mount -t auto
        • /etc/fonts/ — config dir for fontconfig
        • /etc/fstab — mount points
        • /etc/gconf/ — dir for Gnome based applications [3]
        • /etc/gpm/ — console mouse
        • /etc/group — groups and the users within them
        • /etc/group- — (do not edit)
        • /etc/gshadow — Secure group account information
        • /etc/gshadow- — (do not edit)
        • /etc/host.conf — specifies how host names on a network are resolved [4]
        • /etc/hosts — associates IP addresses with hostnames
        • /etc/init.d/ or /etc/rc.d/init.d/ — dir for init scripts
        • /etc/inittab — describes which processes are started at bootup [5]
        • /etc/inputrc — keyboard mapping for bash and most other shells
        • /etc/issue — message displayed before console or ssh logins [6]
        • /etc/kernel/ — dir for scripts such as post-installation of the Linux kernel
        • /etc/ld.so.cache — (do not edit)
        • /etc/ld.so.conf — library path
        • /etc/ld.so.conf.d/ — dir for config files that include library paths
        • /etc/local.d/ — scripts run by «local» init script
        • /etc/locale.gen — lists the locales used
        • /etc/localtime — symbolic link to a timezone file
        • /etc/login.defs — config for the shadow package [7]
        • /etc/machine-id — unique machine id set during installation [8]
        • /etc/mail/ — dir of config files for mail system
        • /etc/mailcap — describs how mime-types should be displayed [9]
        • /etc/make.conf
        • /etc/man.conf — config for man
        • /etc/mime.types — (do not edit)
        • /etc/mke2fs.conf
        • /etc/modprobe.d/
        • /etc/mtab (do not edit)
        • /etc/netconfig
        • /etc/networks
        • /etc/nscd.conf
        • /etc/nsswitch.conf
        • /etc/pam.d/
        • /etc/papersize
        • /etc/passwd
        • /etc/passwd- (do not edit)
        • /etc/profile
        • /etc/profile.d/
        • /etc/profile.env
        • /etc/protocols — list of network protocols (do not edit) [10]
        • /etc/rc.conf
        • /etc/resolv.conf
        • /etc/rpc — RPC program number database (do not edit)
        • /etc/runlevels/
        • /etc/securetty
        • /etc/security/
        • /etc/services
        • /etc/shadow — (do not edit)
        • /etc/shadow- — (do not edit)
        • /etc/shells
        • /etc/skel/
        • /etc/sound/
        • /etc/ssh/
        • /etc/ssl/
        • /etc/sudoers — config for sudo
        • /etc/sudoers.d/
        • /etc/sysctl.conf
        • /etc/sysstat
        • /etc/sysstat.ioconf
        • /etc/terminfo/
        • /etc/timezone
        • /etc/udev/
        • /etc/unixODBC/
        • /etc/updatedb.conf
        • /etc/xdg/
        • /etc/xinetd.d/

        Users and Groups [ ]

        Users: /etc/passwd [ ]

        /etc/passwd is the user authentication database, it contains a list of users and their associated internal user id numbers. Historically it also included passwords, however as this file needs to world readable (so all programs can use it to convert between username and user id) it is no longer considered secure to keep passwords in this file.

        An entry in this file is of the form:

        It has seven sections which going from left to right are,

        • (alice) The username.
        • (*) The password in a hashed form. In modern systems a star indicates shadowing is in use and hence the password can be found in /etc/shadow/.
        • (134) The unique id assigned to the user. Some unique ids have special purposes. For example, the user id 0 is used for the root user.
        • (20) The group that the user is assigned to upon login.
        • (Alice Monkey) The GCOS field can be used for anything or left blank. Normally used for personal information abou the user such as full name.
        • (/home/alice/) The home directory of the user.
        • (/bin/bash) The users default shell.

        Groups: /etc/group [ ]

        /etc/group stores the definitive list of the users groups and their members.

        It has four sections which going from left to right are,

        • (root) The group name.
        • () The group password in a hashed form. Normally not used.
        • (0) The unique id assigned to the group. Group ids below 10 are reserved for system use. Some unixs such as HP-UX reserve other groups numbers as well.
        • (root,alice) The list of users who are members of that group.

        Boot Up Settings [ ]

        • Boot file sequence in the order they are accessed or executed
          1. boot loader (grub/lilo)
          2. linux kernel
          3. /etc/inittab
          4. /etc/rc.sysinit
            1. init scripts
          5. Login or X windows
        • /etc/inittab — runs different programs and processes on startup. This is typically the program which is responsible for, among other things, setting the default runlevel, running the rc.sysinit script contained in /etc/rc.d, setting up virtual login terminals, bringing down the system in an orderly fashion in response to [Ctrl][Alt][Del], running the rc script in /etc/rc.d, and running xdm for a graphical login prompt (only if the default runlevel is set for a graphical login).

        LILO [ ]

Оцените статью
Adblock
detector