FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In the newer Fedora distributions, there are several "irrelevant" (from a simple user's point of view) file systems mounted (i.e., sysfs, devtmpfs, tmpfs, selinuxfs, cgroup, etc.). This means that a simple "mount" command to check what's mounted is somewhat tedious to read. So I wrote a coupe of simple alias definitions like this:
Code:
$ cat /etc/profile.d/bash_alias.sh
alias mounted='mount | grep -v ^[^/]'
alias Mounted='mounted | gawk '\''{split($0,part,/ (on|type) /);print part[2]'\''}'
The first alias (mounted) just strips out all the lines in the mount command that don't start with a slash (/) character.
The second alias (Mounted) lists all the active mounts by mount-point.
Here's what the output looks like:
Code:
$ mounted
/dev/md0 on / type ext4 (rw,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered)
/dev/sdb5 on /Persistant type ext4 (rw,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered)
/dev/sdb6 on /BTRFS type btrfs (rw,relatime,seclabel,nospace_cache)
//Office/Public on /Samba/Public type cifs (rw,relatime,sec=ntlm,unc=\\Office\Public,username=Peter)
//Office/S on /Samba/S type cifs (rw,relatime,sec=ntlm,unc=\\Office\S,username=Peter)
//Office/U on /Samba/U type cifs (rw,relatime,sec=ntlm,unc=\\Office\U,username=Peter)
//Office/Users on /Samba/Users type cifs (rw,relatime,sec=ntlm,unc=\\Office\Users,username=Peter)
//Office/Books on /Samba/Books type cifs (rw,relatime,sec=ntlm,unc=\\Office\Books,username=Peter)
//Office/Documents on /Samba/Documents type cifs (rw,relatime,sec=ntlm,unc=\\1Office\Documents,username=Peter)
//Office/FEBE on /Samba/FEBE type cifs (rw,relatime,sec=ntlm,unc=\\Office\FEBE,username=Peter)
/BTRFS/ISO/Storm from the Shadows.iso on /mnt/ISO/Storm from the Shadows type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/The Best of Jim Baens Universe.iso on /mnt/ISO/The Best of Jim Baens Universe type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/The Claws that Catch.iso on /mnt/ISO/The Claws that Catch type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/The Spider.iso on /mnt/ISO/The Spider type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/This Scepter'd Isle.iso on /mnt/ISO/This Scepter'd Isle type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/Unto the Breach.iso on /mnt/ISO/Unto the Breach type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/When the Tide Rises.iso on /mnt/ISO/When the Tide Rises type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/Windrider's Oath.iso on /mnt/ISO/Windrider's Oath type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/1635 - The Eastern Front.iso on /mnt/ISO/1635 - The Eastern Front type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/Cryoburn.iso on /mnt/ISO/Cryoburn type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
/BTRFS/ISO/Invasion.iso on /mnt/ISO/Invasion type iso9660 (ro,relatime,uid=0,gid=0,mode=0555)
$ Mounted
/
/Persistant
/BTRFS
/Samba/Public
/Samba/S
/Samba/U
/Samba/Users
/Samba/Books
/Samba/Documents
/Samba/FEBE
/mnt/ISO/Storm from the Shadows
/mnt/ISO/The Best of Jim Baens Universe
/mnt/ISO/The Claws that Catch
/mnt/ISO/The Spider
/mnt/ISO/This Scepter'd Isle
/mnt/ISO/Unto the Breach
/mnt/ISO/When the Tide Rises
/mnt/ISO/Windrider's Oath
/mnt/ISO/1635 - The Eastern Front
/mnt/ISO/Cryoburn
/mnt/ISO/Invasion
Nice but I'd say "simple users" have no reason to be checking mounts anyway. To them it is all "just directories" - they don't need to know the filesystem boundaries generally.
Perhaps, but I find it useful, and I'm a fairly simple user.
Oh, thinking about this thread, here better version of the Mounted alias: alias Mounted='gawk '\''/^\//{print gensub("\\\\040"," ","g",$2)}'\'' /etc/mtab
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.