"So you don't have to struggle as much as I did" 🗣🗣🗣🗣 my man spitting generational fire here
@MohidoTech7 күн бұрын
@@Ozzymand I am not that old, come on 😅
@Ozzymand7 күн бұрын
@@MohidoTech Never said you were! Just complimenting your dedication to helping the people!
@MohidoTech7 күн бұрын
@@OzzymandI know brother, was just kiddin 😅. I truly appreciate your kind words, I really do. thank you.
@moussaadem793314 күн бұрын
devices communicate through input/output. this make them analogus to files. "Everything is a file" is a great abstraction. linux does this a lot. devices and files are just files. processes and threads are just tasks. directories and filenames are just paths (that's why mv renames and moves)
@MohidoTech14 күн бұрын
I honestly love how Linux kernel work! Once you understand the Linux kernel, you start getting what a computer is and how it really works!
@someoneunknown689416 күн бұрын
Great video! Would love to learn more about the network devices!
@MohidoTech16 күн бұрын
I will create that one soon :)
@tannguyen_91Күн бұрын
I appreciate your work here
@savagesarethebest725113 күн бұрын
I find it really intuitive, like do you want some user input? Just open Standard Input. Want to write something, open standard output. Do you want a file from the network, just open it. Do you want a stream of coordinates from GPS or the trackpad, just open the file. This is especially good if your program operates on standard input and output, then it can be used in ways that you have never imagined decades after you made it.
@MohidoTech11 күн бұрын
Exactly, I totally agree in that sense. This abstraction makes it easier for both, driver implementer and applications/kernel communication!
@MomoyonКүн бұрын
Yes, would love more videos like this! You earned a sub
@MohidoTech13 сағат бұрын
@@Momoyon Thanks! And you will get what you love ;)
@gryzus24759 күн бұрын
Drivers are not a strict subset of all modules. Most drivers can also be built into the kernel directly and they will not be listed by the lsmod command. I will give you the benefit of the doubt though, they might still technically be modules but of the type "builtin" - check yourself with this command: less /lib/modules/`uname -r`/modules.builtin Another thing, the /dev/random may not require _specific_ hardware but it requires _some_ hardware to function, more precisely, it requires the entropy the hardware produces to generate cryptographically strong random bytes. Not sure whether modern Linux kernel versions block (6.6+) if there is not enough entropy to seed the random number generator, but the point is that you have to obtain these initial random bytes from the hardware (it is not strictly kernel functionality). Not a nit at all, I think you meant to convey the same thing, how succinctly at that! Great video.
@MohidoTech9 күн бұрын
@@gryzus2475 these are very valuable insights!
@le24_qr6nod7 күн бұрын
Would love to watch more such videos 🗣️🔥
@arijeetsarkar15122 күн бұрын
Thank you ❤
@MohidoTechКүн бұрын
Great to hear that you enjoyed it
@willabytesКүн бұрын
Appreciated!
@urebeatsgaming728516 күн бұрын
Very informative. Really liked the logical device part, always wondered what things like /dev/null were doing
@MohidoTech16 күн бұрын
I am more than happy that it helped you!
@pabloqp79295 күн бұрын
Really enjoyed this video, cheers!
@elidoz952215 күн бұрын
the part about the network devices sounds interesting, it sounds like it goes against the unix philosophy
@MohidoTech15 күн бұрын
IKR! At first, it does seem odd, but it makes sense when you consider the complexity of networking devices compared to USBs or hard drives. "Linux sticks to 'Everything is a File' but takes a unique approach for networking. Tricks like this are what make tech fun"- *said by a non-'implentist' 😅* Since many people asked❤, the next video is about: Linux networking. I will start working on it tomorrow and hopefully I publish it asap 😄 NOTE Implentist (noun created by Mohido): Someone who unfairly discriminates against or holds biases toward certain implementations of a concept, system, or technology, often based on personal preference or traditional norms. 🤣🤣🤣
@NguyễnLong-o1t5 күн бұрын
Thank you very much
@RasyaAnindyaPratama-m9r19 күн бұрын
great content bro!
@MohidoTech19 күн бұрын
That means a lot, thank you man!🙃
@susugar333813 күн бұрын
"Everything is a file" helps me understand Linux very much. But I always find funny when i get return "rm: dir is a folder, not a file."
@MohidoTech13 күн бұрын
@@susugar3338 In the past, even 'cat' worked on folders.. It was pretty wild backthen lol
@ytnihad16 күн бұрын
great video. thank you.
@MohidoTech16 күн бұрын
Don’t mention it!
@DanielNerd9 күн бұрын
great video! i'd love to see a video about how linux handle the network devices, always wondered why they weren't on /dev/ like everything else, but never actually spent the time to check.
@MohidoTech9 күн бұрын
The networking topic is huge to cover to be honest in a single ~5mins video. I just released a video providing a brief overview... kzbin.info/www/bejne/f2mUfWWNh7KWsKM However, I will create another video to explain the details on how it really works from inside the Linux kernel, explaining the kernel Network stack and other stuff. Probably even virtual interfaces.
@DanielNerd9 күн бұрын
@@MohidoTech nice! will go watch it right now!
@muhammadowais249213 күн бұрын
you can treat anything like a file in Linux, Want to check how much memory your system is using? cat /proc/meminfo Want to see what processes are running? cat /proc/cpuinfo Want to change your hardware's settings? Just open /dev/ like it's a folder of random files, and hope you don't break anything.😅
@muhammadowais249213 күн бұрын
Appreciate your this video, hope it'll be helpful for young ones
@MohidoTech13 күн бұрын
@@muhammadowais2492 thank you man for your support! It really means a lot!
@MartinWoad10 күн бұрын
A lot of the time you will not be allowed to write to these files. The fact that they are files is simply an abstraction, an illusion presented to you by the kernel. Remember also that handling files is often slow and introduces overhead. It is fun for the simplicity of it, but things are simple in userland because they are complicated undernearth in the kernel. And this complexity introduces overhead. So always consider if you can use other IPC mechanism instead if you are looking to be performant and often times there is no reason not to.
@MohidoTech10 күн бұрын
@@MartinWoad Exactly, take GPU for onstance, it exists in the /dev/ but really can only be used through System Calls.
@justgold112 күн бұрын
Channel will get big
@MohidoTech12 күн бұрын
@@justgold1 Thousand thanks man! Ur words r just gold!! Even if it doesnt go big, I am doing these vids coz I luv it 😅
@MartinWoad10 күн бұрын
I don't quite understand why non-essential drivers are handled as kernel modules. From my perspetice, they should be handled as userland daemons that can be easily turned and off and installed whenever needed. If they need to be in the kernel due to performance overhead then they should be patched later optionally. Adding more and more bloat to the kernel, especially if its mainline, increases the attack surface and decreases the stability of the system. The mainline kernel should only contain things that are absolutely essential.
@MohidoTech10 күн бұрын
TBH, great question! Well, while kernel modules DO add code to the kernel, they're actually separate from the core kernel code and can be loaded/unloaded dynamically using commands like modprobe. The reason drivers need to be kernel modules rather than userland processes is that they need direct access to hardware and must operate at the kernel's privilege level. The kernel's primary job is to safely manage hardware access and provide a consistent interface to userspace programs. Moving drivers to userspace would break this security and abstraction model, as it would require giving userspace programs direct hardware access. I hope this answer provides a better insight on why and how kernel is a middle-man between applications (userland) and hardware (driversland).
@SingularCherubim9 күн бұрын
This is actually how printers and scanners are handled (CUPS and SANE, respectively): there's a single kernel module that calls out to userland drivers. FUSE is the same thing for filesystems, but you can't use userland drivers (or even dynamic modules) for boot devices.
@MohidoTech9 күн бұрын
@@SingularCherubim This is something new to me. Thank you for sharing this information 🙏
@nonetrix30665 күн бұрын
What opened my eye to everything being a file a lot is /dev/amdkfd when I was trying to debug AI related issues on my AMD GPU, I assume ROCm and Vulkan compute just cats stuff there and it just werks somehow
@MohidoTech3 күн бұрын
That is possible especially that the `/dev/dri/card0` is used by the graphics-drivers to do some stuff. But not actually used by the application directly
@justgold112 күн бұрын
Yes bro 🔥🔥🔥🔥☄️☄️☄️
@0xPanda114 күн бұрын
Great video
@MohidoTech13 күн бұрын
@@0xPanda1 thank you man! I truly appreciate your words. I will try to make the next one even better!
@rinatpro-q1r14 күн бұрын
linux devices is files
@MohidoTech13 күн бұрын
@@rinatpro-q1r exactly, it is weird and fun to think that way. That's why linux-ers love linux.. It's always fun 😆
@dasten1236 күн бұрын
so devices actually are **not** files, they just appear as files in /dev?? That's wild, so "everything is a file" is a total lie...
@MohidoTech6 күн бұрын
@@dasten123 They lied to us.. when I started using linux I thought using: 'touch /dev/mouse' will create an actual new mouse into existence ;P😫
@MohidoTech6 күн бұрын
@@dasten123 But asside from me joking, yeah.. you are correct in that sense. It is the way the kernel developers decided to abstract simple devices.. So the applications can just use a simple file operation instead of a complex system call.
@qwerte69485 сағат бұрын
i mean it is obvius right? not everything is a file but that doesnt mean you couldnt use it as such
@dzwassim9513 күн бұрын
German?
@MohidoTech13 күн бұрын
@@dzwassim95 nope, y the question tho?
@dzwassim9513 күн бұрын
@@MohidoTech feels like german accent
@MohidoTech13 күн бұрын
@@dzwassim95 lmao 🤣 Well, sorry to disappoint u 😅
@Cloud67TR13 күн бұрын
sudo mount /dev/sda1 /mnt
@MohidoTech13 күн бұрын
@Cloud67TR 'sudo mount /usr/Cloud67TR /comments' 😁
@Solving_Engineer5 күн бұрын
Great video
@MohidoTech5 күн бұрын
Thank you, I hope I helped you with simplifying the idea :)