zoukankan      html  css  js  c++  java
  • Linux system environment All In One

    Linux system environment All In One

    1. 临时环境变量,动态写入
    2. 永久环境变量,配置文件
    3. 预定义变量
    4. 位置参数

    # 所有用户公用的环境变量
    /etc/
    
    
    # 仅对当前用户生效的环境变量
    ~/
    
    

    . (点 + 空格)等价于 source

    $ . 配置文件
    
    # . 等价于 source
    $ source 配置文件
    
    

    /etc/profile

    $ cat /etc/profile
    $ vim /etc/profile
    
    # System-wide .profile for sh(1)
    
    if [ -x /usr/libexec/path_helper ]; then
    	eval `/usr/libexec/path_helper -s`
    fi
    
    if [ "${BASH-no}" != "no" ]; then
    	[ -r /etc/bashrc ] && . /etc/bashrc
    fi
    
    

    umask

    $ umask
    
    022
    
    

    权限计算规则

    rwx = 4 + 2 + 1 = 7

    rwxrwxrwx = 777

    字母减 (消掉相同的权限标识符)

    1. 创建的文件(默认不可执行,需要手动 chmod 授权)

    666 减 022 等于 644
    666 - 022 = 644

    rw-rw-rw- 减 ----w--w- 等于 rw-r--r-- 即 644

    1. 创建的文件夹 (可以执行 cd 命令)

    777 减 022 等于 755
    777 - 022 = 755

    rwxrwxrwx 减 ----w--w- 等于 rwxr-xr-x 即 755

    refs

    https://www.imooc.com/video/7002/0



    ©xgqfrms 2012-2020

    www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

    原创文章,版权所有©️xgqfrms, 禁止转载 ️,侵权必究⚠️!


    xgqfrms
  • 相关阅读:
    比较重量(网易笔试题)
    抽象工厂模式
    简单工厂模式
    R语言dai xie
    Hadoop综合大作业
    hive基本操作与应用
    用mapreduce 处理气象数据集
    熟悉常用的HBase操作,编写MapReduce作业
    爬虫大作业
    第三章 熟悉常用的HDFS操作
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/15417930.html
Copyright © 2011-2022 走看看