current position:Home>418 Linux foundation (partition and directory)
418 Linux foundation (partition and directory)
2022-06-24 09:54:28【liufeng2023】
1、 Partition
- Linux Partition of hard disk It is mainly divided into Primary partition (primary partion) and Extended partitions (extension partion) Two kinds of , The sum of the number of primary and extended partitions cannot be greater than four .
- The primary partition can be used immediately but can no longer be partitioned .
- The extended partition must be partitioned twice before it can be used , After the secondary partition of the extended partition , It's called logical partitioning (logical partion), There is no limit on the number of logical partitions .
2、 Disk files
Linux A hard disk in a is a file , Deposit /dev Below directory ,IDE Hard disk named hdx(x For from a—d, General computer IDE Up to four hard disks ). SCSI,SATA,USB Hard disk, etc. , stay /dev/ The directory is named sdx(x by a—z)
such as SCSI Hard disk , The primary partition is from sda1 Start to sda4, Logical partition from sda5 Start ,( Logical partitions are always from sda5 Start …)
The device name can use fdisk –l
see :
sudo fdisk ‐l
Output :
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
Units = A sector of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e626e
equipment start-up The starting point End Number of blocks Id System
/dev/sda1 * 2048 81788927 40893440 83 Linux
/dev/sda2 81790974 83884031 1046529 5 Expand
/dev/sda5 81790976 83884031 1046528 82 Linux In exchange for /
You can see the hard disk file /dev/sda The size is 42.9G, And it is divided into a primary partition /dev/sda1, An extended partition /dev/sda2, The extended partition is divided into a logical partition /dev/sda5.
3、 Directory structure
Linux The tree structure directory is used in .
/ # root directory
/bin # The commands required by the underlying system are located in this directory , It's the command that the smallest system needs , Such as :ls, cp, cd wait . The files in this directory are executable , General users can use it .
/dev # Device file , Like sound cards 、 disk 、 mouse 、 Keyboard, etc .
/etc # System management and configuration files
/etc/init.d # Launch configuration files and scripts , You can add a startup script here .
/etc/rc.local # User added startup item
/home # User home directory , Such as user user The home directory of /home/user, It can be used ~user Express
/lib # Standard programming inventory placement path , Also called dynamic link sharing library , Works in a similar way windows Inside .dll file
/sbin # Super management order , Here is the storage of the system administrator using the management procedures .
/tmp # Temporary file directory , Sometimes when users run programs , Temporary files will be generated . /tmp Used to store temporary files .
/root # Home directory of system administrator
/mnt # Used to temporarily mount other file systems
/lost+found # This directory is usually empty , Unexpected system crash or unexpected machine shutdown , And generate some file fragments here . When the system starts
In the process of moving fsck The tool will check here , And fix the damaged file system .
/media # The mount point of plug and play storage device is automatically created in this directory , such as USB After the disk system is automatically mounted , Will be in
A directory is generated under this directory
/proc # Virtual file directory , You can directly access this directory to get system information .
/var # Login files or error message files for all services (log files) All in /var/log Inside
/boot # contain Linux Files required by kernel and system boot program , such as vmlinuz initrd.img The files are located in this directory . In one
In general ,GRUB or LILO The system boot manager is also located in this directory ;
/usr # The largest catalog , Almost all the applications and files to be used are in this directory , It includes :
/usr/bin # Lots of applications
/usr/sbin # Some hypervisors for super users
/usr/include #Linux Under the development and compilation of the application required header files
/usr/lib # Common dynamic link libraries
/usr/share/man # Help document
/usr/src # Source code ,Linux The source code of the kernel is in /usr/src/Linux in
/usr/local/bin # Local added orders
/usr/local/lib # Locally added library root file system
.
Represents the current path ...
On behalf of the previous Directory .~
Represents the user directory path .
copyright notice
author[liufeng2023],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/175/202206240907452889.html
The sidebar is recommended
- () is a linear table that restricts the internal structure of data elements to only one character. A. Stack B. queue C. string D. array
- TS cannot find global variable for NPM package
- Java, what should I do if there is an edit configuration in the idea when it runs
- C++ code. Freshmen have just come into contact with this language
- Tnsnames Ora file configuration
- Handling method of Oracle data file header SCN inconsistency
- Oracle database listening file configuration
- Oracle database expdp only exports tables
- Windows method for checking network port occupation and kill process
- Oracle viewing data file header SCN information
guess what you like
Ora-28000 error after upgrading Oracle 12C to 19C
[talk about serviceregistryendpoint of springcloud]
[springcloud service registration and anti registration AOP interception]
[springboot source code analysis - @endpoint annotation validation principle analysis]
[elegant offline and grayscale release of spring cloud]
PostgreSQL
Reactnative 0.69 release
The new design can be called a new generation. The gradient borderless grille has a high appearance value. The application drawing of Changan Ruicheng plus
Linux general command summary
Render external link address URL video page via iframe - Vue
Random recommended
- Detailed explanation of Linux system tuning (VII) -- network status viewing command nethogs
- Vue failed to parse source for import analysis because the content contains invalid JS syntax
- Differences between front-end set and map
- Difference between front-end foreach and map
- Front end array flattening
- How the front end judges the data type
- Front end CSS style expand and collapse
- Front end array de duplication
- Front end throttling and anti shake
- Analysis of 43 cases of MATLAB neural network: Chapter 33 prediction algorithm of fuzzy neural network -- water quality evaluation of Jialing River
- Java & c++ problem solving and expansion -- leetcode30 Concatenate substrings of all words [new knowledge of Mo]
- Eclipse customizes and calls the header file [c/c++]
- Detailed explanation of Vue Foundation
- Unity determines whether all toggles are selected or not
- Program reverse output and print results
- Ubuntu modify time zone
- Linux Installation maven
- Okhttp source code analysis of Android network framework
- Android adds system service interfaces and test cases
- Ubuntu deployment according to Vue version
- Thinkphp5 clear the cache cache, temp cache and log cache under runtime
- Springboot + JWT + redis open source knowledge community system
- Why is JSX syntax so popular?
- The actual test of fluent IOS -- worth collecting
- Front and rear end cross domain issues
- Record the range of data that MySQL update will lock
- Springboot + JWT + redis open source knowledge community system
- 1 minute serverless set up a real website to lead the cat super card: scene experience of "set up nails at a high speed to broadcast the weather regularly"
- 1 minute serverless quickly build a real website to lead the cat super card: scene experience of "rapidly build a zblog blog system"
- Vue eventbus value transfer between brother components
- Array seamless scrolling demo
- Echorts auto play
- Class object oriented programming idea
- elementui utils/clickoutside. JS click element external trigger
- SQL statistics of users logged in for N consecutive days
- Vue3 network request adding loading
- Explain the specific calculation of string hashcode in Java
- Open Oracle server under Linux to allow remote connection
- Properties and simple realization of red black tree
- Vue component introduction and page Jump