[关闭]
@zhongjianxin 2017-07-25T11:17:38.000000Z 字数 4710 阅读 1079

Command Training

Trainning


Commands

1 Getting Started with the Console

1.1 Running Commands

1.2 Moving Around the Filesystem

Further Reading

The Unix home directory

1.3 Reading Files

1.4 Editing Files

Advanced Editors

1.5 Moving and Deleting Files

1.6 If You Have Any Questions

2 Users and Permissions

2.1 Creating Users

2.2 File Permissions

rwx notation

In ls -l, each file has a 10 character permission representation such as drwxrwxrwx. Each character represents a permission on the file. If the letter is replaced with a dash (-), it indicates the permission is not granted. For example -rwxr-xr-x.

The first character denotes if it is a dirctory. d means directory, -, means not a directory.

The next 9 characters can be grouped into triplets of rwx. The leftmost triplet is for the owner of the file, the middle is the group owner, and the right is permissions for others. rwx stand for the read, write, and execute permissions, respectively.

Octal notation

You may read or set permissions using a 3 digit octal number. The digits represent the owner, group, and other permissions, from left to right. Each digit may be 0 through 7 representing the different combinations of read, write, and execute.

To compute what each digit means, use this formula.

read/r = 4

write/w = 2

execute/x = 1

For each permission you want to grant, sum their corresponding values.

2.3 File Ownership

chown -- change the owner of a file or directory.

2.4 Sudo

3 Processes

3.1 Processes

Find a process by name

Use the following command to search for a running process using a pattern.

  1. ps aux | grep "SEARCH PATTERN"

3.2 Pausing and Resuming

Key Sequences

Commands

3.3 Killing Processes

Signals

4 Environment and Redirection

4.1 Environment Variables

4.2 Find and Grep

4.3 Pipes and Redirection

5 Installing Software

5.1 Building Software From Source

5.2 Introduction to Package Managers

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注