newb linux question...listing my drives (mounts)
Moderator: General Moderators
newb linux question...listing my drives (mounts)
how do I list all of the drives on my server?
Let's say I have a cdrom drive, and two hard drives. How can I list out all of those drives?
Let's say I have a cdrom drive, and two hard drives. How can I list out all of those drives?
All devices will be in the /dev (sometimes /devices - depends on distro) directory. To access them you'll need to mount them as root, e.g.:
You can probably get a GUI to run in KDE/Gnome or any other DE.. I'll have a butchers to see if I can find anything.
Code: Select all
sudo mount /dev/hda1 /mnt/drive1
sudo mount /dev/cdrom /mnt/cdromWeirdan wrote:mount command without options would show you the list of mounted devices
Code: Select all
[root@devserver dev]# mount
/dev/sda5 on / type ext3 (rw)
/dev/proc on /proc type proc (rw)
/dev/sys on /sys type sysfs (rw)
/dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /boot type ext2 (rw)
/dev/shm on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
automount(pid1873) on /net type autofs (rw,fd=4,pgrp=1873,minproto=2,maxproto=4)
automount(pid1840) on /misc type autofs (rw,fd=4,pgrp=1840,minproto=2,maxproto=4)
[root@devserver dev]#you mounted two partitions from first sata disk. one partition is mounted on root (/), another mounted on /boot.
mnemonics:
sd - SATA disk
sda - first SATA disk
sdb - second SATA disk
sda1 - first partition on first SATA disk
sdb5 - fifth partition on second SATA disk
...
You can use df to get somewhat more meaningful info about mounts (it's primary purpose is to show disk usage info though).
mnemonics:
sd - SATA disk
sda - first SATA disk
sdb - second SATA disk
sda1 - first partition on first SATA disk
sdb5 - fifth partition on second SATA disk
...
You can use df to get somewhat more meaningful info about mounts (it's primary purpose is to show disk usage info though).
ahh yes 'df' was much easier to understand. Although it didn't show me my cdrom drive.
I know this is going to sound really lame and I'm almost reluctant to ask it, but isn't there way I can just see what is on 'My Computer' without using some kind of GUI?
basically I want the same thing as when I dbl click 'My Computer' in winders, but just listed out in puTTy for me...
I know this is going to sound really lame and I'm almost reluctant to ask it, but isn't there way I can just see what is on 'My Computer' without using some kind of GUI?
basically I want the same thing as when I dbl click 'My Computer' in winders, but just listed out in puTTy for me...
No, no such thing that I'm aware of. Either you're admin and you know what hardware is installed on your system (or can easily get that info from dmesg output), or you're just a user, in which case you don't even need to know what hardware runs your system.I know this is going to sound really lame and I'm almost reluctant to ask it, but isn't there way I can just see what is on 'My Computer' without using some kind of GUI?
Logical naming 
Example, apart from /boot (hda1), / (hda3) and my swap space (hda2)
I've got:
/mnt/cdrom (cdrom)
/mnt/ntfs1
/mnt/ntfs2
/mnt/ntfs3
etc.
Before I blatted windows I had them as /mnt/D /mnt/E etc.
EDIT: Forgot to add that I can now ls -l in my /mnt directory to see all mounted drives (that are not /boot / or swap.) and in KDE It looks just like "My Computer"
Example, apart from /boot (hda1), / (hda3) and my swap space (hda2)
I've got:
/mnt/cdrom (cdrom)
/mnt/ntfs1
/mnt/ntfs2
/mnt/ntfs3
etc.
Before I blatted windows I had them as /mnt/D /mnt/E etc.
EDIT: Forgot to add that I can now ls -l in my /mnt directory to see all mounted drives (that are not /boot / or swap.) and in KDE It looks just like "My Computer"
indeed, took me a good while to get used to it all, and to 'accept' it above all else.
Also to ensure they are mounted on boot you'll need to edit your fstab file (normally in /etc/fstab)
This is always fun.. Here is what mine looks like:
This page is great for getting to grips with fstab: http://www.tuxfiles.org/linuxhelp/fstab.html (as is the entire site for getting to grips with *nix
)
Also to ensure they are mounted on boot you'll need to edit your fstab file (normally in /etc/fstab)
This is always fun.. Here is what mine looks like:
Code: Select all
#DISK1
/dev/hda1 /boot ext2 noauto,noatime 1 2
/dev/hda3 / ext3 noatime 0 1
/dev/hda2 none swap sw 0 0
# DISK2
/dev/hdb1 /mnt/ntfs1 ntfs ro,nouser,auto 0 0
/dev/hdb2 /mnt/ntfs2 ntfs ro,nouser,auto 0 0
/dev/hdb3 /mnt/ntfs3 ntfs ro,nouser,auto 0 0
# MISC.
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0Code: Select all
fdisk -l