Understanding Shells: Linux Sub Shells vs Child Shells

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024
  • In this video we look at comparing Linux sub shells vs child shells . Understanding the differences with sub shells and child shells and why we use each. We look at what is and isn't inherited when a new shell is created and how you know the type of shell you are running.
    Additionally you can find my video courses on Pluralsight: pluralsight.com... and take time to see my own site www.theurbanpen...
    ~-~~-~~~-~~-~
    Please watch: "RHCSA 9 Working With Podman Containers"
    • How To Use Podman Cont...
    ~-~~-~~~-~~-~

ความคิดเห็น • 17

  • @Klinoklaz
    @Klinoklaz 6 หลายเดือนก่อน +1

    another common usage is that when you use cd to loop through some directories, you don't need to cd back if you run each iteration as subshell

  • @SO-dl2pv
    @SO-dl2pv ปีที่แล้ว +2

    Nice explanation! Thank you.

  • @alx8439
    @alx8439 11 หลายเดือนก่อน

    Awesome as always. Thanks!

  • @fraternitas5117
    @fraternitas5117 ปีที่แล้ว

    I love content like this, than you very much!

  • @jankraus5525
    @jankraus5525 ปีที่แล้ว

    Thanks for a great video!

  • @copperchatter6890
    @copperchatter6890 11 หลายเดือนก่อน

    8:15 - Cheeky bastard

  • @humblefox23
    @humblefox23 ปีที่แล้ว

    Hello Urban Penguin, I like your content. I am an entry-intermediate Linux engineer currently and looking at courses/certifiaction to develop my career.
    Which certification would you recommend me pursuing first ? I've been looking at Comptia Linux + XK0-005 and LPI Essentials or LPIC-1

    • @theurbanpenguin
      @theurbanpenguin  ปีที่แล้ว +4

      Linux Essentials is a great start. You may well be at that level already. It is the cheapest also. Then look at CompTIA. A single exam rather than two exams with LPIC and is bang up to date

    • @humblefox23
      @humblefox23 ปีที่แล้ว

      @@theurbanpenguin Thank you

  • @sotecluxan4221
    @sotecluxan4221 ปีที่แล้ว

  • @topklean
    @topklean ปีที่แล้ว

    at 6:11 the variable FRUIT is first expanded by the parent shell and the whole subshell is executed. the last echo in the the subshell is 'echo apple' and not echo $FRUIT. The shell bash do the variable expansion before the process expansion. So the when you say the variable are automticly exported in subshell, is not the right exemple...

    • @theurbanpenguin
      @theurbanpenguin  ปีที่แล้ว

      No it is not exported. It is a cloned shell. As such is has local variables and aliases. We do not cover exporting here as it does not apply

    • @topklean
      @topklean ปีที่แล้ว

      yes, not exported. but you said is availlable... wath i am trying to say (sorry for my poor english), is that, the variable in your example is nerver used by subshell, because of the precedent of expansion in bash. it is the parent shell that do the expension before executing all in ()... hope I am more clear. Beside thath, nice video

    • @cubernetes
      @cubernetes 7 หลายเดือนก่อน

      Try to run this
      a=1; (a=2; echo $a)
      It prints 2 instead of 1

    • @Klinoklaz
      @Klinoklaz 6 หลายเดือนก่อน

      that being the case, (echo $BASH_SUBSHELL) should print out the same result as that in current shell, but it actually does print the correct level of subshell. i'm confused