Primary Learning Linux First unit

Source: Internet
Author: User

############# #虚拟机控制 ###############

[Email protected] desktop]$ rht-vmctl start Desktop # #打开虚拟机desktop

Starting desktop.

[Email protected] desktop]$ rht-vmctl View Desktop # #显示虚拟机desktop

[Email protected] desktop]$ rht-vmctl reset Desktop # #假设虚拟机出现不易解决的问题使用此方法重置

Is sure you want to reset desktop? (y/n) y # #真机在询问是否确定重置虚拟机desktopy表示yes, press Enter Y

Resetting desktop.

Powering off desktop.

Creating Virtual machine disk overlay for Rh124-desktop-vda

Creating Virtual machine disk overlay for RH124-DESKTOP-VDB

Starting desktop.

[Email protected] desktop]$ rht-vmctl View Desktop # #再次显示虚拟机desktop

[[email protected] desktop]$ rht-vmctl poweroff Desktop # #注销 (off) virtual machine desktop

Powering off desktop.

[Email protected] desktop]$ # #等待下一条指令的输入

~~~~~~~~~~ diagram: Virtual machine control and view display ~~~~~~~~

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/07/90/wKiom1nLidyDWbQNAAZhDK-m6gE151.png-wh_500x0-wm_ 3-wmp_4-s_1776194198.png "title=" screenshot from 2017-09-26 20-15-44.png "alt=" Wkiom1nlidydwbqnaazhdk-m6ge151.png-wh_50 "/>


############ #用户登陆 ################

*) Ordinary users:

Click Student user--> Enter the password below passwd (native password is student)-click Sign in to enter

*) Super User:

Click Not listed--> to enter the Superuser name under username root--> Click Sign in--> Enter the password below passwd (Chronicles password is redhat)-click Sign in to enter


~~~~~~~~~~ diagram: Virtual machine control and view display ~~~~~~~~


############# #语言修改 ##############


Upper left corner applications-->system Tools-->settings-->region & language--> Two language sources

*) system language (top): Controls all file names in the virtual machine system

@@ 更改 the way:language--> can choose the language you want "such as Chinese (China)"-->done--> Restart can be changed to become the

Language of the setting

@@ 重 Mode:

1) Open command line: Reboot

2) Click User-->log out

@@ 注意: After restarting the option will pop up, asking if the old file needs to be changed to the newly set language, select "No" here (to facilitate the search of previous files)

*) terminal recognition language (input sources): Control terminal input content display

@@ 更改 Way: Click +---Select the desired language--click Add to enter the input language bar

@ @PS: Click the icon for the language next to the sound icon in the top right corner, where the first switch needs to be selected

Both languages are switched: Key shift

~~~~~~~~~~~~~ diagram: Virtual machine Language Control ~~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/A6/41/wKioL1nLhFrgqxM7AANgyBxBZ50789.png-wh_500x0-wm_ 3-wmp_4-s_2912925880.png "title=" screenshot from 2017-09-27 13-34-37.png "alt=" Wkiol1nlhfrgqxm7aangybxbz50789.png-wh_50 "/>


# #第一单元 # #


##### #1. Line prompt

[Email protected] desktop]#

[Open Shell user @ Host name working directory name] identity prompt (#为超级用户, $ for normal user)

###### #2. Switch users

[[email protected] Desktop] #su-username

There is no need to enter a password when advanced users turn to low-level users;

However, when a low-level user transfers to an advanced user, an advanced user password is required to transfer to

@@ 在 User at the exit of the login back to the previous level needs to be entered at the command line: Exit

~~~~~~~~~~~~~~~~ diagram: User Switching ~~~~~~~~~~~~~~


650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/07/90/wKiom1nLhMKC3PHAAAKm34UkqeY277.png-wh_500x0-wm_ 3-wmp_4-s_3388218503.png "title=" screenshot from 2017-09-27 13-36-17.png "alt=" Wkiom1nlhmkc3phaaakm34ukqey277.png-wh_50 "/>

###### #3. Virtual Console

Graphical interface: CTRL+ALT+FN (some computer models) +f (1|7)

Text interface: CTRL+ALT+FN (some computer models) +f (2OR6)

Red hat Enterprise Linux Server 7.0 (Maipo) # #系统版本

Kernel 3.10.0-123.el7.x86_64 on a x86_64 # #内核版本, number of system bits

1. Virtual Console:

Desktop0 Login:root # #登陆用户名称输入

Password: # #密码输入无回显

2. The current interface is a graphical interface

~~~~~~~~~~~~~ diagram: Graphical interface ~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/07/90/wKiom1nLhRKTVYkKAA6ZvTfOtV8760.png-wh_500x0-wm_ 3-wmp_4-s_22739972.png "title=" screenshot from 2017-09-27 13-36-32.png "alt=" Wkiom1nlhrktvykkaa6zvtfotv8760.png-wh_ "/>


##### #4. Command execution

1. The command must be entered after the line prompt

# (Super User)

$ (normal user)

2. Command format

[[Email protected] desktop]# Command (command) parameter (parameters) target (target)

3.ctrl +c # #撤销命名的执行

~~~~~~~~~~~~~~~~~~ diagram: Command revocation ~~~~~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/A6/42/wKioL1nLhRjDlzZXAAEgwNUUCuE190.png-wh_500x0-wm_ 3-wmp_4-s_1676189779.png "title=" screenshot from 2017-09-27 13-37-01.png "alt=" Wkiol1nlhrjdlzzxaaegwnuucue190.png-wh_50 "/>

4. Command parameters

-Parameter # #单词缩写

--Parameter # #单词的全拼

~~~~~~~~~~~~~~~~ diagram: Abbreviation parameter ~~~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A6/42/wKioL1nLhYbw_FoAAAH7QlDJTFE916.png-wh_500x0-wm_ 3-wmp_4-s_3523272147.png "title=" screenshot from 2017-09-27 13-38-39.png "alt=" Wkiol1nlhybw_ Foaaah7qldjtfe916.png-wh_50 "/>


###### #5. Help with Commands

1. Whatis Command # #查看命令的功能

~~~~~~~~~~~~~~~ Illustration: Whatis command usage ~~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/07/90/wKiom1nLhe2BjYWlAAHjkRSJyZw119.png-wh_500x0-wm_ 3-wmp_4-s_1408563213.png "title=" screenshot from 2017-09-27 13-39-08.png "alt=" Wkiom1nlhe2bjywlaahjkrsjyzw119.png-wh_50 "/>


2. Command--help # #查看命令的帮助

~~~~~~~~~~~~~~~~ Illustration: Help command usage ~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/A6/42/wKioL1nLhc-Bm4C5AAMKb3zdRtY344.png-wh_500x0-wm_ 3-wmp_4-s_224818878.png "title=" screenshot from 2017-09-27 13-40-05.png "alt=" Wkiol1nlhc-bm4c5aamkb3zdrty344.png-wh _50 "/>


3. [] # #选择加入的内容, can be added without

4 .... # #加入的内容个数任意

5. <> # #内容在命令执行过程当中必须要加

Note: When the Whatis View System command does not help, it is because the system does not load the Help database! At this point, you can reload with mandb.


##### #6. Basic methods of using the system

1. System login (see 3. Virtual Console)

Graphical login mode

Text login mode

2. Work Interface Conversion

ctrl+alt+ on | down

3. Start Bash

1) applications>utilities>terminal

2) right mouse button----->open in terminal

3) gnome-terminal

4) Ctrl+shift+n # #在新窗口中打开shell

Ctrl+shift+t # #同一个窗口中打开新的tab

5) Exit: Exit | Ctrl+d

4. System shutdown, restart

Restart

Reboot | Init 6 |shutdown-r Now

Shutdown

Poweroff | Init 0 | Shutdow-h now | top right corner user picture Click Log Out

~~~~~~~~~~~~~~~~ Figure: User ~~~~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/07/90/wKiom1nLhjqR6o9vAAHu6QIRmfQ513.png-wh_500x0-wm_ 3-wmp_4-s_4206720451.png "title=" screenshot from 2017-09-27 13-41-54.png "alt=" Wkiom1nlhjqr6o9vaahu6qirmfq513.png-wh_50 "/>


5. Lock Screen

CTRL + Alt +l | Top right corner user picture Click on lock

##### #7. Simple system commands

1.date

1>watch-n 1 Date # #让date命令每秒执行一次, <ctrl +c> exit monitor mode

~~~~~~~~~~~~~~~~ diagram: Date monitor mode ~~~~~~~~~~~~~~~~



650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/A6/42/wKioL1nLhlXBwJeSAAFJfraNl5o108.png-wh_500x0-wm_ 3-wmp_4-s_4139918552.png "title=" screenshot from 2017-09-27 13-42-51.png "alt=" Wkiol1nlhlxbwjesaafjfranl5o108.png-wh_50 "/>

2>date 11181115 # #把系统时间设定为11月18日11:15 format: Month Day hour minutes

3>date 111811152016.55 # #2016表示年 (can not be added). 55 = seconds (can not be added)

4>date--help # #可查看所有关于date命令的使用方法, Learn more

The following are listed individually:

-D +xday | -xday # #查看x天前或者后的时间

+% .... # #设定date的输出格式

2.passwd

1> Modifying user passwords

[Email protected] ~]# passwd

Changing password for user root. # #改变超级用户密码

New Password: # #输入密码

Bad Password:the PASSWORD is shorter than 8 characters

Retype new password: # #确认密码

Passwd:all authentication tokens updated successfully.

[Email protected] desktop]$ passwd

Changing password for user kiosk. # #改变普通用户密码

changing password for kiosk.

(current) UNIX Password: # #输入当前密码

New Password:

Bad Password:the PASSWORD are the same as the old one # #和原始密码不能相似

New Password:

Bad password:the PASSWORD fails the dictionary check-it is too simplistic/systematic # #密码必须是无序数字 + Letters

New Password:

Bad Password:the PASSWORD is shorter than 8 characters # #密码必须 >8 bit


ps:1) Super user to modify the ordinary user password does not need to enter the original password, ordinary users need;

2) The password content of the super user will not be restricted by the system, such as the length and the similarity of the original password. But ordinary users are not allowed to enter a password with a high similarity to the original password, the password content must be unordered numbers and words

Combination of the female.

2>PASSWD parameter User name

-S (--status) # #用户密码信息

-L # #锁定帐号

-U # #解锁帐号

-N # #设定密码最短有效期

-X # #设定密码最长有效期

-W # #警告期 (how long in advance to remind the user that the password is about to change)

-I # #设定用户非活跃天数 (old password can be used before the old password expires)

-D # #清除用户密码

~~~~~~~~~~~~~ diagram: passwd each parameter usage ~~~~~~~~~~

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/A6/42/wKioL1nLhofTkT_lAAIq1Jnc04M665.png-wh_500x0-wm_ 3-wmp_4-s_196302273.png "title=" screenshot from 2017-09-27 13-44-09.png "alt=" Wkiol1nlhoftkt_laaiq1jnc04m665.png-wh _50 "/>



3> Monitoring passwd Password information

Watch-n 1 passwd-s Student

~~~~~~~~~~~~~~~ Diagram: monitoring password information ~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/07/90/wKiom1nLhuayueEeAAFuBJW3YX0930.png-wh_500x0-wm_ 3-wmp_4-s_1760621093.png "title=" screenshot from 2017-09-27 13-44-42.png "alt=" Wkiom1nlhuayueeeaafubjw3yx0930.png-wh_50 "/>



3.file

File name # #查看文件类型

4. Viewing of files

1> Cat filename # #显示文件的全部内容

2> Head FileName # #显示一个文件的前几行

3> head-n 5 FileName # #前五行

4>tail FileName # #显示文件后几行

5>tail-n 5 FileName # #显示一个文件的后5行

~~~~~~~~~~~~~~~ diagram: File View usage ~~~~~~~~~~~~

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/07/90/wKiom1nLhx7CtF7JAANocic6Y_w374.png-wh_500x0-wm_ 3-wmp_4-s_3997426521.png "title=" screenshot from 2017-09-27 13-50-25.png "alt=" Wkiom1nlhx7ctf7jaanocic6y_ W374.png-wh_50 "/>

5.WC Statistics File capacity information

Wc-l Number of rows

-W Words

-C bytes (including a career change, is 1 bytes)

-M character Count

~~~~~~ ~~~~~~~~~ diagram: WC parameter usage ~~~~~~~~~~~~~

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/A6/42/wKioL1nLhvzTdM5eAAEjTlmJ4Gc069.png-wh_500x0-wm_ 3-wmp_4-s_1907545338.png "title=" screenshot from 2017-09-27 13-51-15.png "alt=" Wkiol1nlhvztdm5eaaejtlmj4gc069.png-wh_50 "/>


Use of 6.tab hotkeys

1> the table key in the system can automatically complement the existing command, the file name and the parameters of some commands

2>a+tab x2 Show All commands in a system

History of 7.history calls

1> History # #显示历史

2> Hostory-c # #清除当前环境当中的历史命令

3>! Number # #执行第多少行命令

4>! Letter # #执行最近一条以这个字母开头的命令

5> Ctrl +r + keywords # #执行最近一条含有这个关键字的命令

6> down Key # #逐行调用命令


Note: Using history-c to clear the current history of the open shell, when the current shell is closed to open a new shell, history will be refreshed again, because some of the history is saved in the system files.


~~~~~~~~~~~~~~~ diagram: Histroy history Call Usage ~~~~~~~~~~~~

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A6/42/wKioL1nLhx7wrhCnAAHNvdEqYMQ617.png-wh_500x0-wm_ 3-wmp_4-s_3409786350.png "title=" screenshot from 2017-09-27 13-52-35.png "alt=" Wkiol1nlhx7wrhcnaahnvdeqymq617.png-wh_50 "/>


Shortcut keys in 8.linux

Around 1> # #一个字符一个字符移动

2> Ctrl + around # #一个字一个字移动

3> Ctrl + A # #光标移动到行首

+ E # #光标移动到行尾

+ U # #光标所在位置删除到行首

+ k # #光标所在位置删除到行尾

+ r+ keyword # #调出最近一条含有关键字的命令

+ C # #撤销以输入的命令

+ D # #关闭当前环境

+ SHIFT + t # #在现有shell中重新打开一个table

+ SHIFT + Pageup|pagedown # #切换table

+ ALT + L # # Lock Screen

+ ALT + top | down # #切换工作界面

+ ALT + F1|f7 # #进入图形界面

+ ALT + F2-f6 # #进入虚拟控制台



This article is from the "13342594" blog, please be sure to keep this source http://13352594.blog.51cto.com/13342594/1969277

Primary Learning Linux First unit

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.