Linux basic concepts and Personal notes summary (2)

Source: Internet
Author: User

Security code: As long as kung fu deep, Mulberry becomes satin

Because the fourth chapter experiment must combine theory and practice, so I immediately demonstrate experimental results, and timely update, hope to help everyone, thank you!

Chapter III Installation and management procedures

1. Query the installed rpm software information

Format: rpm-q (sub-option) (software name)

-qa: View A list of all RPM packages installed on the system

-qi: View detailed information for the specified software

-QL: Query the list of directories and files installed by the specified package

-QC: Displays only the configuration files for the specified package installation

-QD: Displays only documentation files for the specified package installation

2. Which RPM software does the query file or directory belong to?

Format: RPM-QF file or directory name

3. Query the non-installed rpm package file information:

Format: RPM-QP (sub-option) RPM package software

-qpi: View details of the software through the. RPM Package file

-QPL: View the directory contained within the. RPM installation package, file list

-QPC: View the list of configuration files included in the. RPM Installation Package

-QPD: View the list of document files included in the. RPM Installation Package

4, CD-ROM mount

Mount/dev/cdrom (device)/media (directory)

Note: The habit of using discs with Windows is to be differentiated, and Linux must be mounted or uninstalled.

View Mount: Mount

Unmount of CD: Umount/dev/cdrom or Umount/media

5, RPM Package installation

RPM-IVH (sequence-insensitive) RPM package name

-I (install),-U (upgrade),-f (update),-V (Display information),-H (Show installation Progress, "#" representation)

6, RPM Package Uninstall:

RPM-E Package Name

--nodeps (Ignore dependency) 、--force (mandatory)

7. Maintain RPM Database

Rebuild RPM Database: rpm--REBUILDDB or RPM--INITDB

8, compile the installation process:

A, tar unpacking--Download the source code installation package file

Purpose: Unzip and release the source code package to the specified directory.

b, (./configure configuration)

Purpose: Set the installation directory, installation module and other options

c, make compile

Purpose: Generate executable binary files

D, make install installation

Purpose: Copy binary files to system, configure application environment

E, testing and use

Related commands: CP * Copy all Files

Source Package storage Location:/USR/SRC

Source Package Installation Location:/usr/local

Access to the Linux Web page plus port number (: 10000) to enter root and password access

Prevent conflicts, as shown in the notes:

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/86/78/wKiom1e_vPSxeZt6AAHjpxjRTb0103.png-wh_500x0-wm_3 -wmp_4-s_1605991459.png "title=" 623054ae3e24efb46b08d9f0be95354b.png "alt=" Wkiom1e_vpsxezt6aahjpxjrtb0103.png-wh _50 "/>

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/86/77/wKioL1e_vRbi9SeZAAINasE9vp4935.png-wh_500x0-wm_3 -wmp_4-s_2935151232.png "title=" 85916d05f98385de21f5457591e485d6.png "alt=" Wkiol1e_vrbi9sezaainase9vp4935.png-wh _50 "/>

Fourth chapter account and authority Management

User management:

1, user-related configuration files

/ETC/PASSWD (save user)

/etc/shadow (user password file)

/etc/skel (user template file)

2, user-related commands

Useradd (create User), passwd (change password), Userdel (delete user), Usermod (Modify user properties)

Useradd options:

-D: Specify the user's host directory location

-e: Specify user account Expiration time

-G: Specify the user's base group name (or GID number)

-G: Specify the user's additional group name (or GID number)

-S: Specify the user's login shell

passwd (option) User name

-D: Delete password, root can be useful

-F: Forced execution

-K: Settings can be updated only after the password expiration expires

-L: Lock password

-U: Unlock Account

-S: Lists password-related information for ROOT to use

Usermod command:

Format: usermod (option) User name

Note: Usermod can be used to modify the user account settings

-L: Lock user account

-U: Unlocking user accounts

Because the options are roughly the same as those in the Useradd command, there is no explanation here

Chage-l User (view user account information)

Delete user account:

Userdel command

Format: Userdel (-r) User name

Add a point of knowledge here:! command can find the command line you need from the history record, history can get the serial number of the historical command

3, the management of the group

A, group-related configuration files:/etc/group

B, group-related commands: Groupadd-g (create Group), Groupdel (delete group), gpasswd (add user to Group)

GPASSWD command:

Format: GPASSWD (option) group account name

-A: Adding a user to a group

-D: Delete a user member from within a group

-M: Defines a list of group members, separated by commas (additional groups)

Add:

A, id command

Purpose: Query user identification (ID user name)

B, Groups command

Purpose: Query the group to which the user belongs

Groups user Name

C, Finger command

Finger User Name

D, users, W, who commands

Purpose: Query user information that has been logged on to the host

Prevent conflicts, as shown in the notes:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/78/wKiom1e_xJvQr0ytAAH78heQWV0512.png-wh_500x0-wm_3 -wmp_4-s_2502218317.png "title=" 27aa852525e06db4e998354d22f44c7d.png "alt=" Wkiom1e_xjvqr0ytaah78heqwv0512.png-wh _50 "/>

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/86/78/wKiom1e_xMXwiktIAAITyz5WeAs634.png-wh_500x0-wm_3 -wmp_4-s_10993760.png "title=" 4a042555af61174366b2f054778c5a75.png "alt=" Wkiom1e_xmxwiktiaaityz5weas634.png-wh_ "/>



Thank you for watching, I will immediately demonstrate the fourth chapter related experiments, timely update, in order to facilitate the combination of theoretical and experimental!





This article is from "A Candle" blog, please be sure to keep this source http://yw666.blog.51cto.com/11977292/1842920

Linux basic concepts and Personal notes summary (2)

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.