After using the terminal ssh to log in to the console of LinuxOS
, a prompt symbol (for example: # or ~) will appear. After this prompt symbol, you can enter the command. Linux will do according to the input command. In response, this series of actions is handled by a so-called shell.
Shell is a program, the most commonly used is Bash, which is the shell that the login system will use by default.
bashrc and profile are the shell startup settings file (in fact, these two files are also shell scripts), you can initialize the environment variables for the current shell, etc., they are similar to Microsoft DOS/Windows
The autoexec.bat file.
The following is a detailed description of the uses and differences between bashrc and profile:
for individual users
.bashrc
# ~/.bashrc: executed by bash(1) for Non-login shells.
.profile
# ~/.profile: executed by Bourne-compatible login shells.
For all users
/etc/bash.bashrc# System-wide .bashrc file for Interactive bash(1) shells./etc/profile# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)
bashrc and profile differences
from above The description shows that the difference between bashrc and profile is:
1. bashrc will run automatically after the system is started.
2. The profile will not run until the user logs in.
3. After setting, you can use the source bashrc command to update bashrc, or use the source profile command to update the profile.
PS: Usually we modify bashrc, some Linux distributions do not necessarily have a profile. File
4. Variables set in /etc/profile (global) can be applied to any user, and variables set in ~/.bashrc etc. (local) can only be inherited in /etc/profile of Quantity, they are & rdquo; father and son & rdquo; relationship.
Additional introduction
In addition, you need to add a few notes about bashrc related documents:
~/.bash_profile: This file can be used by the user to enter the shell information that is used exclusively by the user. When the user logs in, the file is only executed once! By default, he sets some environment variables and executes the user's .bashrc file.
~/.bash_logout: Execute the file each time you quit the system (exit the bash shell).
~/.bash_profile is interactive, login mode enters bash, ~/.bashrc is interactive non -login mode enters the bash run, usually the two settings are roughly the same, so usually the former will call the latter
The original use of Tomcat in Linux does not use the newly created user created by the non-ROOT perm
First install CentOS6 to install rp-pppoe this software, the previous version of centos is installed
How do I use a USB-based storage device in a Linux environment? This
The configuration steps of Telnet service are as follows: First, install telnet package (usually tw
Explain the silent installation of Oracle under Linux
Linux system (Debian and Ubuntu) completely remove wine
Use of svn command under linux
Anti-spam technology widely used in Linux
Linux disk management: df, du, fdisk, mkfs, fsck
The basic task of the crontab setting under Linux
LINUX file or directory permissions batch modification skills
Exclude ADSL dialup failure under Linux
The operating system's ally: Linux will dominate the rivers and lakes
Deep analysis of Windows 7 device driver management principles
Linux common problems and errors Chinese analysis
How does Win10 stop running services to reduce the occupation of hardware resources?
How does Win8 system use the bearer network to share wireless to realize mobile Internet access
How does Win8 automatically adjust the volume of other sounds
Win8 system replacement folder icon tips
Release Win8.1 WinSxS Redundancy Update
Win7 can't start Windows Security Center. How to do
Have you tried it? Win8 you may not know several new ways to play (3)