In DOS, I switch between different drives by typing c:, d:, e: etc.,
But it doesn't work that way in Linux.
Could anyone please tell me how to switch between different drives?
Linux doesn't really have a way to work with "drives", per se, except with system utilities that access partitions; they often need to specify the drive that contains the partition. But if your drives each only have one partition, it doesn't really matter.
Anyway, to access a drive, you actually need to specify the partition in some way, usually by a definition like /dev/sda1 (1st partition on 1st drive) or /dev/sda2 (2nd partition on first drive). Using the Disk Utility or gparted, you can see all the partitions graphically. If you're only using the terminal, I've found that the command "blkid" is handy to list the drives with their UUIDs. I use the form:
Using the terminal, you need to mount a partition to actually use it. This is actually pretty easy to do. There needs to be an empty directory to use as the "mount point".
If you have a directory named /mnt/drive2 (/mnt is commonly used, but it can be in your home directory if you want), and your drive is /dev/sdb, with a single partition, then the simplest command is:
where "type" is the type shown in the blkid command, such as ntfs, ext4, etc.
EDIT: to experiment, don't be afraid to try the mount command. It is only temporary until you reboot (or unmount using the "umount" command). To make it permanent, you need to enter it into /etc/fstab. If you want to do that, you can experiment by creating an entry, then using the command "mount -a" to mount everything in /etc/fstab. If there are errors, it will tell you, and you can correct and repeat until it works.
Hard disks (drives, as you call them) contain partitions, and each partition contain a filesystem.
In Linux and Unix there is a main filesystem called root filesystem, and indicated with
If you type the command
where you can see that the partition
There are many other mounted filesystem in this output, as you can see, and are all virtual filesystem, i.e. filesystem not corresponding to a disk partition. And you can see an NFS-mounted filesystem, a virtual filesystem linked to a real filesystem available on another machine through the network (the line of output where you see an IP address in part deliberately obscured by me).
You can see the simplicity of having a single structure to access all your files, and in some cases also remote files.
Ubuntu keeps all disks mounted at media directory so use
Ubuntu can use, from your home directory (eliminate the < and > and replace "yourusername" with your actual username you logged into Linux with, "drive name" with the name of your hard disk).
All mounted disks are in that /media/yourusername/ directory . If you do not know the drive name, you can always look in your file manager -or- through the terminal (again from your home directory)
You can use the sd# and mnt described; however, I think you were looking for an easy answer.