zoukankan      html  css  js  c++  java
  • Ubuntu的shell执行过程

    登录shell(login shell)会执行.bash_profile,.bash_profile中会执行.profile,.profile中会执行.bashrc

    非登录shell(non-login shell)会执行.bashrc

    An interactive login shell is started after a successful login, using /bin/login, by reading the /etc/passwd file. This shell invocation normally reads /etc/profile and its private equivalent ~/.bash_profile upon startup.
    An interactive non-login shell is normally started at the command-line using a shell program (e.g., [prompt]$/bin/bash) or by the /bin/su command. An interactive non-login shell is also started with a terminal program such as xterm or konsole from within a graphical environment. This type of shell invocation normally copies the parent environment and then reads the user's ~/.bashrc file for additional startup configuration instructions.
    A non-interactive shell is usually present when a shell script is running. It is non-interactive because it is processing a script and not waiting for user input between commands. For these shell invocations, only the environment inherited from the parent shell is used.
    The file ~/.bash_logout is not used for an invocation of the shell. It is read and executed when a user exits from an interactive login shell.

  • 相关阅读:
    POJ1785 Binary Search Heap Construction
    Bzoj1185 [HNOI2007]最小矩形覆盖
    POJ2409 Let it Bead
    Bzoj2732 [HNOI2012]射箭
    Bzoj4515 [Sdoi2016]游戏
    Bzoj3925 [Zjoi2015]地震后的幻想乡
    Bzoj3223 Tyvj 1729 文艺平衡树
    COGS2642 / Bzoj4590 [Shoi2015]自动刷题机
    Bzoj1313 [HAOI2008]下落的圆盘
    python——描述符
  • 原文地址:https://www.cnblogs.com/netbuddy/p/3505655.html
Copyright © 2011-2022 走看看