Ask Your Question

How do I change from being in the root of one Hard disk to another

asked 2015-05-27 16:04:56 +0000

Orriginal gravatar image

I apologise NOW for this really BASIC question but I have loked around and in Manuals and I must be stupid or somethign today as I cannot find out how, from the command line in a Terminal, I change from being on one hard disk at root level to get to another mounted disk. I have 3 in my PC and I need to access them via terminal Please be kind when you give the answer.. I am learming lol

The reason I am doin gthis? I am booting up through a USB into Fedora Live and need to edit the fstab file on the hard disk in the system and I need to create a file there. I know what I need to type to do this work but cvan I change to the Disk that fstab is on ? please help

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-05-27 17:04:21 +0000

First you need to mount the disk you can do this on the terminal as root or with sudo

Will asume your root partition is on /dev/sda2 you need to figured that out first create a folder inside /mnt/ folder to mount the disk, since you are running a fedora on USB you could use a graphic tool to mount the or auto mount the disk else do as follow

sudo mkdir /mnt/mydisk

sudo mount /dev/sda2 /mnt/mydisk

once disk is mounted

cd /mnt/mydisk

with ls you should see all the folders and files from the disk so

you change to /etc

cd /etc

and usen nano or vi to edit the file you need to change.

Good luck

edit flag offensive delete link more

answered 2015-05-27 17:10:21 +0000

Orriginal gravatar image

updated 2015-05-27 17:12:39 +0000

Hard disks drives contain partitions, and each partition contain a filesystem.

In Linux and Unix there is a main filesystem called root filesystem, and indicated with /. Other filesystems (real or virtual) are mounted on the root filesystem on a mount point, i.e. an empty directory used as a start point for the specific filesystem, in such a way that all files can be reached as descendant of the root directory.

So, In plane English for novices like Me, this means that instead of changing "Drive" by uising a D: command for instance and physically moving the Target of focus to a physical disk, you simple Change directory to the "Mounted" filesystem, which by default in Fedora 21 appears to be under the /run/media/ dirctory Do not forget that you have to MOUNT the drive first either manulaly or by editting an dadding the details to the fstab file.

And to see mounted filesystems and relevenmt info you may need, type " lsblk -f " in a terminal window and see the ID of the disks. It isa the Label that you will search for in the media folder if it has been mounted using that

edit flag offensive delete link more

answered 2015-05-27 16:52:58 +0000

Matthew Cline gravatar image

I'm guessing that you want the cd command:

cd etc

If you don't know something that basic, you should read some command-line and shell tutorials.

edit flag offensive delete link more


Actaully, I think you'll find the answer is all about MOUNT and Where the file system is Mounted, usually under the /run/MEDIA folder / Directory.. buyt thanks for the tiips - The simple way of Answering this, as I just found out, is to understand the filesystems. We all had to start somewhere you know and once upon a time, YOU knew nothing either. If you ever need any help with a "Windows" - just ask and I sjhall answer politly

Orriginal ( 2015-05-27 16:58:48 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2015-05-27 16:04:56 +0000

Seen: 521 times

Last updated: May 27 '15