Understand Bash Environment Variables With This Deep Dive

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 53

  • @matman1975
    @matman1975 4 роки тому +3

    Only you can make learning so much fun, the only reason I started on Linux was watching your videos.
    Thanks Andrew for taking the time to help so many people who want to learn.

  • @Perciwell
    @Perciwell 4 роки тому +1

    You strike exactly the point of my current interest. I am currently reading and searching for information about the different variables in Linux, their scope and about the differences between environment variables and shell variables and the differences between commands like set and env.
    Many authors write or say that there are two types of variables: shell variables and environment variables. One author writes that there are three types of variables in Linux: environment variables, shell variables and local variables.
    I try to understand all those facts thoroughly.
    Thanks for your video! It's very good.

    • @theurbanpenguin
      @theurbanpenguin  4 роки тому

      Thank you

    • @Perciwell
      @Perciwell 4 роки тому +1

      @@theurbanpenguin It's not a comment on your teaching. But I wonder why I have currently difficulties to understand all differences or kinds of variables, although I knew some programming languages and their concepts.
      IMO those difficulties to understand have to do with the fact that most authors mention that there are different variable types and than dive into the handling of commands like set, env, printenv, export or output of variables with echo etc.
      But to really get it I personally need first a clear overview. I need to know the available boxes very clear, before the book or teacher dives in one of those boxes and rummages in edges of one box.
      This is not about your teaching style, in the current moment I only try to understand why the heck it takes so long for me to understand such simple things. I guess, it's because before I really get the whole picture from a bird's-eye view the teacher or book is -- or I am -- in details about particular commands and situations, so that I never memorize a clear view of the whole and every time get lost in details.

  • @harunwagura4727
    @harunwagura4727 3 роки тому +1

    Best instructor I've come across!!!

  • @saheedadebayo8063
    @saheedadebayo8063 4 роки тому +1

    What an excellent teacher you are Andrew!

  • @TyroneHillsmbw
    @TyroneHillsmbw 3 роки тому +2

    Sir, You are a Master of your trade!!! Thank God for teachers like you. Shalom from Israel💯🦁🗣

  • @woesdiary263
    @woesdiary263 3 роки тому

    Thank you Mr. Mallett!

  • @Somabilbooks
    @Somabilbooks 2 роки тому

    you are the Best how to explain is easy and Highly Recommended

  • @marwanalturky
    @marwanalturky 4 роки тому

    that was an excellent video, thank you very much for your time to make this video.

  • @wesg01
    @wesg01 3 роки тому

    Awesome stuff as usual. Thank you!

  • @santoshkulkarni6871
    @santoshkulkarni6871 4 роки тому +1

    Wonderful @urbanpenguin

  • @srb1855
    @srb1855 2 роки тому

    This was excellent 👍. Is any of this material actually documented in the MAN pages or any other official Linux documentation - where does a new user go to learn these details in the absence of nice videos like this one?

    • @theurbanpenguin
      @theurbanpenguin  2 роки тому +1

      The bash man page does help but it is a long read linux.die.net/man/1/bash

  • @turtlewax3849
    @turtlewax3849 4 роки тому

    Thank you sir, hope there will be more soon!

  • @omparikh4426
    @omparikh4426 3 роки тому

    how about more deep overview of env and path variables?pam_environment, xserver, etc

  • @ahsanhabibsonar7059
    @ahsanhabibsonar7059 4 роки тому

    Great video. Thank you very much.

  • @anssimakela
    @anssimakela 4 роки тому +1

    Nice vid! could you do a presentation "how to make dynamic names for variables" and how to call those in script...

  • @enoughmuskspam2490
    @enoughmuskspam2490 4 роки тому +2

    Dude you're a legend !

  • @graybri
    @graybri 2 роки тому

    Fantastic content

  • @SpojlerSSJ
    @SpojlerSSJ 4 роки тому

    Hello, you done a great job I've learn a lot from you. I got a question about static IP address on ubuntu, I try to install newest Ubuntu Server after few years and i stuck with new manager, I try look for answers on your video about configuring static IP on ubuntu 12.10 it's little outdated :( Can we expected updated version on newest distro? :)

    • @theurbanpenguin
      @theurbanpenguin  4 роки тому

      Thanks 20.04 and 18.04 use netplan for their ip configuration

  • @lazellekeith8025
    @lazellekeith8025 4 роки тому

    I see you changed the Logo for the Urban Penguin. Did somebody complain? If so, I kinda figured it would be only a matter of time. That's unfortunate. I liked it..!
    I didn't find it offensive at all as a person of color. Cheers! btw. great videos!

  • @MrYerak5
    @MrYerak5 4 роки тому +2

    The compiler should show a warning since you need to return int but you return void

  • @SlideRSB
    @SlideRSB 4 роки тому +4

    You set your drink environment variable incorrectly. It should be drink=coffee

    • @theurbanpenguin
      @theurbanpenguin  4 роки тому +2

      Of course, I let myself down

    • @SlideRSB
      @SlideRSB 4 роки тому

      @@theurbanpenguin great video, by the way. I learned a lot.

  • @GauravMehtaShwetaMehta
    @GauravMehtaShwetaMehta 4 роки тому

    Very nice. Thanks

  • @ajaykumark107
    @ajaykumark107 4 роки тому +1

    Esc+. a good trick learnt

  • @guilherme5094
    @guilherme5094 4 роки тому +1

    Thanks!

  • @itaco8066
    @itaco8066 4 роки тому +1

    Awesome

  • @FrankTheile
    @FrankTheile 4 роки тому

    Now `CROSS_COMPILE=arm-linux- make` makes sense... 😲

    • @theurbanpenguin
      @theurbanpenguin  4 роки тому

      For sure, TBH I have never tried the cross compile. I have heard of it but never done it. Now is the time to try and run on my RPi. Thank you

  • @MichaelSalo
    @MichaelSalo 2 роки тому

    It seems like variables are available to subshells in this form. (echo $drink)

    • @theurbanpenguin
      @theurbanpenguin  2 роки тому

      Only environment variables. Those that have been exported

    • @MichaelSalo
      @MichaelSalo 2 роки тому

      @@theurbanpenguin This seems to be a case of a subshell accessing a regular variable:
      drink=tea
      echo $drink # same shell, gives 'tea'
      (echo $drink) # subshell, gives 'tea'

    • @theurbanpenguin
      @theurbanpenguin  2 роки тому

      drink=tea
      echo $drink
      bash
      echo $drink
      Drink is not available unless it is exported or set in the bashrc file.

    • @MichaelSalo
      @MichaelSalo 2 роки тому

      @@theurbanpenguin I guess there are different kinds of subshell. Some would say parentheses are a form of subshell.

    • @theurbanpenguin
      @theurbanpenguin  2 роки тому

      @@MichaelSalo parentheses evaluate the output of a command a feed it into a temporary or unnamed variable. The command is executed in the current shell hence your local variable works