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

Use the export command of linux for system setup

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

Share

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

In this article, let's take a look at system setup using linux's export command. There is a certain reference value, friends in need can refer to, hope to help you.

The export command is used to output shell variables as environment variables, or to export shell functions as environment variables.

When a variable is created, it is not automatically known to the shell process created after it. The command export can pass the value of the variable to the following shell. When a shell script invokes and executes a line, it does not automatically gain access to variables that were originally defined in the script (caller) unless those variables have been explicitly set to available. The export command can be used to pass the values of one or more variables to any subsequent script.

Syntax format: export [parameters]

Common parameters:

-f represents [variable name] to delete the specified variable for the function name-n. Variables are not actually deleted, but will not be output to the execution environment of subsequent instructions-p lists all the environment variables assigned to the program by shell

Reference example

List all current environment variables:

[root@linuxcool] # export-p

Define environment variables:

[root@linuxcool ~] # export MYENV

Define environment variable assignments:

The above [root@linuxcool ~] # export MYENV=7 is a brief introduction to system settings using linux's export command. Of course, you have to use the above differences in detail before you understand it. If you want to know more, welcome to follow the industry information channel!

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