Linux piecemeal knowledge

Due to the limitation of the hard disk structure, there can only be a maximum of four primary partitions and extended partitions, and only one extended partition. The extended partition cannot write data. It is used to contain logical partitions. The logical partitions can write data and formats normally. Change.
Formatting (referring to advanced formatting here), systematically organizing the disk partitions. For example, EXT4 in the Linux standard is to divide the disk into several 4KB small modules.
Linux use steps: Partition formatting named partition (mount)
hardware device file name
IDE hard disk / dev / hd [ad]
scsi / sata / usb hard disk / dev / sd [ap]
CD-ROM drive / dev / cdrom or / dev / The file name of the sr0
floppy / dev / fd [0-1]
printer / dev / usb / lp [0-2]
mouse / dev / mouse
network card / dev / eth
partition is the hard disk file name followed by the number of the
logical partition 5 Start
Compressed package: * .gz * .bz2 * .tar.bz2 * 0tgz
Binary software package: .rpm
web page
file.html * .php
script file.sh
configuration file:
.conf
The hidden file in linux is a system file to prevent The user's misoperation, etc., the file name starts with a dot, and only the file name needs to be modified to modify the hidden file.
File start-indicates that this is a file, d indicates that this is a directory, l indicates that this is a soft link
r Read permission to view the file content Can list the contents of the directory
w Write permission can modify the file content can be created in the directory, delete the file
x execute permission can execute the file can enter the directory The
default directory created in Linux displays 755, the file display 644 is
divided into four parts, the owner, The group to which they belong, the permissions of others. The
soft link file is equivalent to the shortcut of windows. The permission form is lrwxrwxrwx. The file is very small, and an arrow points to the source file.
The hard link is equivalent to cp -p + synchronous update, the deletion of the source file is not affected, it is recognized by the i-node, it cannot cross the partition, and it cannot use
1k = two data blocks = 1024 bytes for the directory
link two conditions: -a two conditions Must meet -o not two conditions to meet one can be
tty local terminal when logging in, pts remote terminal
TCP protocol is similar to making a call, both parties must verify the communication before
UDP protocol is similar to sending short messages, as long as the recipient holds the ip address It ’s better to have one, and it ’s faster. When you
visit the website, the originating port is a randomly assigned port greater than 1024, and the receiving port is fixed according to the type of service.
System operation level:
0–shutdown, 1–single user, 2–incomplete multiuser, without NFS service
3–complete multiuser, 4–unassigned, 5–graphical interface, 6–restart

Source package
Advantages:
open source, if you have enough capabilities, you can modify the source code,
you can freely choose to install the required functions. The
software is compiled and installed, so it is more suitable for your own system, more stable, and more efficient.
Easy to uninstall.
Disadvantages: more
installation steps, Especially when installing a large collection of software (such as the LAMP environment), it is prone to spelling errors. It
takes a long time to compile.
Because it is a compilation and installation, it is difficult to solve the error.

RPM packages (binaries)
advantages of
package management system is simple, can be achieved only installation packages, upgrade, query, and unload a few commands
to install faster
shortcomings
compiled can not see the source code
function selection not as flexible source code package
dependent of the
package full name of
the package is not operating when the package is installed, use the package's full name, and the path should pay attention to
the package name: operation points package is installed, the package name. Search the database in / var / lib / rpm /

SUMMARY prompt command rpm -v
s file size change
the permissions of the file type or file m (rwx) is being modified
5 MD5 checksum file has changed (whether the file contents can be viewed as change)
L to change the file path is
U files Whether the owner changes the
group of the G file, whether the
T file time has changed,
c configuration file,
d ordinary file,
g ghost file, which is rare, that is, the file should not be included in the rpm package,
authorization file,
r description file.

Published 16 original articles · praised 3 · visits 424

Guess you like

Origin blog.csdn.net/qq_23321269/article/details/104805961