Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to Set Environment Variables in Linux
ChannelHOWTECHDescription from the creator
Follow this tutorial to learn how to set shell environment variables in a Linux operating system like Ubuntu.
Don't forget to check out our site howtech.tv/ for more free how-to videos!
youtube.com/ithowtovids - our feed
facebook.com/howtechtv - join us on facebook
plus.google.com/103440382717658277879 - our group in Google+
In this tutorial, you will learn how to set environment variables in linux.
Linux based operating systems use bash shell. The shell environment variables are used for several purposes, from storing data, storing software configurations, set terminal settings, and changing shell environment. The environment variables are normally created by the operating system during installation, or by different software as per the required need. Apart from that, in linux, to set environment variables, we first need to access the terminal application. That's because the user has the privilege to add, edit, and remove different variables at will.
Step # 1 -- All variables on terminal
In linux, to set environment variables we first need to access shell environment variables.
For that, we will need to open the terminal by searching for it in the applications menu, or selecting it from the dock on the left.
Once the terminal is opened up, to check for all environment variables, type the set command and press enter. This will list all the environment variables stored in the shell.
Step # 2 -- One variable at a time
The amount of these variables can become a very long list and locating one specific variable can become a tough task. Fortunately Linux allows us to display the value of one shell variable by using the echo command along with the name of the variable. This makes the task very easy.
Step # 3 -- Changing a variable
Now, to add or modify an environment variable, we can use the export command followed by the name of the variable and the values that go with it.
Multiple values for a variable need to be separated by a colon. The colon indicates to the operating system that one value has ended and another has begun. The variables can be created and removed from the shell easily, and can be done whenever required. But changing important variables may mess with the operating system's functionalities so it's important to be careful.
And that's basically all you need to know for how to set environment variables in Linux.
Don't forget to check out our site howtech.tv/ for more free how-to videos!
youtube.com/ithowtovids - our feed
facebook.com/howtechtv - join us on facebook
plus.google.com/103440382717658277879 - our group in Google+
In this tutorial, you will learn how to set environment variables in linux.
Linux based operating systems use bash shell. The shell environment variables are used for several purposes, from storing data, storing software configurations, set terminal settings, and changing shell environment. The environment variables are normally created by the operating system during installation, or by different software as per the required need. Apart from that, in linux, to set environment variables, we first need to access the terminal application. That's because the user has the privilege to add, edit, and remove different variables at will.
Step # 1 -- All variables on terminal
In linux, to set environment variables we first need to access shell environment variables.
For that, we will need to open the terminal by searching for it in the applications menu, or selecting it from the dock on the left.
Once the terminal is opened up, to check for all environment variables, type the set command and press enter. This will list all the environment variables stored in the shell.
Step # 2 -- One variable at a time
The amount of these variables can become a very long list and locating one specific variable can become a tough task. Fortunately Linux allows us to display the value of one shell variable by using the echo command along with the name of the variable. This makes the task very easy.
Step # 3 -- Changing a variable
Now, to add or modify an environment variable, we can use the export command followed by the name of the variable and the values that go with it.
Multiple values for a variable need to be separated by a colon. The colon indicates to the operating system that one value has ended and another has begun. The variables can be created and removed from the shell easily, and can be done whenever required. But changing important variables may mess with the operating system's functionalities so it's important to be careful.
And that's basically all you need to know for how to set environment variables in Linux.
About this tutorial
HOWTECH published this 0:56 video tutorial on November 10, 2013. It has been watched 202,931 times on YouTube.
- Channel
- HOWTECH
- Category
- Howto & Style
- Duration
- 0:56
- Published
- November 10, 2013
- Views
- 202,931
- Likes
- 686
Share
This tutorial in other languages
- FRComment configurer des variables d'environnement sous Linux
- ESCómo establecer las variables de Medio Ambiente en Linux
- PTComo Definir as Variáveis de Ambiente no Linux
- ITCome impostazione delle variabili di ambiente in Linux
- DEWie man Set Umgebungsvariablen in Linux
- NLHoe stel Omgevingsvariabelen in Linux
- RUКак Переменные среды Установить в Linux
- PLJak zmienne ustawione środowisko, w Linuksie
- JAどのようにLinuxでの環境変数の設定に
- ARكيفية المتغيرات مجموعة البيئة في لينكس
- HIकैसे लिनक्स में सेट पर्यावरण चर करने के लिए
- IDCara Variabel Set Lingkungan di Linux