zoukankan      html  css  js  c++  java
  • Ubuntu 使用笔记

    持续更新

    1. 从前使用sudo apt update更新时, 发现软件源是cn.archive.ubuntu.com. 最近在system setting 中将软件源改成了archive.ubuntu.com, 发现速度较慢, 却不知道怎么将源改回来. 原来cn.archive.ubuntu.com是阿里巴巴开源镜像站 (Alibaba Open Source Mirror Site, Ali-OSM). 设置方法详见这里.

    2. 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.
    1. 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.

    2. 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**](https://help.ubuntu.com/community/FilePermissions).
    
    1. 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, since chmod -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
  • 相关阅读:
    Otter详解
    为什么要使用Netty
    haproxy实现mysql集群负载均衡
    Mysql主从复制
    java编程思想读书笔记三(HashMap详解)
    代码界的石器时代
    补码的产生与应用
    java编程思想读书笔记二(对象的创建)
    java编程思想读书笔记一(面向对象)
    Apache VFS
  • 原文地址:https://www.cnblogs.com/Patt/p/6007361.html
Copyright © 2011-2022 走看看