Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Location of common configuration files for inux

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail the location of commonly used configuration files in inux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

1. / etc configuration file

/ etc/passwd user database, where the domain gives the user name, real name, home directory, encrypted password, and other information about the user

/ etc/group is similar to / etc/passwd, but it is not about the user but about the group.

Configuration file for / etc/inittab init

The output of / etc/issue before the login prompt. It usually includes a short description or welcome message of the system. The content is determined by the system administrator.

/ etc/motd is automatically output after a successful login, the content is determined by the system administrator, and is often used to advertise information, such as a warning of a scheduled shutdown time.

/ etc/mtab list of currently installed file systems. Initialized by scripts and automatically updated by the mount command. Use when you need a list of currently installed file systems, such as the df command, and when you df-a, the information you see should be the same.

/ etc/shadow the shadow password file on the system where the shadow password software is installed. The shadow password file moves the encrypted password from the / etc/passwd file to / etc/shadow, which is readable only to root. This makes deciphering the password more difficult.

Configuration file for the / etc/login.defs login command

A file that executes when / etc/profile, / etc/csh.login, / etc/csh.cshrc logs in or starts Bourne or Cshells. This allows the system administrator to establish a global default environment for all users / etc/printcap similar to / etc/termcap, but for printers. The grammar is different.

/ etc/securetty confirms the secure terminal, that is, which terminal allows root to log in. Generally only virtual consoles are listed, so it is not possible (at least difficult) to break into the system through modem or network and get super user privileges.

/ etc/shells lists trusted shell. The chsh command allows the user to change the login shell within the scope specified in this file. The service process ftpd that provides a machine FTP service checks whether the user shell is listed in the / etc/shells file, and if not, the user will not be allowed to log in.

/ etc/termcap terminal performance database. Explain what "escape sequence" control is used by different terminals. Instead of directly outputting escape sequences (which only work on terminals of a particular brand) when writing programs, you look for the correct sequence of work to be done from / etc/termcap. In this way, most programs can run on most terminals.

/ etc/inputrc input device profile

/ etc/default/useradd File that adds the user's default information

/ etc/login.defs is the default attribute of user password information

/ etc/skel skeleton of user information

/ sbin/nologin users who cannot log in

Log files of / var/log/message system

/ etc/profile global configuration file can be used by adding a line of PATH=$PATH:/usr/local/mysql/bin to the command of the software.

Alias for the / root/bashrc command

/ etc/yum.repos.d configure local YUM source

/ etc/httpd/conf/httpd.conf configure the profile of the http service

/ etc/fstab the device that is loaded automatically when the system starts (used to configure the auto-mount device)

/ etc/selinux Security Linux Settings

/ etc/sysconfig/network can change hostname (hostname) and the working status of the network card

/ etc/hosts change the correspondence between the hostname and the IP address, please note that the format is hostname.domain hostname localhost

Localhost.domian, the file must be modified when the hostname is modified

/ etc/resolv.conf configurable DNS address, that is, the default search path for the first DNS, the second DNS and DNS

/ etc/sysconfig/networking/profiles/default contains several files, which can configure hosts, network card, DNS address and DNS search path, 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 is used to place startup scripts for almost all services

/ etc/sysctl.conf kernel parameter configuration file

/ etc/sysconfig/i18n sets system language and character types

/ etc/crontab system-defined task schedule

/ etc/anacrontab implements a configuration file that checks for expired and unfinished crontab tasks

/ etc/rc.d/init.d/functions defines the configuration file for the function

/ etc/rc.d/rc.sysinit system startup settings configuration file

/ etc/sysconfig/system-config-firewall configure the trusted port of the firewall and the working status of the firewall. Graphically configure the archive file of the firewall, specifically save only the items set in the otherport of the graphical interface, if there are corresponding configuration entries in the main configuration file, it does not matter whether the configuration entries exist or not.

/ etc/sysconfig/iptables Firewall Master profile

/ etc/sysconfig/system-config-securitylevel system security level file, which is not involved in firewall configuration

Main configuration file for / etc/xinetd.conf xinetd

A permission table for / etc/hosts.allow TCP

A reject table for / etc/host.deny TCP

/ etc/squid/squid.conf proxy server (SQUID) configuration file

/ etc/sysconfig/vncservers VNC service profile

/ etc/vsftpd/ftpusers is used to save local user accounts that are not allowed to log in to FTP (blacklist)

/ etc/vsftpd/user_list has more flexible user access control, but needs to be declared in the main configuration file

/ etc/inetd.conf swat configuration

Configuration file for / etc/dhcpd.conf DHCP

/ etc/rc.d/init.d/dhcpd stop stop DHCP

/ etc/access can control the mail flow of sendmail

/ etc/udev/rules.d system initialization will be hardware detection information output to the device configuration file, is a program. Let the user define the rules of udev, so that different device file names are used in creating device files.

Note: / etc/passwd stores the user's account number

Slaceware:x:5000:5000:Test User:/home/slackware:/bin/bash

Name:passwd location: UID:GID:CECOS (comments): diectory (home directory): shell

Note: / etc/shadow stores the user's password

Slaceware:$1 $12345678 $0ME5N6oDyoEAwUp7b5UDM5UDMUniv 15355 0R 99999 7V:

Name: encrypted password: time 1: time 2: time 3: time 4: time 5: time 6: reserved segment

Encrypted password: separated by $, the first $is followed by 1, indicating that the encryption algorithm is md5, the second $is followed by the added sail, and the third $is followed by the added password

Time 1: number of days from January 1, 1970 to the most recent revision

Time 2: the minimum life of the password

Time 3: the longest life of the password

Time 4: how many days before the password expires

Time 5: user disabled in how many days the password expires

Time 6: how long has the user been disabled since January 1, 1970

Note: / etc/group the account number of the storage group

Slackware:x:5000:

Name:passwd location: GID: list of users for 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/*

II. / proc configuration file

/ proc/dma displays the DMA channel currently in use.

/ proc/filesystems core configured file system.

/ proc/interrupts shows the interrupt used, and how many of each there have been.

The iUnip O port currently used by / proc/ioports.

/ proc/kcore system physical memory image. It's exactly the same size as physical memory, but it doesn't actually take up 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. )

The message output by the / proc/kmsg core. Was also sent to syslog.

/ proc/ksyms Core symbol Table

/ proc/loadavg system "average load"; three indicators indicate the current workload of the system.

/ proc/meminfo memory usage information, including physical memory and swap.

Which core modules are currently loaded by / proc/modules.

/ proc/net network protocol status information.

Symbolic link from / proc/self to the process directory of the program that views / proc. When two processes view / proc, it is a different connection. This is mainly convenient for the program to get its own process directory.

/ different states of proc/stat system, such as the number of page faults since the system was booted.

/ the length of time that the proc/uptime system starts.

/ proc/cpuinfo processor information, such as type, manufacturer, model, and performance.

List of device drivers for the core configuration that proc/devices is currently running.

/ proc/version core version.

/ proc/mdstat RAID device information

/ proc/cmdline ro root=/dev/vol0/root rhgb quiet grub information

/ proc/cpuinfo displays information about CPU

The / proc/cpuset cpu collection is used to show which cpu the current process can be applied to

/ proc/filesystem the types of file systems supported by the current system

/ etc/245/vm system process virtual memory information of the process with ID number 245

/ etc/245/kernel system process kernel information of the process with ID number 245

All file systems mounted by / proc/mounts

/ proc/swaps exchange partition information

/ proc/uptime starts the system running time

/ proc/sys (with write permission) defines the value of the kernel parameter to define the kernel function

/ proc/sys/kernel/hostname hostname setting

3. / usr configuration file

/ usr/bin numerous applications

/ usr/doc linux document

Header files needed for C # to develop and compile applications under / usr/include linux

/ usr/include/g++ headline of C++ compiler

Configuration files of dynamic link libraries and software packages commonly used in / usr/lib

/ 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 file

/ usr/share/doc various document files

/ usr/share/man system man page

/ usr/local/apache/man defines the man directory collection

IV. Other directory configuration files

/ dev/null useless files are placed in the same location as the Recycle Bin, phagocytosis device

/ dev/zero initialize disk (zero spit)

/ dev/random random number generator, entropy pool

/ dev/urandom pseudo-random number generator, entropy pool. (when the entropy pool is exhausted, use the software to generate random numbers)

/ var/spool/mail/root defines mail setting sending user as root

/ bin/bash system built-in script

/ home/USERNAME user quota file

/ var/spool/cron/USERNAME user-defined task schedule

5. Directory structure:

/ boot the file used by the bootstrap loader (LILO or GRUB). When the computer starts (if there are multiple operating systems, it may allow you to choose which operating system to start), these files are loaded first. This directory will also contain the LINUX core (zip file vmlinuz), but the LINUX core can also exist elsewhere, as long as LILO is configured and LILO knows where the LINUX core is.

Bootstrap programs (binary execution files) required for bin system startup, which can be used by ordinary users

/ dev represents the device file directory of the hardware component. Devices under LINUX are treated as files, so the hardware is abstracted to facilitate reading and writing, network sharing, and temporary loading into the file system. Normally, the device has a separate subdirectory. The contents of these devices appear in separate subdirectories. LINUX doesn't have a driver.

/ etc stores various configuration files

Configuration files and scripts started by / etc/rc.d

/ home user home directory, including parameter settings files, personalization files, documents, data, EMAIL, cached data, etc.

/ lib standard programming library, also known as dynamic link sharing library, acts like the. dll file in windows

/ sbin Boot programs reserved for system administrators (binary execution files) that are not intended for use by ordinary users (ordinary users can still use them, but specify directories)

/ tmp common temporary file storage point, which is automatically cleaned up

/ root system administrator's home directory

The / mnt system provides this directory to allow users to mount other file systems temporarily.

The directory / lost+found is usually empty, and the "homeless" file (.chk under windows) is here when the system is shut down abnormally.

/ proc virtual directory, which is a mapping of system memory, can be accessed directly to get system information. The whole directory contains illusory files. They don't actually exist on disk, nor do they take up any space. (their size can be displayed with ls-l.) when viewing these files, you are actually accessing the information that exists in memory, which is used to access the system.

/ proc/1 directory of information about process 1. Each process has a directory under / proc called its process number.

/ var the overflow area of some large files, such as log files for various services, including files that have been changed during normal operation: spooled files, log files, locked files, temporary files, page format files, etc.

/ var/spool mail, news, the directory where print queues and other queues work. Each different spool has its own subdirectory under / var/spool, for example, the user's mailbox is in / var/spool/mail.

/ opt optional applications, such as KDE under REDHAT 5.2 (under REDHAT 6.0, KDE is placed in other XWINDOWS applications, and the main executor is in the / usr/bin directory)

The largest directory of / usr, where almost all the applications and files to be used are located.

/ home / var / usr/local is often a separate partition because it is often operated and is prone to fragmentation

/ srv this directory stores some data that needs to be extracted after the service is started

Start the bootstrapper configuration file example:

LILO / etc/lilo.confGRUB / boot/grub/menu.lst

After reading the above, do you have a general understanding of the common configuration files of inux? If you want to know more about the content of the article, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report