The location and introduction of common Linux configuration files:
1./etc configuration file
/etc/passwd user database, the fields in which give the user name, real name, home directory, encrypted password and other information about the user
/etc/group is similar to /etc/passwd, but it does not describe the user But group.
/etc/inittab init configuration file
/etc/issue Output information before the login prompt. Usually includes a short description of the system or a welcome message. Content is determined by the system administrator.
/etc/motd is automatically output after successful login. The content is determined by the system administrator. It is often used for notification information, such as warnings about planned shutdown time.
/etc/mtab List of currently installed file systems. Initialized by scripts and automatically updated by the mount command. Use it when you need a list of currently installed file systems, such as the df command. When df -a is used, the information viewed should be consistent with it.
/etc/shadow Shadow password file on a system where shadow password software is installed. The shadow password file moves the encrypted passwords in the /etc/passwd file into /etc/shadow, which is readable only by root. This makes deciphering passwords more difficult.
/etc/login.defs Login command configuration file
/etc/profile , /etc/csh.login , /etc/csh.cshrc Executed when logging in or starting Bourne or Cshells document. This allows system administrators to establish a global default environment for all users. /etc/printcap is similar to /etc/termcap, but for printers. The syntax is different.
/etc/securetty Confirm the secure terminal, that is, which terminal allows root login. Typically only virtual consoles are listed so that it is impossible (or at least difficult) to break into the system via a modem or network and gain superuser privileges.
/etc/shells Lists trusted shells. The chsh command allows users to change the login shell within the scope specified in this file. The service process ftpd that provides a machine's FTP service checks whether the user shell is listed in the /etc/shells file. If not, the user will not be allowed to log in.
/etc/termcap terminal performance database. Explain what "escape sequence" controls are used by different terminals. When writing a program, do not directly output the escape sequence (which will only work on a specific brand of terminal), but look for the correct sequence for the job to be done from /etc/termcap. In this way, most programs can run on most terminals.
/etc/inputrc Input device configuration file
/etc/default/useradd File to add the user’s default information
/etc/login.defs is the user password information Default attributes
/etc/skel Skeleton of user information
/sbin/nologin Users who cannot log in
/var/log/message System log file
/etc/profile Global configuration file can add a line PATH=$PATH:/usr/local/mysql/bin. The software command can use
/root/bashrc command alias
/etc/yum.repos.d Configure the local YUM source
/etc/httpd/conf/httpd.conf Configure the http service configuration file
/etc/fstab Automatically when the system starts Loaded device, (used to configure automatic mounting devices)
/etc/selinux Security Linux settings
/etc/sysconfig/network You can change the hostname (host name) and network card working status
/etc/hosts Change the corresponding relationship between host name and IP address. Please note that the format is hostname.domain hostname localhost
localhost.domian. This file must be modified after modifying the host name
/etc/resolv.conf can configure the DNS address, that is, the first DNS, the second DNS and the default search path of DNS
/etc/sysconfig/networking/profiles/default contains several files , you can configure hosts, network cards, DNS addresses and DNS search paths, etc.
/etc/sysconfig/network-scripts/ifcfg-eth0 Configure network card eth0
/etc/rc.d/init. d/network restart Restart the network
/etc/rc.d/init.d Used to place startup scripts for almost all services
/etc/sysctl.conf Kernel parameter configuration file
/etc/sysconfig/i18n Set the system language and character type
/etc/crontab System-defined task schedule
/etc/anacrontab Implement the task of checking expired and unfinished crontab Configuration file
/etc/rc.d/init.d/functions Configuration file defining functions
/etc/rc.d/rc.sysinit System startup setting configuration file
/etc/sysconfig/system-config-firewall Configure the trusted port of the firewall and the working status of the firewall. The archive file of the graphical configuration firewall specifically saves only the items set in the otherport of the graphical interface. If the main configuration file has corresponding configuration entries, it does not matter whether the configuration entries in it exist or not.
/etc/sysconfig/iptables Firewall main configuration file
/etc/sysconfig/system-config-securitylevel system security level file, will not be involved in firewall configuration
/etc/xinetd.conf The main configuration file of xinetd
/etc/hosts.allow A permission table for TCP
/etc/host.deny A deny table for TCP
/etc/squid/squid.conf Proxy server (SQUID) configuration file
/etc/sysconfig/vncservers VNC service configuration file
/etc/vsftpd/ftpusers Used to save and not allowed Local user account for FTP login (blacklist)
/etc/vsftpd/user_list More flexible user access control, but needs to be declared in the main configuration file
/etc/inetd.conf swat configuration
/etc/dhcpd.conf DHCP configuration file
/etc/rc.d/init.d/dhcpd stop Stop DHCP
/etc/access can control the mail flow of sendmail.
/etc/udev/rules.d is a program that outputs hardware detection information into a device configuration file during system initialization. Let users define udev rules to use different device file names when creating device files
Note: /etc/passwd stores user accounts
slaceware:x:5000:5000:Test User:/home/slackware:/bin/bash
Name: passwd location: UID: GID: CECOS (note): diectory (home directory): shell
Note: /etc/shadow Store the user's password
slaceware:$1$12345678$0ME5N6oDyoEAwUp7b5UDM/:15355:0:99999:7:::
Name: Encrypted password: Time 1: Time 2: Time 3: Time 4: Time 5: Time 6: Reserved section
Encrypted password: separated by $, the first $ is followed by 1, indicating that the encryption algorithm is md5, and the second $ is followed by sail. , the third $ is followed by the added password
Time 1: The number of days from January 1, 1970 to the latest modification
Time 2: The minimum usage period of the password
Time 3: Maximum password usage period
Time 4: How many days before the password expires to start warning
Time 5: How many days before the password expires and the user is disabled
Time 6: How long since January 1, 1970, the user has been disabled
Note:/etc/group stores the group account
slackware:x:5000:
Name: passwd Location: GID: User list of additional groups
Note: Interactive login users:
/etc/profile -->/etc/profile.d/* - ->~/.bash_profile -->~/.bashrc -->/etc/bashrc
Non-interactive login:
~/.bashrc -->/etc /bashrc -->.etc/profile.d/*
2./proc configuration file
/proc/dma displays the currently used DMA channel.
/proc/filesystems Core configured file system.
/proc/interrupts Displays the interrupts used, and how many of each there have been.
/proc/ioports The currently used I/O ports.
/proc/kcore System physical memory image. Exactly the same size as physical memory, but does not actually occupy so much memory;
it is generated on the fly as programs access it.
(Remember: Unless you copy it somewhere , nothing under /proc takes up any disk space.)
Messages output by the /proc/kmsg core. Also sent to syslog
/proc/ksyms Core symbol table
/proc/loadavg System "load average"; 3 indicators indicate the current workload of the system.
/proc/meminfo Memory usage information, including physical memory and swap.
/proc/modules Which core modules are currently loaded.
/proc/net Network protocol status information.
/proc/self A symbolic link to the process directory of the program looking at /proc. When 2 processes look at /proc, they are on different connections. This is mainly convenient for the program to get its own process directory.
/proc/stat Different statuses of the system, such as the number of page faults since the system was booted.
/proc/uptime The length of time the system has been booted.
/proc/cpuinfo Processor information such as type, manufacturer, model, and performance.
/proc/devices List of device drivers for the currently running core configuration.
/proc/version Core version.
/proc/mdstat RAID device information
/proc/cmdline ro root=/dev/vol0/root rhgb quiet grub information
/proc/cpuinfo Display the CPU Related information
/proc/cpuset The cpu set is used to display which CPUs the current process can be applied to
/proc/filesystemThe types of file systems supported by the current system
/etc /245/vm Virtual memory information of the process with system process ID number 245
/etc/245/kernel Kernel information of the process with system process ID number 245
/proc/mounts All file systems loaded
/proc/swaps Swap partition information
/proc/uptime Boot system runtime
/proc/sys (with write permission) Define kernel parameters The value to define the function of the kernel
/proc/sys/kernel/hostname Host name setting
3./usr configuration file
/usr/bin Numerous applications
/usr/doc linux documentation
/usr/include Header files required to develop and compile applications under C under linux
/ usr/include/g C compiler header
/usr/lib Commonly used dynamic link libraries and software package configuration files
/usr/src System software source code
/usr/src/linux linux kernel source code
/usr/local/bin Locally added commands
/usr/local/lib Locally added libraries
/usr/sbin Programs reserved for system administrators
/usr/share/fonts Font files
/usr/share/doc Various document files
/ usr/share/man System manual page
/usr/local/apache/man Definition of man directory collection
4. Other directory configuration files
/dev/null is the location where useless files are placed. It is equivalent to the recycle bin and swallows the device.
/dev/zero Initializes the disk (spits out zeros)
/dev/random Random number generator , entropy pool
/dev/urandom Pseudo-random number generator, entropy pool. (When the entropy pool is exhausted, use software to generate random numbers)
/var/spool/mail/root Define the mail setting sending user as root
/bin/bash System built-in script
/home/USERNAME User quota file
/var/spool/cron/USERNAME User-defined task plan
5. Directory structure:
/boot is used for boot loader (LILO or GRUB) file. These files are loaded first when the computer starts (if you have multiple operating systems, you may be allowed to choose which operating system to boot). This directory will also contain the LINUX kernel (compressed file vmlinuz), but the LINUX kernel can also exist elsewhere, as long as LILO is configured and LILO knows where the LINUX kernel is.
/bin is the boot program (binary execution file) required when the system starts. These files can be used by ordinary users.
/dev represents the device file directory of the hardware component. Devices under LINUX are treated as files, so that the hardware is abstracted to facilitate reading and writing, network sharing, and temporary mounting into the file system. Normally, the device will have a separate subdirectory. The contents of these devices appear in separate subdirectories. LINUX has no so-called driver letter.
/etc stores various configuration files
/etc/rc.d startup configuration files and scripts
/home user home directory, including parameter setting files, personalization Files, documents, data, EMAIL, cached data, etc.
/lib standard programming library, also called dynamic link shared library, functions similar to .dll files in windows
/sbin is system management Boot programs (binary execution files) reserved by administrators for system startup. These files are not intended to be used by ordinary users (ordinary users can still use them, but they must specify the directory)
/tmp Public temporary files Storage point, this directory will be automatically cleaned
/root System administrator’s home directory
/mnt The system provides this directory to allow users to temporarily mount other file systems.
/lost found This directory is usually empty. The system shuts down abnormally and leaves a "homeless" file (what is it called .chk under Windows) right here
/proc The virtual directory is a mapping of system memory. You can directly access this directory to obtain system information. The entire directory contains phantom files. They don't actually exist on disk and don't take up any space. (Use ls -l to display their sizes) When viewing these files, you are actually accessing information stored in memory, which is used to access the system
/proc/1 information directory about process 1 . Each process has a directory under /proc named its process number.
/var The overflow area of certain large files, such as log files of various services, contains files that are changed during normal operations: spool files, log files, locked files, temporary files and Page format files, etc.
/var/spool Directory for mail, news, print queues and other queue jobs. Each different spool has its own subdirectory under /var/spool. For example, the user's mailbox is in /var/spool/mail.
/opt Optional application, for example, KDE under REDHAT 5.2 (under REDHAT 6.0, KDE is placed in other XWINDOWS applications, and the main executable program is in the /usr/bin directory)
/usr is the largest directory. Almost all the applications and files to be used are in this directory.
/home /var /usr/local is often a separate partition, because it is frequently operated and prone to fragmentation
/srv This directory stores some data that needs to be extracted after the service is started
Startup bootloader configuration file example:
LILO /etc/lilo.conf GRUB /boot/grub/menu.lst
Online learning video tutorial sharing: linux video tutorial
The above is the detailed content of where is the linux configuration file. For more information, please follow other related articles on the PHP Chinese website!