The basic start using this system focuses on commonly used linux commands
First, the computer performance:
To minimize interaction with the computer: 2, reason to learn commands
3. Start System
4, the basic format of Linux commands
Command [options] [parameters]
[]: Representatives brackets, optional; specify achieve a particular function commands;
<>: Object code of the command; if not added <> stands can not be omitted;
Short options can be combined, and the whole long list of options can not be combined
5. File System
Storage facilities must be installed file system; format operation in the Installable File System
Common file system format under Windows: NTFS, FAT32
File system formats: ext4
Figure 6. File Properties
7. hard links and soft-wired differences
Soft link: ln -s source file destination; you can cross-file system; you can create a soft link to a file that does not exist
a hard link: ln source destination file; you can not create hard links for different file system; not on file does not exist create a hard link
8, the use of basic commands common linux
Pwd: Display the current path; $ PWD have a default environment variable
9.Chkconfig role:
When the specified service start-up or shut down at which level
Windows in :
-h / - help: Help View
--list: whether to start on seven levels
--level 345 name <on / off>: change the on / off
Ubuntu里:
You can use Chkconfig, but you need to install
update -rc.d: control certain program startup in ubuntu
-f force: force the
10. Other:
(1) echo $ PATH (environment variable)
Variable: some are named memory space, divided into global and local variables
env: See all environment variables
(2) If the command is not in the PATH, how to solve?
. A to an absolute location of the command; or \ LS run directly backslash
. B was added to this path PATH path to PATH = $ PATH: / xxxx / xxx
注:绝对路径执行的是命令本身,而有些命令是系统默认别名(可自己添加)
-alias:搜索命令别名
which command:查找命令的绝对路径
11.扩展:
1、默认情况下不适用rm删除目录 ;rmdir只能删除空目录;
2、我们将需要删除文件或目录移动到 /tmp 目录下即可;/tmp 目录为临时文件目录,30天未被访问的文件会自动删除
3、如果必须删除一些文件,我们通过find匹配出来后,再行删除;
12.find扩展:
find / -name abc | xargs rm
find / -name abc -exec rm {}\;