LINUX Redhat First Unit document

Source: Internet
Author: User

Enter the system

General User studnet:

Click Student Enter password to enter the normal user student

Super User root:

Click >not Listed

Enter Superuser username >root

Type the password >********


Language adjustment
Applications----->system Tools---->settings----->region & Language--->language

Open command line---> reboot


    1. Line prompt

[Email protected] desktop]#
Root Current User root: Super User

@ delimiter

LocalHost host name

Desktop Current Working Directory

#: Super User $: Normal user

650) this.width=650; "src=" http://img.blog.csdn.net/20170330104410258 "alt=" 20170330104410258 "/>

2. Switch users

Super User switch Ordinary user [[email protected] desktop]# su-student

Exit normal user [[email protected] ~]$ exit

650) this.width=650; "src=" http://img.blog.csdn.net/20170330104633806 "alt=" 20170330104633806 "/>

Normal User Switch Super User

[Email protected] ~]$ Su-root
Password:

650) this.width=650; "src=" http://img.blog.csdn.net/20170330104753873 "alt=" 20170330104753873 "/>

Advanced users switch to low-level users do not require a password, low-level users switch to advanced or peer-to-user Switching requires a password


3. Virtual Console

Ctrl+alt+f (1|7) into the graph
Ctrl+alt+f (2~6) into the Virtual Console

Red hat Enterprise Linux Server 7.2 (Maipo) # #系统版本
Kernel 3.10.0-123.el7.x86_64 on a x86_64 # #内核版本, number of system bits

Desktop0 Login:root # #登陆用户名称输入
Password: # #密码输入无回显


4. Execution of the order

command must be entered after the line prompt

650) this.width=650; "src=" http://img.blog.csdn.net/20170330105122464 "alt=" 20170330105122464 "/>
Command format
Command parameter target

Example: Rm-rf-file

650) this.width=650; "src=" http://img.blog.csdn.net/20170330105255669 "alt=" 20170330105255669 "/>

CTRL +c # #撤销命名的执行
Command parameters
-Parameter # #单词缩写
--Parameter # #单词的全拼


5. Help with Commands
Whatis Command # #查看命令的功能
Command--help # #查看命令的帮助
[] # #选择加入的内容, can be added without
... # #加入的内容个数任意
<> # #内容在命令执行过程当中必须要加

650) this.width=650; "src=" http://img.blog.csdn.net/20170330105407992 "alt=" 20170330105407992 "/>



6. Basic methods of using the system

1) System Login

Graphical login mode: Mouse click user input password into the system

Text login mode: Gnome-session-quit--force (exiting the current system)


2) Working interface conversion

Ctrl+alt+ on the arrow keys (under the direction key)


3) Start bash

right mouse button select Open in Terminal

Applications>utilities>terminal

Gnome-terminal
Ctrl+shift+n # #在新窗口中打开shell
Ctrl+shift+t # #同一个窗口中打开新的tab
Exit: Exit | Ctrl+d


4) system shutdown, restart

Restart
Reboot immediate Restart

Init 6 Restart

Shutdown-r now set the world to restart
Shutdown
Poweroff immediately shut down the machine

Init 0 shutdown

Shutdown-h now set time off


5) Lock Screen

CTRL + Alt +l Rhel 7.0

Win + L Rhel 7.2


Simple system commands

1) Date

Watch-n-1 Date let the command execute once per second

650) this.width=650; "src=" http://img.blog.csdn.net/20170330110800129 "alt=" 20170330110800129 "/>


Date 03301110 sets the time to March 30 11:10

650) this.width=650; "src=" http://img.blog.csdn.net/20170330111020646 "alt=" 20170330111020646 "/>


date-d +xday-xday view x days ago or X Diva time


650) this.width=650; "src=" http://img.blog.csdn.net/20170330111238225 "alt=" 20170330111238225 "/>

+%.... Set the output format for date date--help to learn more about

650) this.width=650; "src=" http://img.blog.csdn.net/20170330111423865 "alt=" 20170330111423865 "/>


2) passwd

passwd Modifying user passwords

A.root Users

Change root password

[Email protected] ~]# passwd root
Changing password for user root.
New Password:
Bad password:the PASSWORD fails the dictionary check-it is too simplistic/systematic
Retype new Password:
Passwd:all authentication tokens updated successfully.

650) this.width=650; "src=" http://img.blog.csdn.net/20170330111730243 "alt=" 20170330111730243 "/>

Modify a normal user

[Email protected] ~]# passwd student
Changing password for user student.
New Password:
Bad Password:the PASSWORD is shorter than 8 characters
Retype new Password:
Passwd:all authentication tokens updated successfully.

650) this.width=650; "src=" http://img.blog.csdn.net/20170330111925666 "alt=" 20170330111925666 "/>


B. Normal user Password change

Normal user cannot modify root user password

[Email protected] ~]$ passwd
Changing password for user student.
changing password for student.
(current) UNIX Password: Enter the current password
New Password: Enter password
Bad Password:the PASSWORD is shorter than 7 characters password must be greater than 7 characters
New Password: Re-enter password
Bad password:the PASSWORD fails the dictionary check-it is too simplistic/systematic
New Password: Re-enter password
Retype new password: Enter once
Passwd:all authentication tokens updated successfully. Success

650) this.width=650; "src=" http://img.blog.csdn.net/20170330115840887 "alt=" 20170330115840887 "/>

passwd parameter User name
-S student # #用户密码信息
--status Student
-L Student # #锁定帐号
-U student # #解锁
-N 1 Student # #设定密码最短有效期
-X Student # #设定密码最长有效期
-W 3 Student # #警告期
-I 2 student # #设定用户非活跃天数
-D Student # #清除用户密码
Monitoring passwd Password Information
Watch-n 1 passwd-s Student


[[email protected] ~]# passwd-s student
Student PS 2017-03-30 0 99999 7-1 (Password set, SHA512 crypt.)
[[email protected] ~]# passwd-l student
Locking password for user student.
Passwd:success
[[email protected] ~]# passwd-u student
Unlocking password for user student.
Passwd:success
[[email protected] ~]# passwd-n 1 student
Adjusting aging data for user student.
Passwd:success
[[email protected] ~]# passwd-n 999 student
Adjusting aging data for user student.
Passwd:success
[[email protected] ~]# passwd-w student
Adjusting aging data for user student.
Passwd:success
[[email protected] ~]# passwd-i 2 student
Adjusting aging data for user student.
Passwd:success
[[email protected] ~]# passwd-d student
Removing password for user student.
Passwd:success

650) this.width=650; "src=" http://img.blog.csdn.net/20170330120407297 "alt=" 20170330120407297 "/>


3) file

File file name view files type

650) this.width=650; "src=" http://img.blog.csdn.net/20170330120105451 "alt=" 20170330120105451 "/>


4) Viewing of files

Cat filename # #显示文件的全部内容
Less file # #分页浏览, press "Q" to exit
Head FileName # #显示一个文件的前几行
Head-n 5 FileName # #前五行
Tail filename # #显示文件后几行
Tail-n 5 FileName # #显示一个文件的后5行

650) this.width=650; "src=" http://img.blog.csdn.net/20170330120903661 "alt=" 20170330120903661 "/>650" this.width =650, "src=" http://img.blog.csdn.net/20170330120927317 "alt=" 20170330120927317 "/>650" this.width=650; "src=" http://img.blog.csdn.net/20170330120936768 "alt=" 20170330120936768 "/>650" this.width=650; "src=" http:// img.blog.csdn.net/20170330120943115 "alt=" 20170330120943115 "/>650" this.width=650; "src=" http:// img.blog.csdn.net/20170330120949268 "alt=" 20170330120949268 "/>650" this.width=650; "src=" http:// img.blog.csdn.net/20170330120954549 "alt=" 20170330120954549 "/>


5) WC Statistics file capacity information

Wc-l Number of rows
-W Words
-C byte number
-M character Count

650) this.width=650; "src=" http://img.blog.csdn.net/20170330121202112 "alt=" 20170330121202112 "/>


6) History

History # #显示历史
HOSTORY-C # #清除当前环境当中的历史命令
! Number # #执行第多少行命令
! Letter # #执行最近一条以这个字母开头的命令
CTRL +r + keywords # #执行最近一条含有这个关键字的命令
Down Key # #逐行调用命令

650) this.width=650; "src=" http://img.blog.csdn.net/20170330121618005 "alt=" 20170330121618005 "/>650" this.width =650, "src=" http://img.blog.csdn.net/20170330121624764 "alt=" 20170330121624764 "/>650" this.width=650; "src=" http://img.blog.csdn.net/20170330121630952 "alt=" 20170330121630952 "/>

7) Linux shortcut keys

Around # #一个字符一个字符移动
CTRL + Around # #一个字一个字移动
CTRL + A # #光标移动到行首
+ E # #光标移动到行尾
+ U # #光标所在位置删除到行首
+ k # #光标所在位置删除到行尾
+ r+ keyword # #调出最近一条含有关键字的命令
+ C # #撤销以输入的命令
+ D # #关闭当前环境
+ L # #清空屏幕
+ SHIFT + C # #复制
+ SHIFT + V # #粘贴
+ SHIFT + t # #在现有shell中重新打开一个table
+ SHIFT + N # #在shell中打开一个新的shell
+ SHIFT + Pageup|pagedown # #切换table
+ ALT + L # # Lock Screen
+ ALT + top | down # #切换工作界面
+ ALT + F1|f7 # #进入图形界面
+ ALT + F2-f6 # #进入虚拟控制台

LINUX Redhat First Unit document

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.