LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-04-2010, 11:43 AM   #1
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Rep: Reputation: 15
Question How to change drive in ubuntu from terminal.


I am using dual operating system. one is windowd and other is ubuntu.
There are 4 drives in my pc like c,d,e,f
in ubuntu how to move to these drives from terminal.i mean how to change the drive.
Help.
 
Old 06-04-2010, 11:58 AM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Er, you could start by trying
Code:
$ mount
that simply means type the word 'mount' at a terminal. Don't know how much you know so you'd get a terminal in the aplication menu should think.

The disk devices will have names like /dev/sda*, /dev/sdb*, etc.. Or it might be hda. sda is the first disk, sdb the second and so on.

If the disk you are after is not there this means it is not mounted.

To mount it do, say:
Code:
$ sudo mkdir /mnt/sdb<some number> - 1 is first partition for example.  This creates a mount point on the file system.
sudo mount /dev/sdb1 /mnt/sdb1 , for example.
When the drive partition is mounted you can navigate to it in the normal way.

Code:
$ sudo fdisk -l
will give a map of all the disks and partitions.

EDIT: Sorry I misread post as usual. You get to the drive from a terminal with $ cd /mountpoint - e.g. cd /mnt/sdb2 then $ ls will list what is available. Find the mountpoints with the mount command.

Last edited by lugoteehalt; 06-04-2010 at 12:03 PM.
 
Old 06-04-2010, 12:13 PM   #3
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, Mint
Posts: 7,342

Rep: Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385
You need to find out how those drive are identified in Linux.

They will not be C: D: and so on. They are consider directories.

The drives themselves, if they are mounted, are mounted to the /dev directory. In turn they are linked to a drive name in either the /mnt or /media directories.

The information about them is in the file system table in a file usually in the /etc folder called /etc/fstab.

For instance, on this desktop computer that I am using right now, there are several hard drives. Here's the list (taken from my fstab).

Quote:
/dev/sda1 / <------The primary drive
/dev/sda5 /media/drive2
/dev/sda4 /media/drive3
/dev/sdb5 /media/usbide1
/dev/sdb6 /media/usbide2
When I boot the computer, I am by default in the drive identified as /.

If I want to chamge to drive 2 at the command line, I type

cd /media/drive2 or cd /media/drive2/[subdirectory]

(Actually, I use symbolic links, but I won't go into them here.) To go back to the main drive, I can type just cd.

It is possible that Linux does not yet know those drives are there or knows they are there but doesn't know what to do with them. If that's the case, you have to tell it they are there. Without knowing more about your setup, I can't be sure.

Here's a link about mounting and unmounting drives:

http://www.tuxfiles.org/linuxhelp/mounting.html

Here's a post I wrote up in another life about adding hard drives to a system:

http://www.geekazine.com/news/franks...o-usb-to-linux

It's nothing earthshaking, but it has lots of links to more information about the Linux file structure, the fstab, and other pages explaining this stuff far better than I can.
 
Old 06-04-2010, 04:30 PM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,134

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by amritpalpathak View Post
I am using dual operating system. one is windowd and other is ubuntu.
There are 4 drives in my pc like c,d,e,f
in ubuntu how to move to these drives from terminal.i mean how to change the drive.
Help.
You don't. Linux doesn't have 'drives' like Windows does. The drives/partitions are under mount points, like "/tmp", "/home" etc.

And as before..you've only ever responded to requests for more information, or followed up, on ONE of your previous threads. You've never even said "thanks" to ANYONE for helping you, and don't answer any questions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
want to change appearance of terminal in genome ubuntu 9.10 linux.ab Linux - Newbie 1 04-17-2010 12:38 AM
Ubuntu 8.04 Terminal - Can you make the terminal window transparent with a wallpaper? bparkerson04 Linux - Newbie 6 02-17-2009 05:12 PM
how to change the terminal font under ubuntu? EricTeng Linux - Newbie 4 02-07-2009 12:17 AM
how to change screen resolution in terminal (ubuntu) sunnior Linux - Newbie 1 09-25-2008 08:32 AM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration