![Forrest logo](/images/logo.png)
export:tldr:3a4ff
export: Remove an environment variable.
$ export -n ${VARIABLE}
try on your machine
The command "export -n ${VARIABLE}" is used to unset or remove the value of an environment variable in a Unix-like operating system shell.
Here's an explanation of each part of the command:
- "export" is a built-in command in most shell environments that is used to set or export environment variables. It makes a variable available to be accessed by other programs or scripts running in the same shell session.
- "-n" is an option or flag for the export command. In this case, it specifies that the variable should be unset or removed.
- "${VARIABLE}" is the name of the environment variable to be unset. "${VARIABLE}" is the syntax for accessing the value of a variable, where "VARIABLE" is the actual name of the variable.
When you execute this command, it removes the value of the specified environment variable, effectively unsetting it. This means that any program or script running in the same shell session won't have access to the value of that variable.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.