So in the last lesson, during a couple of scripts, I mentioned the word cheroot and went over it kind
of briefly.
So in this lesson, what I thought I do is do more of a deep dive into a root so you can better understand
what it is.
All right, so right now I'm booted from recovery and I'm going to go to a terminal, and so this is
kind of like the same environment we would have been in if we were doing bootstrap or we're in the recovery
environment.
So if I go ahead and take a look at where I am now, I'm basically in route's home folder.
And if I go ahead and I try to create a directory, it says that I'm in a read only file system.
And that's because the recovery partition is a read only image.
So if I don't see you till I get my computer name, then you see it returns, Mac, and if I do a get
hostname, you can see it's not set.
Now, remember, we talked about that computers out of the box don't get a hostname.
And so in this read-only recovery partition bood environment, the computer name was said by Apple to
Mac.
So let's go ahead and cheroot into Macintosh hard drive.
Now notice what our prompt says are shall prompt says it, says Basche right now.
Now I'm going to go ahead and Trute as user route into volumes.
Macintosh Hard Drive.
And you see now my prompt has changed and if I see where my current directory is, you can see I've
also changed.
Now if I go into my home directory, you can see that's Bahru and if I make a directory test, it stays
there because I'm in a read right file system.
I'm on the Macintosh hard harddrive now on a Macintosh hard drive.
The user's folder is in the root of Macintosh hard drive.
So if I go to see one user's.
You see, it works.
I'm in the user's folder, and if I do a listing, you can see that I've got my administrator shared
and my Mojave folders and I can even go into the have a folder into the in into the documents folder
and see what was it and see if there was anything in it.
Now, if I exit the Trute environment.
And I try to go to users, it's it's not there there is no directory if I go to the root of the recovery
partition.
You can see that I don't have a user's folder now if I commute back into.
The Macintosh hard drive and I go to route.
You can see that my file system looks different and I have the user's folder.
All right, so we're in the current environment and what we did in one of the scripts is we renamed
the computer.
Now if I do and Sue to get computer name, you can see I'm getting the computer name return because
I'm basically logged into the Macintosh hard drive.
And whatever commands I type in, I'm going to get returned like I'm logged into the Macintosh hard
drive.
So again, I could do get hostname and I see that I get my proper name and as soon as I exit and I type
in the exact same command, now I get different results because now I am applying commands to the file
system in which I'm booted, which is the recovery partition.
So I hope that clarifies what a Cerruti environment is and why I was using it.
And bootstrappers.