1. Several important shortcut keys-tips
TAB key quick Fill command, table of contents, parameters
使用Tab键来进行命令补全,Tab键一般是在字母Q旁边,这个技巧给你带来的最大的好处就是当你忘记某个命令的全称时可以只输入它的开头的一部分,然后按下Tab键就可以得到提示或者帮助完成。
CTRL + C Force quit
这时候你就可以使用Ctrl+c键来强行终止当前程序(你可以放心它并不会使终端退出)。
Some other common shortcut keys
按键作用Ctrl+d键盘输入结束或退出终端Ctrl+s暂停当前程序,暂停后按下任意键恢复运行Ctrl+z将当前程序放到后台运行,恢复到前台为命令fgCtrl+a将光标移至输入行头,相当于Home键Ctrl+e将光标移至输入行末,相当于End键Ctrl+k删除从光标所在位置到行末Alt+Backspace向前删除一个单词Shift+PgUp将终端显示向上滚动Shift+PgDn将终端显示向下滚动
Use man to get help on the command line
man sudoman help
2. User Management
View Account
$ wholv tty7 2017-04-25 09:37 (:0)显示用户名-真实终端-启动时间
Create user
sudo <cmd>.可以以特权级别运行cmd命令,需要当前用户属于sudo组,且需要输入当前用户的密码su <user>可以切换到用户 user,执行时需要输入目标用户的密码
About the file type, here's one thing you must always keep in mind that Linux is all files, because this is the device files ( /dev directory has a variety of device files, mostly with specific hardware equipment related) This said. socket: Network sockets, what is the specific, interested users can learn or look forward to the experiment building follow-up related courses. pipepipeline, this thing is very important, we will discuss later, here you first know that there is the existence of it. 软链接文件: The link file is divided into two kinds, the other is of course "hard link" (hard links are not commonly used, the specific content is not the focus of the course discussion, and soft link is equivalent to the shortcut on Windows, you remember this is enough).
Read permission, indicating that you can use cat <file name> such commands to read the contents of a file, write permission, that you can edit and modify a file;
Execute permissions, usually referred to as binaries or script files that can be run, as files that are suffixes on Windows exe , but Linux does not differentiate file types by file suffix names. One thing you should be aware of is that a directory has both read and Execute permissions to open and view internal files, and a directory with write permission to allow other files to be created, because the catalog file actually holds information such as a list of files in that directory.
Owner permissions, which you should understand, as to the user group permissions, refers to all other users in your user group to the file permissions, for example, you have a pobman, then this user group permissions determine whether your siblings have the authority to use it to destroy it and take possession of it.
The number of file names linked to the Inode node where the file is located (for the concept of Linux file system related concepts, not in the scope of this course, interested users can understand themselves).
With the Inode node size as the size of the file, you can give LS plus -lh parameters to see the size of the file more visually.
Modify file Permissions
If you have a file that you do not want to be read, written, or executed by another user, then you need to modify the permissions of the file, there are two ways:
- mode 1:2 binary digit representation
Three sets of permissions for each file (owner, owning user group, other user, remember this order is certain) corresponds to a "rwx", that is, a "7", so if I want to change the file "Iphone6" permission to only I can use it then:
chmod iphone6 Set permissions in turn: Owner, user group, other users
Linux file permissions