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
  • 相关阅读:
    3、excel—如何把相同年月日的中相同的数据相加
    Linux_plsql通过跳板的ssh隧道访问oracle1521(转)
    微信小程序-歌词滚动实现
    微信小程序-RSA 加解密
    如何给开源仓库贡献代码
    linux开发调试常用命令-gdb
    vector 内存分配和释放
    Ubuntu上SmartGit三十天试用到期解决办法
    Django-325版本创建时候需要手动设置的内容
    Django 博客园练习--待完成
  • 原文地址:https://www.cnblogs.com/Patt/p/6007361.html
Copyright © 2011-2022 走看看