No meu Arch Linux atualizado, lsblk
funciona bem sem sudo
:
$ lsblk -o NAME,FSTYPE
NAME FSTYPE
sda
├─sda1 ext4
├─sda2 ext4
├─sda3 swap
├─sda4
└─sda5 ext4
sr0
$ lsblk --version
lsblk from util-linux 2.26.2
No meu Ubuntu 14.04, obter os tipos de sistema de arquivos precisa de sudo
:
$ lsblk -o NAME,FSTYPE
NAME FSTYPE
sda
├─sda1
├─sda2
├─sda3
├─sda4
├─sda5
├─sda6
│ └─lvmg-homelvm (dm-0)
└─sda7
sdb
└─sdb1
└─lvmg-homelvm (dm-0)
$ sudo lsblk -o NAME,FSTYPE
NAME FSTYPE
sda
├─sda1 ntfs
├─sda2 ntfs
├─sda3 ext4
├─sda4
├─sda5 btrfs
├─sda6 LVM2_member
│ └─lvmg-homelvm (dm-0) btrfs
└─sda7 swap
sdb
└─sdb1 LVM2_member
└─lvmg-homelvm (dm-0) btrfs
$ apt-cache policy util-linux
util-linux:
Installed: 2.20.1-5.1ubuntu20.4
Candidate: 2.20.1-5.1ubuntu20.4
Por quê? E quais outras colunas precisam de sudo
?
Informação adicional:
No Arch:
$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 Jun 19 16:19 /dev/sda
brw-rw---- 1 root disk 8, 1 Jun 19 16:19 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jun 19 16:19 /dev/sda2
brw-rw---- 1 root disk 8, 3 Jun 19 16:19 /dev/sda3
brw-rw---- 1 root disk 8, 4 Jun 19 16:19 /dev/sda4
brw-rw---- 1 root disk 8, 5 Jun 19 16:19 /dev/sda5
$ groups
wheel locate systemd-journal networkmanager fuse muru
(Meu grupo principal é muru
, não wheel
, apesar do que o pedido possa sugerir.)
No Ubuntu:
$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 Jun 12 17:05 /dev/sda
brw-rw---- 1 root disk 8, 1 Jun 12 17:05 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jun 12 17:05 /dev/sda2
brw-rw---- 1 root disk 8, 3 Jun 12 17:05 /dev/sda3
brw-rw---- 1 root disk 8, 4 Jun 12 17:05 /dev/sda4
brw-rw---- 1 root disk 8, 5 Jun 12 17:05 /dev/sda5
brw-rw---- 1 root disk 8, 6 Jun 12 17:05 /dev/sda6
brw-rw---- 1 root disk 8, 7 Jun 12 17:05 /dev/sda7
brw-rw---- 1 root disk 8, 16 Jun 12 17:05 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jun 12 17:05 /dev/sdb1
$ groups
muru adm cdrom sudo dip plugdev lpadmin sambashare debian-tor libvirtd autopilot
No Arch:
$ stat -c "%A %U %G" 'which lsblk'
-rwxr-xr-x root root
No Ubuntu:
$ stat -c "%A %U %G" 'which lsblk'
-rwxr-xr-x root root