this post was submitted on 18 Jul 2024
25 points (96.3% liked)
Linux
48186 readers
1830 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
For mounting it's a bit trickier, just like you added an entry to fstab to say that you wanted to mount (for example )
/dev/sdb2
on/ntfs
you would need to add another one saying you want to mount/ntfs/downloads
to/home/<username>/Downloads
. If you want to run this as a one off the command ismount --bind /ntfs/downloads /home/<username>/Downloads
(but note that running this with a command will become undone when you reboot, the only way to preserve it after reboots is to have an fstab entry)What this does is essentially at the kernel level say that one path is the other. How is this different from a link? Well, a link is just a file that points to the other place, whereas a mount is the other place. A couple of examples on how this is different:
If you had a Download folder you would need to rename or delete it before making a link there. Mounting on the other hand necessitates that the Downloads folder exists, and will obfuscate anything inside it while the other folder is mounted. This means that if you had files inside Downloads and you mounted the other folder on top those files are still in the disk, but you have no way of accessing them until you unmount the folder.
Links can't go outside of your system. This is likely not important to you, but if you for example are doing things with chroot or docker this can become a problem.
In short, a link is like a door that when you open it tells you "go to the other door", whereas the mount is replacing the room behind that door with another one. Most programs are smart enough to go to the other door, and on most cases the other door exists so all is good. On some edge cases (like I said, docker, chroot, etc) the "go to door X" could be a problem if inside the client system X doesn't exist.
Ps: I don't know of any way of doing this graphically, this is advanced stuff so likely it's expected that people who want to mount folders know enough to do it in a terminal
Thanks Again.
This is Everything I needed to know.
Guess I'll stick to Symlinks for the sake of simplicity.