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

How to configure etc/profile environment variables

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces "how to configure etc/profile environment variables". In daily operation, I believe many people have doubts about how to configure etc/profile environment variables. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to configure etc/profile environment variables". Next, please follow the editor to study!

Files related to environment variables may also have / etc/bashrc, etc., but this is the shell variable, which is local and works for specific shellers. / etc/profile is global and applies to all shell.

The profile file tells shell what language to use, what shell to use, the search path for the command, and so on.

Some standard environment variables:

SHELL default shell

LANG default language

PATH linux looks for the default path of a command, which generally includes / bin,/usr/bin,/sbin,/usr/sbin

/ usr/X11R6/bin,/opt/bin,/usr/local/bin, etc. Users can add their own.

Such as / home/bin, etc.

Default path to the MANPATH man manual

INPUTRC default keyboard image, see / etc/inputrc for details

The environment variable of BASH_ENV bash shell, usually in ~ / .bashrc

The console applicable to the DISPLAY X window, and the DISPLAY=:0 corresponds to the console F7, which corresponds to the control.

The platform F8 sends GUI application programs to the remote computer.

The default terminal in COLORTERM GUI, usually gnome-terminal.

USER automatically sets the user name of the currently logged-in user.

LONGNAME is usually set to $USER

MAIL sets the standard mail directory for a specific $USR

Command output with HOSTNAME set to / bin/hostname

HISTSIZE is set to the number of commands remembered by the history command

Example:

#

# / etc/profile

#

# modify or add PATH to customize the search path of the command. If you do not want to add the executable file to the default directory, you can use it in the terminal.

# Ling, then change it.

Export PATH= "/ bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/usr/local/bin"

Export MANPATH= "/ usr/man:/usr/X11R6/man"

Export LESSCHARSET= "latin1"

Export INPUTRC= "/ etc/inputrc"

Export LESS= "- R"

# Locale settings (find your locale with 'locale-a')

Export LANG= "zh_CN" # modify here to change the default language of the system

Export LC_COLLATE= "C"

Export COLUMNS LINES

Export PS1=' [\ u@\ h\ W]\ $'

Export PS2=' >'

Umask 022

……

……

# End of file

At this point, the study on "how to configure etc/profile environment variables" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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

Servers

Wechat

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

12
Report