Delete
Setting
Add New Item
Menu List
Title | Content Type | Order | Action | ||||||
---|---|---|---|---|---|---|---|---|---|
{{kb_content.name}} {{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
{{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
No record |
Environment Variable
You are new to Linux and switch to the Linux Operating System, this is a tutorial for you. This will help you to start your journey in the Linux system because when you perform daily operations in this system, you will not stack on it.
After installing the OS, we need some basic applications to do our daily operation such as browser, zoom, skype. If we are a developer then we need some development tools like Node.Js and NPM, PHP, phpMyAdmin, MySQL, Apache, Tomcat, DBreaver etc. This tutorial will cover all of this.
Important thing is when you enable the installation of those applications, you will learn many things regarding Linux OS.
An environment variable is a variable whose value is set outside the program, typically through functionality built into the operating system or micro-service. An environment variable is made up of a name/value pair, and any number may be created and available for reference at a point in time.
Example of environment variable:
$USER: Gives current user's name.
$PATH: Gives search path for commands.
$PWD: Gives the path of present working directory.
$HOME: Gives path of home directory.
$HOSTNAME: Gives name of the host.
$LANG: Gives the default system language.
$EDITOR: Gives default file editor.
$UID: Gives user ID of current user.
$SHELL: Gives location of current user's shell program.
To Display environment variable:
To see all environment variables:
env
or
printenv
You will find a list of environment variables as below:
SHELL=/bin/bash SESSION_MANAGER=local/saidul-Inspiron-5502:@/tmp/.ICE-unix/3901,unix/saidul-Inspiron-5502:/tmp/.ICE-unix/3901 QT_ACCESSIBILITY=1 COLORTERM=truecolor XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_MENU_PREFIX=gnome- GNOME_DESKTOP_SESSION_ID=this-is-deprecated LC_ADDRESS=bn_BD GNOME_SHELL_SESSION_MODE=ubuntu LC_NAME=bn_BD ................
To Display Value of variable:
Type echo $VARIABLE_NAME as like
echo $PATH
Setting environment variable:
To set a global ENV
export NAME=Value
or
set NAME=Value
Example:
export ORACLE_HOME=/home/oracle/app/oracle/product/19.0.0/client_1
See more about setting environment variable
To set a local ENV
To set user wide ENVs
To set system wide ENVs
To unset environment variables
unset NAME
or
NAME=''
Thanks!