Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

System and user environment variable profiles

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

/ etc/profile: this file presets several important variables, such as PATH, USER, LOGNAME, MAIL, INPUTRC, HOSTNAME, HISTSIZE, umask, and so on.

/ etc/bashrc: this file mainly presets umask and PS1. This PSI is the previous string of characters when we type the command. For example, the default PSI for CentOS root users is [root@GeorgeLinux ~] #. Take a look at the value of PS1:

\ u is the user,\ h hostname,\ W is the current directory,\ $is the "#", and if it is an ordinary user, it is displayed as "$".

In addition to these two system-level configuration files, there are several such hidden files in each user's home directory:

.bash _ profile: the file name that defines the user's personalization path and environment variables. Each user can use this file to enter shell information dedicated to their own use, and the file is executed only once when the user logs in.

.bashrc: this file contains bash information specific to your shell, which is read when you log in and every time you open a new shell. For example, nikeyi8 writes user-defined alias or custom variables to this file.

.bash _ history: used to record the history of commands.

.bash _ logout: this file is executed when you exit shell. You can put some clean-up work in this file.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report