Skip to playerSkip to main content
  • 2 months ago
Transcript
00:00hello everybody please before we start make sure you subscribe like share and comment and why not
00:06become a member this is a virtual machine of nixos i forgot the password of the user all the
00:12combinations all all the passwords that i used to use on my virtual machines are all wrong so i
00:22thought of showing you how to use nixos enter how to get into it for multiple purposes one of them
00:33is
00:34resetting your user's password and probably the most important one is repairing your system just
00:41in case it is broken i prepared the live medium of nixos you can download it from the official website
00:52make sure it is the iso of linux the distribution not the package manager nor the container
00:59nor anything else they don't some of them may not be able to be downloaded and then you insert it
01:07into
01:07your computer you press the button that is relevant to the boot menu and you choose that medium in most
01:17cases it's a usb flash drive in my case it's a virtual disk optical disk i will insert it and
01:26then i will reboot my system into it this is it latest choose the disk file and here it is
01:36latest
01:37nixos graphical this one i just downloaded it for this video and now we can restart the system
01:48once it restarts make sure you press the boot menu button to select the medium in my case i need
01:59to
01:59press c to access the cd-rom that's what appeared for me it's a virtual cd-rom here choose whatever
02:07you
02:08want it won't matter much except for the interface and then press enter
02:39this is really cool god
02:40you
02:45Since we are not gonna install NixOS, we can exit out of here, click yes here, and then
02:55we open the terminal, we run lsblk, the main drive for me it's slash dev slash sga, and
03:23the root partition is sga1, we can switch to root here, we need to be root in order to
03:32mount, by typing sudo-i, we first mount slash dev slash sga1 under mnt, and then lsblk, again
03:46to check if it is already mounted, I have the boot partition not separated from root partition,
03:55they are all one partition, in your case, in case you need to mount the root, the boot partition,
04:02make sure you mount it after you mount your root partition, it can be something like
04:10sga1, and then it becomes here slash boot, and the root can be like for example sga2,
04:16sga2, and then we run mount dash o bind slash dev slash mnt slash dev, not bind,
04:33like this, same command for proc here, and here, like this, and for sys, they are virtual directories,
04:53and file systems, like this, and then we can run nixos, enter,
05:13pass wd in my case, the username is username,
05:19I change the password, type it again, done, in case you have other operations to perform here,
05:30like repairing the system, reinstalling some broken packages that prevented your system from booting up,
05:37you can do them, and then you can reboot your system as long as they are done correctly,
05:46successfully, successfully, your system should go back to work as before, in my case, I just wanted to
05:56change the password which I forgot, I can now reboot my system just to prove that this works,
06:04I will like this, enter here,
06:12if I type the same password that I just created, and try to login, we can see that the login
06:21is successful,
06:22and the password is correct, I'm signing out, and cheers.
Comments

Recommended