原文:Redhat Linux /etc/profile 與 /etc/bashrc 的區別

最近學習RHCE,在umask這里,書里說要修改 etc profile和 etc bashrc兩個文件,卻沒有說明這兩個區別。於是在上網查看之后倒是明白了各是怎么用的。 etc profile是對應登錄的, etc bashrc是對應打開shell的。但是實際使用區別在哪,如果說bashrc是對應shell的,那么改這一個文件不就行了 最后自己實踐一下,發現還是不同的,特此分享一下,也做個記錄。 ...

2014-10-08 14:34 0 2133 推薦指數:

查看詳情

Linux 中 ~/.bashrc、/etc/profileetc/bashrc區別

/etc/profile 其實看名字就能了解大概了, profile 是某個用戶唯一的用來設置環境變量的地方, 因為用戶可以有多個 shell 比如 bash, sh, zsh 之類的, 但像環境變量這種其實只需要在統一的一個地方初始化就可以了, 而這就是 profile. 當用戶第一次登錄時 ...

Fri Dec 25 03:15:00 CST 2020 0 381
~/.bashrc與/etc/profile區別

~/.bashrc:該文件包含專用於某個用戶的bash shell的bash信息,當該用戶登錄時以及每次打開新的shell時,該文件被讀取. /etc/profile中設定的變量(全局)的可以作用於任何用戶,而~/.bashrc等中設定的變量(局部)只能繼承/etc/profile中的變量 ...

Sun Apr 07 22:49:00 CST 2019 0 928
Linux環境變量設置/etc/profile、/etc/bashrc、~/.profile、~/.bashrc區別

登入系統讀取步驟: 當登入系統時候獲得一個shell進程時,其讀取環境設定檔有三步 : 1.首先讀入的是全局環境變量設定檔/etc/profile,然后根據其內容讀取額外的設定的文檔,如 /etc/profile.d和/etc/inputrc 2.然后根據不同使用者帳號 ...

Thu Sep 27 08:15:00 CST 2018 0 793
linux 下/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件的區別

/etc/profile:此文件為系統的每個用戶設置環境信息,當用戶第一次登錄時,該文件被執行. 並從/etc/profile.d目錄的配置文件中搜集shell的設置. /etc/bashrc:為每一個運行bash shell的用戶執行此文件.當bash shell被打開時,該文件被讀取 ...

Sat May 04 01:29:00 CST 2019 0 586
Linux知識:/root/.bashrc與/etc/profile的異同

Linux知識:/root/.bashrc與/etc/profile的異同 要搞清bashrcprofile區別,首先要弄明白什么是交互式shell和非交互式shell,什么是login shell 和non-login shell。 交互式模式就是shell等待你的輸入,並且執行你提交 ...

Thu Jul 21 03:28:00 CST 2016 0 2509
linux命令(56):環境變量:/etc/profile、/etc/bashrc 、~/.profile、~/.bashrc

添加環境變量:https://www.cnblogs.com/lovychen/p/5583703.html 一、環境變量介紹: 在Linux系統中,環境變量按照其作用范圍不同大致可以分為系統級環境變量和用戶級環境變量。 系統級環境變量:每一個登錄到系統的用戶都能夠讀取到系統級的環境變量 ...

Thu May 23 22:31:00 CST 2019 0 2841
/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件的作用

轉載自:http://blog.csdn.net/u013968345/article/details/21262033 /etc/profile:此文件為系統的每個用戶設置環境信息,當用戶第一次登錄時,該文件被執行. 並從/etc/profile.d目錄的配置文件中搜集shell的設置 ...

Wed Jan 10 21:36:00 CST 2018 0 3677
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM