Tag Info

Hot answers tagged

46

One reason is that block level access is a bit lower level than ls would be able to work with. /dev/cdrom, or dev/sda1 may be your CD ROM drive and partition 1 of your hard drive, respectively, but they aren't implementing ISO 9660 / ext4 - they're just RAW pointers to those devices known as Device Files. One of the things mount determines is HOW to use ...


15

Do not use mount. From man mount: The listing. The listing mode is maintained for backward compatibility only. For more robust and customizable output use findmnt(8), especially in your scripts. Note that control characters in the mount‐ point name are replaced with '?'. Use findmnt, ...


12

Basically, and to put it easily, the operating system needs to know how to access the files on that device. mount is not only "giving you access to the files", it's telling the OS the filesystem the drive has, if it's read only or read/write access, etc. /dev/cdrom is a low-level device, the operating system functions wouldn't know how to access them... ...


6

How about: mount | grep '^/[^/]' Mount points relating to physical disks will always start with a / since the first field is the path to a device. cifs mounts will start with // so exclude lines with a second / to ignore them. Update I misread the question, I thought you wanted to exclude cifs and nfs. Try this instead: mount | grep -E '^[^ ]*[/:]'


6

For consistency Imagine you have some partitions on the first hard drive in your system. For example, /dev/sda2. You later decide that the drive isn't large enough so you purchase a second one and add it to the system. All of a sudden, that becomes /dev/sda and your current drive becomes /dev/sdb. Your partition is now /dev/sdb2. Using your proposed ...


5

There are several advantages to the current arrangement. They can be grouped into advantages of block special files and advantages of mountpoints. Special files are files that represent devices. One of the Ideas that unix was built on is everything is a file. This makes many things simple, for example user interaction is just file reads and writes on a tty ...


5

The -t option for mount also works when displaying mount points and takes a comma separated list of filesystem types: mount -t ext3,ext4,cifs,nfs,nfs4,zfs I am not sure if that is a better solution. If you start using (e.g. btrfs) and forget to add that to the list you will not see it and maybe not miss it. I'd rather actively filter out any new ...


3

I'd call it historical reasons. Not that the other answers are wrong, but there's a bit more to the story. Compare Windows: Windows started as a single-computer, single-user OS. That single computer probably had one floppy drive and one hard drive, no network connection, no USB, no nothing. (Windows 3.11 had native networking capabilities; Windows 3.1 ...


3

Many database engines can work directly with raw disks or partitions. For example, MySQL: http://dev.mysql.com/doc/refman/5.7/en/innodb-raw-devices.html This avoids the overhead of going through filesystem drivers, when all the DB engine really needs is one huge file that fills the disk.


3

No. /etc/fstab is consulted when mount is called. It's just a text file. It's also used implicitly by the init system at boot time, most likely via mount -a: -a, --all Mount all filesystems (of the given types) mentioned in fstab (except for those whose line contains the noauto keyword). From man 8 mount. Note that if you have some kind of ...


3

I think about this in the following manner: mount is a tool that tells the system to interpret the contents of some files as directory trees. The filesystem has directories and files, and each file is a label for some string of bytes. /dev/cdrom is a file, it represents the string of bytes stored on the CD. You can read this very long string directly, but ...


2

Yes it does. The main point is that the source and destination folders have to exist prior to attempting the mount. You also need to be superuser. Also read up on bind-mounts, as there are options to them too.


2

Yes. Well, I've made a quick test on my system, mounting a NTFS partition from Windows onto a directory in a XFS Linux partition, and it worked okay. You have to do this operation as root.


2

You have a space between "ro," and "remount". Try without this space.


2

You could specify the path on the FTP server after hostname part in the original command of curlftpfs. For example, you could have your command as, curlftpfs user_name:password@hostname:/var/www/public_html ~/mnt/sitename References http://askubuntu.com/a/323215 http://askubuntu.com/a/200812


2

In addition to 에이바's answer, you may want to place the credentials in a specific file called .smbcredentials in your home directory for a little more security. This is a good practice especially for multiuser systems. This way you will be protecting your cifs password. Create a file: /home/myname/.smbcredentials and include just two lines: username=myname ...


2

If a Linux filesystem (not e.g. FAT32, NTFS) is mounted then the directory permissions for the root directory are taken from the filesystem. root must either change the owner (chown) or permissions (chmod, setfacl) of the root directory or has to create subdirectories which are writable by the users. The latter is what happens with the normal root volume: ...


2

is it possible to limit the visibility of that file system such that other users are not able to view it The same rules apply as if it wasn't on an encrypted system. Encryption just changes how the on-disk structures are finally stored. That means that the normal ACL controls are still going to be in effect, just going through an added layer where ...


1

Instead of an explicit dependency, perhaps you could use an automount. I remember Systemd advertised this during Poettering's initial blog post, as a kind of implicit dependency. It's like how (with systemd) you can write requests to a socket and the appropriate service will be started for you, aka "socket activation". In this case, accessing the ...


1

You are confusing the generic option user with the filesystem specific option uid. from fstab(5) user allow a user to mount and from mount(8) uid=value and gid=value Set the owner and group of all files. (Default: the uid and gid of the current process.) which applies to the msdos, umsdos and vfat filesystems. you can do similar options ...


1

I can not tell you how to do it, but namespaces is the way to go. These are new-ish. the Linux kernel supports them, and I think I heard that they are in some other kernels. en.wikipedia.org/wiki/Cgroups#Namespace_isolation on Linux Kernel there are namespaces, you can hide mounts and other resources. It is often used with cgroups to create light weight ...


1

Each line in the /etc/fstab file contains the following fields separated by spaces or tabs: file_system dir type options dump pass A typical mount point added in /etc/fstab would look like the following: # <file system> <dir> <type> <options> <dump> <pass> /dev/sda1 ...


1

The question title asks: Why do we need to mount on Linux? One way to interpret this question: Why do we need to issue explicit mount commands to make file systems available on Linux? The answer: we don't. You don't need to mount file systems explicitly, you can arrange for it to be done automatically, and Linux distributions already do this for most ...


1

Because /dev/cdrom is a device, whereas /media/cdrom is a filesystem. You need to mount the former on the latter in order to access the files on the CD-ROM. Your operating system is already automatically mounting the root and user filesystems from your physical hard disk device, when you boot your computer. This is just adding more filesystems to use. All ...


1

Do not use the -v switch. Use: mount | grep -Ew 'ext4|ext3' This will show you only ext4 and ext3. If you want to view more filesystems, add them to the regex. For example, to view ext3, ext4, cifs and nfs mounts, use: mount | grep -Ew 'ext4|ext3|cifs|nfs'


1

A list of file system using a block device as backing storage can be obtained from /proc/filesystems. For example you could use it as follows: mount -t "$(grep -v '^nodev' /proc/filesystems | cut -f2 | paste -s -d ,)" Since you want both file systems backed by a block device and network file systems, it does not completely eliminate the need to maintain a ...


1

Haven't found a way to make the changes permanent yet, but at least there's a way to manually change drivers: For example with my sony walkman: Plug it in and find out its vendor and product id with lsusb: # lsusb Bus 001 Device 003: ID 0402:7675 ALi Corp. Bus 001 Device 025: ID 054c:04be Sony Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation ...


1

I know this is rather old but in Debian-type distributions setting Set RAMTMP, RAMRUN and RAMLOCK in /etc/default/tmpfs (/etc/default/rcS or before wheezy) does the same job.



Only top voted, non community-wiki answers of a minimum length are eligible