This is my Linux learning note, and hopefully it will help you to see this series of articles.
The most common window we face in Linux is the Shell window, so learning Linux should be learned from the shell command.
1. Line prompt
We can see this line before each line of the shell command for Linux:
[Email protected] desktop]#
What are they, respectively? Let's get to know each other.
Root: Indicates the user who opened the shell, and here I am running as a super user.
@: Delimiter
localhost: Host name
Desktop: Working directory Name
#: Identity prompt, #表示超级用户, $ for normal users
Next we'll look at how to switch users
2. Switch users
[Email protected] desktop]# Su-username
Note that there are spaces before and after the SU
* Advanced users switch to low-level users do not require a password, low-level users switch to advanced users require a password
After switching users, enter exit to exit the current login and return to the previous user
3. Execution and help of commands
(1). Commands can only be executed after the prompt is entered
(2). command format
Command parameter target
(3). Execution of the Undo command: Ctrl + C
(4). Parameters
-Parameters: Word abbreviation
--Parameters: full spelling of words
Help:
(1). Whatis Command # #查看命令的功能
(2). Command--help # #查看命令的帮助
(3). The content in the help [] is opt-in and can be added without
... Add any number of content
<> what you have to add
4. Basic use of the system
(1). System Login
Graphical login mode (press Ctrl+alt+f (2-6) in the graphical interface to switch to the text login screen)
Text login mode (press Ctrl+alt+f (1|7) in the text interface to switch to the graphical login screen)
(2). Work Interface Conversion
Linux provides us with four working interfaces that we can switch on by ctrl+alt+ |
(3). Open the Shell
1,application>utilities>terminal
2, right mouse button------>open in terminal
3,gnome-terminal
(4). Exit the Shell
Exit|ctrl+d
(5). System Shutdown, restart
Restart
Reboot | Init 6 | Shutdown-r now
Shutdown
Poweroff | Init 0 | Shutdown-h now
(6). Lock screen
CTRL + ALT + L
5. Simple system commands
(1). Date
Watch-n 1 Date # #让date命令每秒执行一次, exit with CTRL + C
Date 11223344 # #把系统时间设定为11月22日33点44分的格式 (every hour of the month)
Date 112233442016.55 # #2016表示年 (can not be added). 55 = seconds (can not be added)
Date-d +xdays | -xdays # #查看x天前或x天后的时间
(2) passwd
passwd 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 fails the dictionary check-it is too simplistic/systematic # #密码必须是无序数字
+ Letters
New Password:
Bad Password:the PASSWORD is shorter than 8 characters # #密码必须 >8 bit
passwd parameter User name
-S # #用户密码信息
--status ...
-L # #锁定帐号
-U # #解锁
-N # #设定密码最短有效期
-X # #设定密码最长有效期
-W # #警告期
-I # #设定用户非活跃天数
-D # #清除用户密码
Monitoring passwd Password Information
Watch-n 1 passwd-s Student
(3) file
File File name # #查看文件类型
(4) Viewing of files
Cat # #查看文件的全部内容
Head # #显示一个文件的前10行
Head-n x # #显示一个文件的前x行
Tail # #显示一个文件的后10行
Tail-n x # #显示一个文件的后x行
(5) WC statistics file capacity information
Wc-l Number of rows
-W Words
-C byte number
-M character Count
6. Automatic completion of commands
We often see some experts in the command when the hand explosion, in fact, it is not only because they are skilled, more importantly, they will be reasonable use of automatic completion function, that is, the TAB key
TAB Auto-Complete
A + double-click tab to display all commands in the system beginning with a
7.history History Call
History # #显示历史
HISTORY-C # #清空历史记录
! Number # #执行第多少条历史命令
! Letter # #执行最近一条以这个字母开头的命令
ctrl-+ R + keywords # #执行最近一条含有这个关键字的命令
Down Key # #逐行调用
Shortcut keys in 8.linux
CTRL + around key # #一个单词一个单词的移动
+ A # #光标移动到行首
+ E # #光标移动到行尾
+ U # #光标所在位置删除到行首
+ k # #光标所在位置删除到行尾
+ R + Keywords # #调出最近一条含有关键字的命令
+ D # #关闭当前环境
+ SHIFT + t # #在现有shell中重新打开一个table
+ SHIFT + PGUP|PGDN # #切换table
+ ALT + L # #锁屏
+ ALT + top | down # #切换工作界面
Basic Linux Learning (i)