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
  • 相关阅读:
    Enterprise Library 2.0 Hands On Lab 翻译(9):缓存应用程序块(一)
    Enterprise Library 2.0 Hands On Lab 翻译(5):日志应用程序块(二)
    提供多单词建议的自定义AutoCompleteExtender
    什么是 axios
    Consul是一个分布式高可用的系统
    全栈开发工程师
    XPath路径表达式
    9 个带你阅读源码的开源项目
    前端跨域解决方案
    [WCFDiscovery]让服务自动发送上/下线通知[原理篇]
  • 原文地址:https://www.cnblogs.com/Patt/p/6007361.html
Copyright © 2011-2022 走看看