持续更新
从前使用
sudo apt update
更新时, 发现软件源是cn.archive.ubuntu.com. 最近在system setting 中将软件源改成了archive.ubuntu.com, 发现速度较慢, 却不知道怎么将源改回来. 原来cn.archive.ubuntu.com是阿里巴巴开源镜像站 (Alibaba Open Source Mirror Site, Ali-OSM). 设置方法详见这里.-
Quoted from Getting Started with Ubuntu 16.04
The terminal is a powerful and invaluable tool that can be used to perform many useful tasks you might not be able to accomplish with a GUI. For example.
- Troubleshooting any difficulties that may arise when using Ubuntu sometimes requires you to use the terminal.
- A command-line interface is sometimes a faster way to accomplish a task. For example, it is often easier to perform operations on many files concurrently using the terminal.
- Learning the command-line interface is the first step towards more advanced troubleshooting, system administration, and software development skills. If you are interested in becoming a developer or an advanced Ubuntu user, knowledge of the command-line is essential.
Any time you add storage media to your computer, it needs to be mounted before it is accessible. Mounting a device means to associate a directory name with the device, allowing you to navigate to the directory to access the device's files.
-
Understanding & Using File Permissions
In Linux and Unix, everything is a file. Directories are files, files are files and devices are files. Devices are usually referred to as a node; however, they are still files. All of the files on a system have permissions that allow or prevent others from viewing, modifying or executing. If the file is of type Directory then it restricts different actions than files and device nodes. The super user "root" has the ability to access any file on the system. Each file has access restrictions with permissions, user restrictions with owner/group association. Permissions are referred to as bits.
To change or edit files that are owned by root, sudo must be used.To learn more about modifying permissions, visit https://help.ubuntu.com/community/FilePermissions.
Recursive chmod using find, pinemill, and sudo
To assign reasonably secure permissions to files and folders/directories, it's common to give files a permission of 644, and directories a 755 permission, sincechmod -R
assigns to both. Use sudo, the find command, and a pipemill to chmod as in the following examples.
To change permission of only files under a specified directory.$ sudo find /path/to/someDirectory -type f -print0 | xargs -0 sudo chmod 644
To change permission of only directories under a specified directory (including that directory):$ sudo find /path/to/someDirectory -type d -print0 | xargs -0 sudo chmod 755