Linux Tip - Understanding Chroot - Episode 2

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024
  • This is a tutorial on using Linux which is a new regular series. The current episode will teach you about the chroot command and how this is used in many phone operating systems. It also will explain the difference between a chroot and a virtual machine.
    A chroot is a heavily used feature in any OS currently working on mobile like Android and even Linux Phones. So this has very heavy practical value for those interested in how Phone OS's work.
    I'm using Ubuntu 18.04 as my computer. My computer is a brand new Star-labtop.
    --------------------------
    I'm the Internet Privacy Guy. I'm a public interest technologist. I'm here to educate. You are losing your Internet privacy and Internet security every day if you don't fight for it. Your data is collected with endless permanent data mining. Learn about a TOR router, a VPN , antivirus, spyware, firewalls, IP address, wifi triangulation, data privacy regulation, backups and tech tools, and evading mass surveillance from NSA, CIA, FBI. Learn how to be anonymous on the Internet so you are not profiled. Learn to speak freely with pseudo anonymity. Learn more about the dangers of the inernet and the dangers of social media, dangers of email.
    I like alternative communication technology like Amateur Radio and data communications using Analog. I'm a licensed HAM operator.
    Contact Rob on the Brax.Me App (@robbraxman) for encrypted conversations (open source platform)
    Support this channel on Patreon! www.patreon.co...
    bytzVPN.com Premium VPN with Cloud-Based TOR Routing
    whatthezuck.net Cybersecurity Reference
    brax.me Privacy Focused Social Media - Open Source - Encrypted Communications
    rob.brax.me Store for BytzVPN, BraxWifi Router, and merchandise

Комментарии • 64

  • @alokkumar8642
    @alokkumar8642 Год назад +7

    I recently got some project where I needed to build a chroot and jail environment. It was a completely new concept for me at that time. So I fiddled with countless tutorial on this topic and all of them were confusing and messy. I got some idea created some sample chroot environments also but always ran into one or another problem. This tutorial is too good. Too clean and concise. The way you have described an advanced topic like chroot in a simple manner just made me wow. Too good sir. Keep up the good work.

  • @geekmode6339
    @geekmode6339 2 года назад +4

    Dude, this SO powerful!! It's the first time that I hear about chroot. I'm actually learning docker and this video it really helped me to understand the basics. Thank you so much!!!

  • @hashirahmad5187
    @hashirahmad5187 3 года назад +7

    Very helpful! I would have liked a series on this, including the mount bind :)

  • @rewanthtammana
    @rewanthtammana 4 года назад +3

    Amazing explanation and elegant demo. Perfect and clear. Thanks

  • @RonnyOlufsen
    @RonnyOlufsen 4 года назад +4

    Thanks! chroot is a very interesting! If I remember correctly, the concept is borrowed from FreeBSD jails.. a powerful and logical implementation on secure containers.

    • @robbraxmantech
      @robbraxmantech  4 года назад +1

      You know more history about it then! I never used FreeBSD. I used Unix back in the day.

    • @babyboomertwerkteam5662
      @babyboomertwerkteam5662 2 года назад +1

      chroot was introduced in UNIX all the way back in 1979. no relation to FreeBSD or jails at all!

    • @RonnyOlufsen
      @RonnyOlufsen 2 года назад +1

      @@babyboomertwerkteam5662 Thank you for the correction! I didn't know 🙂👍

  • @corwaincyrus6840
    @corwaincyrus6840 4 года назад +4

    Chroot! chroot! chroot is on fire!!

    • @chigozie123
      @chigozie123 4 года назад

      The roof! The roof! The roof is on fire!

    • @vxllvxn
      @vxllvxn 3 года назад

      😂

  • @MorgulLev
    @MorgulLev 11 месяцев назад

    The content perfectly stimulated my thought process, very well explained.
    If you're searching for simplified explanation instead of reading man pages, then you're in the correct place ;)

  • @chrislong5487
    @chrislong5487 4 года назад

    was having a hard time understanding the topic when I was reading about it else where. Your video was very clear and helped me understand chroot way better. Thank you for your video!

  • @michaeldina1103
    @michaeldina1103 4 года назад +2

    New subscriber here! Really enjoying your channel content keep up the great stuff!

  • @b.c.2177
    @b.c.2177 9 месяцев назад

    I built the same chroot jail for getting restricted access to a subdomain on server via "mount --bind ... " of two directories. Just one problem I can not fix at the moment, the terminal opens in Bash instead of selected ZSH and it does not open in the ~. It opens in chroot directory. If I SSH with "root" and switch to the account in chroot "su - chroot-user", then everything works correctly.

  • @ahmed12358
    @ahmed12358 2 года назад

    nice video Rob, just a was looking to understand the idea of containers. thanks

  • @feldinho
    @feldinho Год назад

    Great explanation! Just a quick question: why are you using sudo to create the directories? does the ownership of the directories have any effect?

  • @ejvandijk
    @ejvandijk 3 года назад +1

    9:25 Oof! I thought I'd be in jail forever!😂

  • @Unizuka
    @Unizuka 2 месяца назад

    is the difference in terms of performance too noticable between chroot and proot?

  • @johnjunji8443
    @johnjunji8443 3 года назад

    Amazingly clear and easy to follow, thank you !

  • @atziluth5198
    @atziluth5198 3 года назад

    I'm using WSL. I got "/bin/bash: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory."

  • @michalski9141
    @michalski9141 2 года назад

    this is absolutely incredible

  • @OPatron24
    @OPatron24 Год назад

    so it shares a similar concept with docker, thank you

  • @imcrazyru1
    @imcrazyru1 3 года назад

    Excellent lesson. I really appreciate the simplicity of your lesson. Keep up the good work! :-)

  • @greob
    @greob 4 года назад +8

    4:50 You dont' need to copy the /bin /lib /lib64 directories.
    You can either mount --bind or cp -alf (to create hard links since symbolic links won't work).
    # mount --bind /bin /chroot/bin
    # mount --bind /lib /chroot/lib
    or
    # cp -alf /bin /chroot/bin
    # cp -alf /lib /chroot/lib

    • @robbraxmantech
      @robbraxmantech  4 года назад +11

      exactly. I mentioned that I wasn't going to teach mount --bind to not complicate the concept. Copying the files required no other explanation

    • @svampebob007
      @svampebob007 4 года назад +2

      also you don't need to do cd lib, ls, cd .., cd lib64, ls, cd..
      you can just do ls lib/, ls lib64/, ls bin/
      That would save you about 0.5µs :)

    • @johnjoyce
      @johnjoyce 3 года назад +10

      @@svampebob007 you do not seem to get the point of a focused tutorial. the point is not trying to prove how much you think you know or the fastest solution or anything like that. it is to cut out the things that might distract from the main topic and teach something focused and isolated.

    • @mytech6779
      @mytech6779 4 месяца назад

      @@johnjoyce The pointless use of `cd` does distract from the main topic. `ls ./bin` or `ls /jail/bin` is much cleaner and easier to follow.

  • @TheHistoryguy10
    @TheHistoryguy10 3 года назад

    Can you create a tutorial on how to install the Linux OS on an iPhone? I’ve been told that it can install on an iPhone up to iPhone 7. Appreciate your channel and the content you provide. Best wishes.

  • @chackokabraham738
    @chackokabraham738 3 года назад

    Hey Rob,
    Great stuff. Just wanted to check can we restrict a new user to be in the jailed environment and how would i do that ? also is this like a virtual environment where i can play with stuff like installing stuff and if doesn't work out i can delete the folder and everything is gone ? Its like a container from what i understand right but with using the same kernel as we are using on our system.
    Looking forward for your thoughts on this.

  • @tincho15neem
    @tincho15neem Год назад

    What are the diferences and similarities between docker and chroot?

    • @akshay-kumar-007
      @akshay-kumar-007 Год назад

      docker extensivly uses chroot. Its not one over the other.

  • @1-2weeks96
    @1-2weeks96 2 года назад

    Thanks, Rob!

  • @martin393j
    @martin393j 3 года назад

    Excellent brother.......

  • @raviraj8209
    @raviraj8209 8 месяцев назад

    Nicely explained.
    Music name please someone :)

  • @jacobtb1
    @jacobtb1 Год назад +1

    helpful, thanks

  • @johnjoyce
    @johnjoyce 3 года назад

    thanks this is really a nice description

  • @sandeepreddygoli7878
    @sandeepreddygoli7878 2 года назад

    Excellent

  • @PrashantSharma-ql4yb
    @PrashantSharma-ql4yb 2 года назад

    Thank you so much, very useful vid!

  • @OthmanAlikhan
    @OthmanAlikhan 2 года назад

    Thanks for the video =)

  • @abdullahilkafi5679
    @abdullahilkafi5679 3 года назад

    Thank you so much.

  • @kahuna414
    @kahuna414 Год назад

    Windows does have junction links, which is simlar to chroot.

  • @mcnits
    @mcnits 3 года назад

    You did a better job! Standing ovation !

  • @subhramanya1406
    @subhramanya1406 4 года назад

    Thanks for the video Rob :D

    • @GalenCurrah
      @GalenCurrah 4 года назад

      Yes. I previously though chroot was a way of spoofing permissions, but now stand better informed.

  • @MnemonicCarrier
    @MnemonicCarrier 3 года назад

    Thank you so much! Definitely the best intro tutorial I've seen about chroot. I've watched it twice, and now I understand how to set up SFTP (or even SSH) access for users, but not give those users access to the entire system. BTW - I'm using arch, and I had to also copy across my /usr directory. The size of the jail becomes quite large (relatively speaking):
    $ du -sh ./*
    338M ./bin
    4.3G ./lib
    4.3G ./lib64
    7.5G ./usr
    Probably because I have a lot of things installed.

    • @MagnumCarta
      @MagnumCarta 3 года назад

      Yes, /usr is also an important directory. Although often pronounced as "user", the directory actually stands for User System Resources. Part of the reason you needed /usr is because things like SFTP are located here rather than in /bin or /lib(64). This directory is also often where things like GUIs such as Weyland or KDE store their files (e.g. under /usr/lib or /usr/local/lib).
      /usr tends to be rather large since this is the directory most applications will write their contents into. Another common approach is to use /opt (which means "optional packages").

  • @usmclongrangebrainsurgeon
    @usmclongrangebrainsurgeon 4 года назад

    Great video, thanks

  • @WeLoveScratchJr
    @WeLoveScratchJr 4 года назад

    Star laptops or system 76?

  • @pblic8_269
    @pblic8_269 4 года назад

    Recent
    13:25 | 25 Feb Tue || 13:25 25-02-2020 *|* 13:25 Tuesday 25 February 2020

  • @b.c.2177
    @b.c.2177 9 месяцев назад

    It is probably better to have a chroot env. in Docker container and just install it on Linux when is needed.

  • @bartlomiejkubica1781
    @bartlomiejkubica1781 2 года назад

    Thanks!

  • @obaialsamadi2517
    @obaialsamadi2517 4 года назад

    Thank you sir!

  • @mytech6779
    @mytech6779 4 месяца назад

    Most usful for fixing badly broken machines or installing a linux distro from scratch without an installer (eg Gentoo).

  • @Dzin077
    @Dzin077 4 года назад

    firejail or chroot?

    • @zyan983
      @zyan983 4 года назад

      Firejail is for sandboxing applications. Chroot is for changing root user to another root user on a different environment / distro.

  • @eritert
    @eritert 4 года назад

    Chroot, chroot, chroot on the file

  • @quentinli5802
    @quentinli5802 2 года назад

    thx

  • @theSEGAtwistisover9k
    @theSEGAtwistisover9k 3 года назад +1

    looks at like count,
    419...😏
    don't mind if I do. 😎

  • @eveljim1
    @eveljim1 4 года назад +1

    liked

  • @polyesterbebe
    @polyesterbebe 4 года назад

    Engagement