Ubuntu File System Structure

Source: Internet
Author: User

I. Main directory of ubuntu File System

Directory Full English name Purpose
/ / The starting point of the entire directory structure. All other files and directories are under it
/Bin Binaries Used to store the most common binary commands
/Boot Boot Contains important Linux boot files, such as grub and kernel files.
/Dev Devices All devices are in this directory, including hard disks and monitors.
/Etc Etc All system configuration files are placed under it
/Home Home Stores the Home Directory ($ home) of each user and its files and configurations.
/Lib Libraries System library files, a bit like Windows's Program Files
/Lost + found Lost + found Used to store files lost in case of system exceptions (such as sudden crashes) for recovery
/Media Media Used to load various media, such as optical disks and floppy disks.
/Mnt Mount Used to load various file systems
/OPT Optionally Used to store the "optional (optionally)" program for Installation
/Proc Processes Contains process and other information. It is a memory ing, not a real directory.
/Root Root This directory is the root user's home directory ($ home)
/Sbin System-only Binaries Used to store system-specific binary commands
/Sys System Used to store system information
/Tmp Temporary Files Used to store temporary files
/Usr User Stores applications, library files, and documents of common users.
/Var Variable files Used to store files that change frequently in time, size, and content

 

Ubuntu file system and directory detailed structure/Root directory │ reboot boot/Startup File. All the files related to system startup are stored here │ documents related to javasgrub/GRUB boot drivers │ kernel/process image │ javasmnt/Temporary mounting ├ media/mount the media device │ ├ root/root user's $ home directory ├ home/│ ├ user/common user's $ home directory │ └... /│ ├ bin/system program ├ sbin/Administrator System Program ├ lib/system library file ├ ETC/global configuration file for system programs and most applications │ ├ init. d/systemv-style STARTUP script │ javasrcx. d. Link to the startup script, define the running level │ runtime Network/network configuration file │ ├ X11/graphical interface configuration file │ ├ usr/www.2cto.com │ Bin/Application │ ├ sbin/administrator application │ ├ lib/Application library File │ shareshare/Application resource file │ export src/application source code │ export local/│ ├ soft/user program │ └... /usually use a separate folder │ export x11r6/graphic interface system │ export var/Dynamic Data │ export temp/temporary file restore lost + found/disk repair File System Startup ProcessTo start a Linux system, follow these steps:
1. Read the MBR information and start Boot manager windows to use ntldr as the bootmanager. If multiple versions of Windows are installed in your system, you need to select the system you want to access in ntldr. Linux usually uses the powerful and flexible grub configuration as the bootmanager. We will introduce how to use it in the startup management chapter. 2. Load the system kernel and start the INIT process. The INIT process is the root process of Linux, and all system processes are its sub-processes. 3. The INIT process reads the information in the "/etc/inittab" file, enters the preset running level, and runs the scripts in the corresponding folder of the running level in sequence. The script is usually started with the "Start" parameter and points to a program in the system. Generally, the startup script under the "/etc/RCs. d/" directory is first executed, and then the "/etc/rcN. d/" directory. For example, if you set the running level to 3, the corresponding startup directory is "/etc/rc3.d /".
4. Start the XWindow server "Xorg" XWindow according to the script in the "/etc/RCs. d/" folder as the graphic user interface system in Linux. 5. Start the logon manager and wait for the user to log on to the Ubuntu system. By default, you can log on to the system after entering the user name and password in the logon Manager interface. (You can find a link named "s13tpd" in the "/etc/rc3.d/" folder.) change the running level ------------ In the "/etc/inittab" file, find the following content: # The default runlevel. ID: 2: initdefault: number 2 in this line, which is the system running level. The default running level is defined as follows: 0 shutdown 1 single-user maintenance mode 2 ~ 5-user mode 6 restart Service Management======== Change the startup service ------------ in the folder corresponding to the running level, you can see many startup script links starting with "s #" and "K. For example:/etc/RCS. d/s35mountall. sh mount the file system/etc/RCS. d/s40networking enable Network Support/etc/rc2.d/s13tpd start login Manager/etc/rc2.d/s20makedev create device file/etc/rc2.d/s23xinetd start super Process
The INIT process uses "start" as the parameter and executes all scripts starting with "s #" in the order of file names. The smaller the number in the script name, the earlier it will be executed. For example, if the number in the "/etc/rc2.d/" folder is smaller than "s23xinetd", "s13tpd" is executed before "s23xinetd. If a script link starts with "K #", it will be executed with the "stop" parameter. If the service is not started, the script is not executed. For example,/etc/rc2.d/k20powernowd supports power management for a certain hardware. If you want to disable automatic running of a service at startup, you can rename the script in the corresponding running level from "s # XXX" to "K # XXX ". Manual control service ---------- you can also manually run the startup script with the following parameters to control system services. Start start stop restart Restart for example:/etc/rc2.d/k20powernowd start sometimes you are not clear about the current running level, there may not be corresponding scripts under this running level; in addition, the first three characters of such scripts are not fixed and are not easy to remember. In this case, you can directly use "/etc/init. d/"folder STARTUP script ("/etc/rcX. link the startup script in D/to/etc/init. d/"folder), which is the recommended method. For example:/etc/init. d/powernowd start tips: The above command is not included in the search path of the environment variable, So enter the complete path. Common system services============== ACPI-support advanced power management supports the acpid ACPI daemon. these two subsystems are used for power management and are very important for the Alsa sound subsystem ALSA-utils anacron cron. They will execute the scheduled tasks during the system shutdown for the next system runtime. The extension of apmd ACPI is similar to the cron task scheduling system. We recommend that you disable binfmt-support core to support other binary file formats. We recommend that you enable the bluez-utiles bluetooth device to support bootlogd startup logs. Enable the cron task scheduling system. We recommend that you enable the cupsys printer subsystem. Refers to the Message bussystem ). Important DNS-clean clears DNS information when using a dial-up connection. The evms Enterprise Volume Management System (javasisevolumn Management System) fetchmail email user agent is used to receive emails from the gmtme logon and table manager. Supports the mouse in the gdomap GPM terminal. Halt. Hdparm adjusts the hard disk script. The configuration file is "/etc/hdparm. conf ". Hibernate System sleep hot key-setup Notebook function key support. Supported types include HP, Acer, Asus, Sony, Dell, and IBM. Hotplug and hotplug-net plug-and-play support is complicated. We recommend that you do not change it. The script for renaming the ifrename network interface of the hpc hp printer and graphics subsystem. If you have ten NICs, you should enable the inetd in the file "/etc/inetd. conf" and comment out all services you do not need. If the file does not contain any services, it is safe to disable it. Www.2cto.com klogd is important. Supported by Linux-restricted-modules-common restricted modules. The modules in the "/lib/Linux-restricted-modules/" folder are restricted modules. For example, some drivers do not need to be enabled if you do not use restricted modules. Supports the LVM logical volume management system. Makedev is very important to create a device file. The mdamd disk array module-init-tools loads the extension module from/etc/modules. We recommend that you enable it. Networking network support. It is very important to activate the network by pressing the/etc/Network/interfaces file. We recommend that you disable the ntpdate time synchronization service. PCMCIA device support. Powernowd mobile CPU energy-saving support PPP and PPP-DNS dial-up connections readahead pre-load library files. Reboot. Resolvconf automatically configures DNS rmnologin to clear nologin rsync daemon sendsigs and sends a signal during restart and shutdown to activate the single-user mode SSH daemon. We recommend that you enable stop-bootlogd to stop the bootlogd service sudo check sudo status at the, running level. Important sysklogd System Log udev & udev-monoclonal user space Dev File System (userspace devfilesystem ). Important umountfs uninstall File System urandom random number generator usplash boot screen support vbesave graphics card BIOS Configuration tool. Save the status of the video card Xorg-common and set X service ice socket. Adjtimex is the tool used to adjust the core clock dirmngr certificate list. It works with GnuPG. The hwtools irqs optimization tool libpam-devperm is used to repair the device file license daemon after the system crashes. Lm-Sensors onboard sensors support mdadm-raid disk Display Manager screen-cleanup clear boot screen scripts xinetd manage an inetd super daemon for other daemon Important configuration files===============! In any case, back up the configuration file before modifying it! We recommend that you use this command: "sudo CP xxx _ 'date + % Y % m % d _ % H: % m '". Of course, this is very troublesome. You can create a file named "Bak" with the following content :#! /Bin/bash sudo CP $1 $1 _ 'date + % Y % m % d _ % H: % m' place it in a directory that you can remember, for example, run the "sh/home/bakxxx" command to save the file "XXX" in the current folder as "xxx_yymmdd_hh: mm ". Global configuration file------------ System initialization/etc/inittab running level, number of consoles/etc/timezone Time Zone/etc/inetd. conf super process File System/etc/fstab file system mounted at startup/etc/mtab file system currently mounted user system/etc/passwd user information/etc/shadow User Password/etc /group information/etc/gshadow group password/etc/sudoers sudoer list (use the "mongodo" command to modify this file, do not directly edit) the shell/etc/Shell available shell list/etc/inputrc Readline control sets/etc/profile user preferences/etc/bash. bashrc bash configuration file system environment/etc/environment variable/etc/updatedb. the conf file retrieves the database configuration information/etc/issue release information/etc/issue.net/etc/screenrc screen setting network www.2cto.com/etc/iftab Nic MAC Address binding/etc/hosts host list/etc /hostname host name/etc/resolv. conf domain name resolution server address/etc/Network/interfaces Nic configuration file User Configuration File------------ Only the root user can modify all files in the "/etc/" directory. The global configuration file of the application cannot be modified by common users. If you want to configure the software to meet your needs, you can modify its user configuration file. The user configuration file is usually a hidden file with the same name as the global configuration file, which is stored in your $ home directory, for example:/etc/inputrc/home/user /. inputrc/etc/Vim/vimrc/home/user /. vim/vimrc has a few exceptions, usually system programs/etc/bash. bashrc/home/user /. bashrc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.