RedHat Study Notes: Some Linux commands (RH033) and related concepts

Source: Internet
Author: User
Note: All commands are captured in the form of "[COMMAND]". Use [?] To search for related commands 【?] . Convenient and accurate. ========================================================== ================================ [Philosophy] of [Linux ]: 1. everything is a file 2. linux is mainly composed of short and single-purpose programs (so a command generally does only one thing. concatenating multiple short programs to complete complex tasks 4. try

Note: All commands are captured in the form of "[COMMAND]". Use [?] To search for related commands 【?] . Convenient and accurate.
========================================================== ==================================
[Philosophy] of [Linux ]:
1. Everything is a file
2. Linux is mainly composed of short and single-purpose programs (so a command generally only does one thing)
3. concatenate multiple short programs to complete complex tasks.
4. Avoid capturing user interfaces as much as possible (avoid contact with users as much as possible, start from --> press enter, fully automatic, no user operation is required)
5. Save the configuration information of the software through a file (you only need a simple text editor to operate the entire system)
========================================================== ==================================
[Locale] command: view supported language codes
Locale-a allows you to view the encoding methods of all languages supported by Linuxs.
-------------------------------------------------------
Run the [who] command to check who is there.
Run the [tty] command to check the terminal currently logged on.
Use the "startx" + "& command to start a graphical work button at the position corresponding to F7
Use startx --: 1: 1 to represent the first graphic screen
The startx --: 2 command can start multiple other graphical interfaces.
-------------------------------------------------------
You can press shift + pg up or pg down to flip the screen up and down to view other content.
Press Ctrl + Shift + C to copy,
Press Ctrl + Shift + V
-------------------------------------------------------
Right-click the inittab file under etc and use the text editor.
Changed to id: 3, it will become a character interface at startup
-------------------------------------------------------
[Globally valid] configuration file:
/Etc/profile,
/Etc/profile. d /*,
/Etc/bashrc

[Partially valid] configuration files:
~ /. Bash_profile
~ /. Bashre,
~ /. Bash _. logout

These files are divided into two types,
1 is the profile class
It is usually used to set environment variables.
Used to run some commands (commands to be executed during user logon)
2 is the bashrc class
It is generally used to set aliases.
Used to set local variables

Shell is divided into two categories for users.
1. Interactive login shell. You can log in as a user, where you can enter such logon commands
[Read order] (the higher the back priority)
/Etc/profile -->/etc/profile. d/* --> ~ /. Bash_profile --> ~ /. Bashrc -->/etc/bashrc
2. Non-Logon shell: a shell that runs automatically when a script system is started
[Operation order ]:
~ /. Bashrc -->/etc/profile. d /*
-------------------------------------------------------
[How to Make the modified Logon Settings effective immediately ]?
Run the [source] command to re-read the configuration file.
Source/etc/profile
Run the "[.]" command to re-read the configuration file.
Actually. = source
For example,./etc/profile
It is not recommended to use source, which will affect the use of other variables.
-------------------------------------------------------
How to achieve [user management]
1. What is User ]:
It is a credential used by a user to obtain system resources. It is a combination of permissions. in order to identify and define the resources and services that each user can access. It is just a credential. The computer will match the number first. Id. Generally, the user name is public.
There is also a verification mechanism to verify that the user is the one it claims. (Password is actually the least reliable method)
2. What is Group ]:
A group can be identified as a set of permissions, and any member of this group automatically has the permissions of this group. The computer depends on GID (group ID) for identification.
A user group also has a password. Generally, users cannot join a group at will and must be assisted by administrators. The role of a password is to temporarily Add a user without administrative permissions to a group.

There are two groups: (in linux, any user must belong to a group. Even if there is no group, the system will assign you a group with the same name as you)
1. Private Group: there is only one user in it, and the user name has the same name as the group name. It is also called a basic user group.
2. Public group: Also called a common group. It is also called an additional group or an additional group of the user.
A user can have multiple groups at the same time.

UID, GID: it is actually saved as an unsigned decimal number, expressed in hexadecimal notation, 0 ~ 65535
UID, GID and UID are the same
Administrator ID, always 0 (root)
Id command + user, you can view the user id and group.

1-499: belongs to the System user, so that a program can run as a user during running.
500-65534: Common User
65535: Special Nobody user (may also be 65536, overflow,-1, equivalent to Guest, Guest account)

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.