Linux Essentials Lite

Source: Internet
Author: User
Tags clear screen

2017/11/17 0:23:14

Blog:

1. Instructions for querying the Help documentation:

(1) Use the type to see if the command is an external command or an internal command

(2) If an external command is used, the following 3 commands are queried:

Man number of chapters command: You need to first use the Whatis command to query which chapter the command belongs to, and then execute the commands

Command --help: Directly execute this line command to enter the document

Info command: Directly execute this line command to enter the document

if it is an internal command, query with the following command:
       
Help command: Execute this line command directly into the document

Info command: Directly execute this line command to enter the document

(3) Enter the Help document through the commands selected above and read the relevant information in English

2. Common shortcut keys:

Ctrl+l: Clear screen, equivalent to clear command

Ctrl + o executes the current command and displays the command again; Note You must first enter

Ctrl + S block screen output, lock

Ctrl + q allows screen output, unlocking

Ctrl + C Abort command

Ctrl + z suspend command

Ctrl + A cursor moves to the beginning of the command, which is equivalent to home

Ctrl + e cursor moves to the end of the command line, equivalent to end

Ctrl + XX cursor moves between the beginning of the command line and the cursor

Ctrl + u Delete from cursor to beginning of command

Ctrl + K Remove from cursor to end of command line

Alt + R Deletes the current entire row

ALT + N prompts you to repeat the character n times after you enter the specified character

ALT + t swap cursor and previous word position

Ctrl-shift-n Creating a new window

Ctrl-shift-q Close the current window

CTRL-SHIFT-T Create a label

Ctrl-shift-w Close a tab page

3. Configuration file:

(1) nano/etc/gdm/custom.conf

edit File Settings automatic login

write the following two lines of code under [daemon]:

automaticloginenable=true

Automaticlogin=root

(2) Nano/etc/sysconfig/network-scripts/ifcfg-ens33

Edit File Settings network Auto Connect

modify one line of content in the file:

the value of onboot is changed from No to Yes

(3) Nano/etc/issue

Edit the file, modify the pre-logon prompt information

Add the following three lines of information to the file to indicate the terminal number, time,

host name;

TTY is \l

Time is \ t

hostname is \ n

(4) CP MOTD/ETC/MOTD:

copying files from a file note MOTD to/ETC/MOTD to overwrite the file can make the login

changes to the prompt information

(5) Echo '---'/sys/class/scsi_host/host2/scan:

disk Scan When a disk is not found

(6) rpm-i/run/media/root/centos\ 7\ x86_64/packages/

screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64.rpm:

package for installing the screen command

4, the node sum:

each partition has a separate node table that records the node number, number of links in the node table ,

There are other kinds of meta-data, data storage is the location (address) of the data block information;

according to the data block, each data block 4k; The first 12 is the direct block pointer, the 13th is the first level

The pointer, the 14th is a level two pointer, the 15th is a level three pointer, and the first level pointer is the data point

pointer block, the pointer block holds the 4*1024/4 (storage address to 4 bytes) of the address,

each address points to a 4k block of data, a total of 1024*4k=4m;4m if not

jump to level two pointers, 1024*1024*4k=4g; if not enough, then

level three pointers, 1024*1024*1024*4k=4t; if not enough, there is no way out;

The data for the catalog items in the node table points to the mappings between the individual file names and the node numbers that are stored

5, User rights streamlining:

(1) Whether a user has administrator privileges depends on whether his ID number is 0;

(2) The user will only be given a token (ID number) when logged in, no more ID number after login

(3) Change the user ID number to 0,root ID number to not 0, in which case restarting the machine will also have a problem (by modifying the/etc/passwd file); In this case, the ordinary user has the administrator's permission, and Root has only the normal user's permission;

(4) It is not recommended to modify the file directly to change the user-related information, because the user information in other files also needs to be changed

(5) Modify the home directory in the passwd file, if this directory exists, there is no configuration file only, if the directory does not exist, after logging in prompted not to find home directory, will be the/root directory as a temporary home directory

(6) The MD5 algorithm in the shadow file represents the 128-bit, $6 represents the SHA512 encryption algorithm

(7) In the shadow password is encrypted, wherein the random number as impurities plus the user's password plaintext together to encrypt the algorithm;

(8) Empty password (shadow password field is deleted) The user is able to log on; The default created user does not set a password but the shadow password field is not empty!! The delegate is locked and cannot be logged in;

(9) The new file default group is the primary group, and the group password is used for the NEWGRP temporary switch group.

(10) Create user default ID number is assigned by the system, within 65535, the user specified is more than can

(11) The user temporarily switches the primary group if the user does not belong to this group, the group password is required

(12) File permissions:

r: Read, view
W: Write
x: Executable, such as script
chmod:
who:u,g,o,a owner, same group, other users
option:+,-, =
permission:rwx

ACL is an access control list for more complete permission changes

(14) Traditional permission changes do not support FAT32 file system, support XFS and EXT4, etc., FAT32 file system also does not support the modification of the file owners and groups;

(15) When Wang logs on, the owner of a file (both the owner and the group of Wang) changes
Not feasible, but can be modified to belong to group (provided that Wang User is in the group to be modified)

(16) Permissions for the directory:

r: Lists the list of files for the directory; If you do not have this permission, you can do some things, but you cannot see them;

W: Whether the file can be deleted depends on whether the directory has Read permissions, is not related to the permissions of the file itself, and can also create files;

x: Can enter the directory, view the directory of the file metadata, file node number; This is a basic permission;
         
(+) root account RW has no effect, but is affected by X, as long as the file appears X,root
Users can have this permission

Linux Essentials Lite

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.