zoukankan      html  css  js  c++  java
  • shell 登录 .bash_profile

    shell登录两种方式

       交互式登录:

                      1,直接通过终端输入账号密码登录

                      2,使用 "su - UserName"   切换的用户

           执行顺序:/etc/profile  -->   /etc/profile.d/*.sh   -->   ~/.bash_profile  -->  ~/.bashrc -->   /etc/bashrc

      非交互式登录:

                      1 su   UserName

                      2 图形界面下打开的终端

                      3 执行脚本

                      4 任何其他的bash实例

            执行顺序:   ~/.bashrc  -->  /etc/bashrc  -->  /etc/profile.d/*.sh

      Profile 类

            按功能划分,两类

                       profile类和bashrc类

            profile类:为交互式登录的shell提供配置

                      全局:/etc/profile ,/etc/profile.d/*.sh

                      个人:~/.bash_profile

                      功能:

                               1 用于定义环境变量

                               2 运行命令或脚本

              分工 :.bash_profile 一般放环境变量和启动程序   。建议

                         .bashrc    一般放别名和函数

  • 相关阅读:
    卿学姐与魔法(优先队列)
    H国的身份证号码(搜索)
    钓鱼(贪心,优先队列)
    Communication System(动态规划)
    最长连续01字符串
    魔法跳舞链 (最小生成树)
    括号匹配(线段树)
    bzoj 1042: [HAOI2008]硬币购物
    bzoj 1057: [ZJOI2007]棋盘制作
    bzoj 1452: [JSOI2009]Count
  • 原文地址:https://www.cnblogs.com/liang-1/p/8856938.html
Copyright © 2011-2022 走看看