Linux for Programmers #7 | Environment Variables

preview_player
Показать описание
In this Linux for programmers tutorial, we're going to be discussing environment variables on Linux. Environment variables are such an important thing to know as a programmer. Environment variables aren't just important for Linux, but also on Windows and Mac, and you should understand how to use them.

Chapters:
0:00 - Intro
0:45 - What is an environment variable
2:41 - Listing variables
3:20 - Printing specific variables
3:59 - echo command
4:42 - Creating variables
6:33 - Creating persistent user variables
9:10 - Creating persistent global variables
10:57 - Removing variables
12:07 - Outro

#Linode #AlternativeCloud #TechWithTim #Linux
Product: Linode, Linux, sysadmin; Tech With Tim;
Рекомендации по теме
Комментарии
Автор

Such a clear explanation of environmen variables. Love to know more from you sir. Keep going

mohammadbasheer
Автор

AMAZING VID! currently doing the RHCSA course and didn't quite understand this chapter, this helped a lot appreciate it!

flexcheekz
Автор

Very helpful explanation! Commenting for the algorithm so others can discover this too

mynameislyle
Автор

great explanation !
thank u found it really useful <3

amlmahdawy
Автор

For me I think it's better to use .profile instead of .bashrc because it's shell specific because many people may use other shell (zsh, fish). So for shell independent case use .profile then source it so it will automatically assign the env variable whenever you login.

NeuronX
Автор

Rather than having to close everything and open it back up you could just use "exit" and it would take you back to your login if you're just in the TTY. Or even easier you could use the "exec" command (execute) and start a new bash session such as `exec bash` which will close your current session and open a new one which is not the same as opening a sub-shell or child shell. In a child shell, opened by using just `bash` to open it, using `exit` would take you back to your parent shell which still has the temporary variable.

I can't remember if child shells inherit session variables but I'm pretty sure they do.

P.S. Using just `.` is a built-in alias for `source` so you can just type `. .bashrc` to source the file.

brainstormsurge
Автор

You make some good videos, I gotta say for others, after editing the ~.bashrc, you can just type bash or . .bashrc.

aronwomack
Автор

Is this Tech For Tim? Sounds like him lol

justins
Автор

Bro you leaked your IP multiple times in this Video. I hope for you it doesnt correspond to Aurora in Canada because thats whats the estimated IP Location says

freedbeats
Автор

This is great information in trying to VIM echo an Orange Pi5 to setup and test the GPIO PWM pins to control the servo Pan/Tilt motors. 😎 Thank you

qzorn