followed by the bird Uncle Wen Linux (ii)

Source: Internet
Author: User

First, the Linux graphical interface

The GUI of Linux mainly includes xterm, XFCE, LXDE, Openbox, Gnome, KDE and so on.

Table layout currently the most popular in the country is the estimated Ubuntu it

But I like to do it under the command line, so I'll turn the GUI off to improve speed.

* How to turn off the graphical interface:

Temporarily closed can be entered at the command line:Init 3

Turn on command line:Init 5

Permanent shutdown requires modification of the configuration file

Configuration file:/etc/inittab

Modify the last behavior Id:3:initdefault:

Writing here can not help asking what is init?

Init is a user-level process initiated by the Linux kernel and is the first process to start after the kernel finishes booting. The PID number of the Init process is always 1

  

The number following the Init [0-6] indicates its runlevel, which typically has 7 operating levels:

0-Stop (never set the Initdefault to 0)

1-Single user mode

2-multiuser, no NFS

3-Full multi-user mode (standard run level)

4-null

5-x11 (Xwindow)

6-Reboot (never set Initdefault to 6)

Second, multi-household use of Linux

Linux supports multiple users, each user has their own special rights to the file device, to ensure that the user does not affect each other. Multitasking is one of the most important features of computers now, and Linux allows multiple programs to run simultaneously and independently. Unlike Windows, when Linux shuts down, it is not recommended to turn off the power directly, as there may be other users in use.

   The WHO command can see the user's online situation.

If the previous is an abnormal shutdown, may result in data is not written from memory to the hard disk, this time after the boot can use the Sync command to synchronize the data, so that those not yet written to the hard drive data can be written to the hard disk. This command is best done several times (this reason I do not know, I hope someone can answer the ~).

The Shutdown command is often used when shutting down, the command format:shut down [-t seconds] [-ARKHNCFF] time [warning message]. The effect of the specific parameters can be viewed with the man shutdown .

You can use the reboot command when you reboot, and of course you can use halt,Poweroff

From the init command in the previous section, it can be seen that the terminal enters Init 0 to play the shutdown effect, and the init 6 can be restarted.

Third, file permissions

Linux permissions are mainly composed of three parts, file owner permissions, file group permissions, user rights, each class of permissions are generally composed of R, W, X, respectively, is readable, writable, executable,-Indicates no permissions

Changing permissions can use the chmod command.

RWX three characters can be considered as a three-bit binary form, that is, if three permissions have, that is to say that each digit is 1, then 7 means rwx three permissions, the same as 5 can represent r-x permissions

So when using chmod, you only need to use a number to express permissions to modify the permissions of the file.

[Email protected]/]#ls-L123.SH-rwxr-xr-x.1Root root - September   at  One: the 123.SH[[Email protected]/]# CD etc/[email protected] etc]#ls-L BASHRC-rw-r--r--.1Root root2685 September  Ten xx: WuBashrc[[email protected] etc]#chmod 777BASHRC [[email protected] etc]#ls-L BASHRC-rwxrwxrwx.1Root root2685 September  Ten xx: WuBashrc[[email protected] etc]#chmod 644Bashrc[[email protected] etc]#ls-L BASHRC-rw-r--r--.1Root root2685 September  Ten xx: WuBashrc
[Permissions][inode][own][grp][size][date] [FileName]

Can find the way to change permissions with chmod is such an effect, of course, the number is just a way to change permissions, if you want to add to a certain class of users or remove a certain permission can refer to the way the table.

U represents the user who owns it

G means other users in the file ' s group

o indicates that other users, not in the files ' s group,a, represent all users.

chmod U
G
O
A
+ (Join)
-(remove)
= (set)
R
W
X
File or directory

The more common thing is to add executable permissions to some scripts, which makes it easier to use the chmod +x filename directly.

There are also two commands chgrp and chown, respectively, that change the group and change the owner.

File permissions for Linux is very important, because Linux is a multi-user operating system, you do not want your files can be arbitrarily modified by others, all need to add the appropriate permissions. In particular, the need to modify permissions to get root permissions, novice use root privileges to be very careful, otherwise it may lead to some misoperation caused the whole system to crash.

followed by the bird Uncle Wen Linux (ii)

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.