Linux Format

Navigate the Linux filesystem

Don’t be shocked by Linux’s file management – it’s actually quite logical

-

The Linux filesystem (ext2, ext3 and ext4) is different to Windows. The key change is how it references drives and partitions: not as distinct drive letters, but as files within the main filesystem itself.

Open the Dash and type ‘disks’ to open the Disks utility to help you visualise how things work. Select a drive in the lefthand menu and look in the Disks menu bar. You’ll see your drive is referenced something like /dev/sda . This refers to the

dev (devices) folder, inside which each physical disk is assigned a unique file that begins sd (for storage device) followed by a unique letter from a through to z.

This follows a logical pattern: /dev/sda is assigned to the drive Ubuntu is installed on, with drives then allocated sdb ,

sdc and so in following the order of first, internal drives, then second, external media The logic extends to partitioni­ng, so instead of assigning partitions (or volumes) separate drive letters, Linux identifies each with individual files named sda1 ,

sda2 and so on. Partitions are represente­d in the bar chart for each drive in Disks.

Numbering isn’t always logical. If your drive is formatted using the MBR (Master Boot Record) partitioni­ng scheme, for example, you’ll notice your swap partition is allocated sda5 and not sda2 . Don’t worry – it’s all working as it should.

Accessing drives

Drives aren’t just incorporat­ed into the main filing system as individual files, they’re also mounted to specific folders within the filesystem too, which is where their contents can be found. Your main system partition (typically /dev/sda1 ) is mounted to the root directory (/) of the file system. Other internal and external volumes aren’t mounted by default, while the swap file isn’t mounted at all.

The simplest way to access your files and folders is via a file manager. Ubuntu’s default Files program is based on a tool called Nautilus, and is similar to FileExplor­er in Windows. Open it by clicking the filing cabinet icon in the Dash, and you’ll see a list of available volumes appear in the left-hand navigation pane. Click one to mount it. Click Computer in the Navigation pane to navigate to the root directory, then browse to /media/<yourname> to find folders pointing to each drive you’ve physically mounted.

It’s also possible to mount key folders on separate volumes too – for example, many Linux installati­ons set up a dedicated partition for the /home folder during the installati­on process where all your user settings and data, including such folders as Documents are stored. (Ubuntu is one of the few that doesn’t do this.)

Mount on startup

If you’d like Ubuntu to mount specific volumes at startup, then open the Disks (also Parted or Gparted ) utility. Select your drive on the left, then highlight the volume by selecting it on the bar chart. Now click the Settings button and choose Edit Mount Options. Flick the Automatic Mount Options switch to On and make sure the first two options are ticked, then change the Mount Point field to /media/<user>/label, substituti­ng user with your username and label with the volume label. Click OK, then reboot to verify the drive mounts automatica­lly.

 ??  ?? Use the Disks utility to configure volumes to mount automatica­lly when you start Ubuntu.
Use the Disks utility to configure volumes to mount automatica­lly when you start Ubuntu.
 ??  ?? Use the Disks utility to visualise how Linux identifies your drives and partitions.
Use the Disks utility to visualise how Linux identifies your drives and partitions.

Newspapers in English

Newspapers from Australia