Why I can't find my hard disk?

10,383

Solution 1

You don't normally access your primary disk from /dev, which tends to be for specialist use.

Your primary disk is automatically mounted when you start your computer.

Your root (the equivalent of C:\ in Windows) is identified, simply, as /. All of the users' home folders (with the exception of the special user root) are stored within a folder called /home (the equivalent of C:\Users within Windows). Your own home folder will be in in your name; suppose your username is fred, then your home folder is /home/fred.

If you like the terminal, you can access these folders with the command cd and list their contents with ls. So, try these commands (ignore the bits starting with #, as they are for description only):

cd /           # Take you to the root folder.
pwd            # Show where you are right now, i.e. "/".
ls -l          # List all the folders and files within the root folder.
cd /home       # Take you to the main home folder.
ls -l          # List all the users' home folders (probably just yours).
cd ~           # The tilde is a short-cut for "/home/fred" (or whatever your username is).
               # This is also called your home folder (rather than the /home folder).
cd /home/fred  # Equivalent to the previous command.
cd             # Also equivalent to the previous command, because the default for
               #    cd is to change to your home folder.
pwd            # Show where you are right now, i.e. "/home/fred".
ls -l          # List all of your own folders and files.
ls -lA         # Again list, but include all of the hidden folders and files.
               # All hidden files and folders begin with a dot.
ls -la         # As previous, but include the two special folders "." and "..".
               # "." simply means "this folder", while ".." means the parent folder.
cd .           # Change to the current folder; i.e. do nothing.
pwd            # Still shows "/home/fred".
cd ..          # Change to the parent folder; in this case, to /home.
pwd            # Shows "/home".
mount          # View all of your mounted partitions.

If you prefer the GUI to the terminal, you can access your folders and files through the Files manager (technically called Nautilus). Click on the Files icon in your Launcher at the top right of your screen:

Files icon at the top right of your screen

This takes you straight to your home folder, where you can see all of your (unhidden) folders and files. You can toggle between viewing or hiding hidden folders and files either through the menu (View > Show Hidden Files), or by pressing Ctrl+H.

By the way…

It may be useful for you to learn the difference between disks and partitions. Windows confuses the two, calling them both "disks". /dev/sda is your primary disk, which contains various partitions numbered /dev/sda1, /dev/sda2, and so forth. The numbers do not have to be sequential.

On your installation, probably /dev/sda1 is your root, /dev/sda2 is /home, and /dev/sda5 is the Linux swap area, but the combination of mount and sudo fdisk -l (or sudo parted --list) would tell you for sure.

Solution 2

This is how you can access /dev/sdaX partitions:

sudo mount /dev/sdaX /mnt

Now go to /mnt

NOTE: I believe there is something wrong. Otherwise your partitions should be accessible from here:

enter image description here

Share:
10,383

Related videos on Youtube

user291976
Author by

user291976

Updated on September 18, 2022

Comments

  • user291976
    user291976 almost 2 years

    I have installed Ubuntu removing windows 7. Now I can't find my Hard disk drive. I tried these command.

    sudo fdisk -l
    

    It shows me there are 3 hard disk named : dev/sda1, sda2, sda5.

    But when I open dev and try to open I see that is like a text file.

    that file is sda2: block special

    I am using Ubuntu 14.04.

    • crasic
      crasic about 10 years
      No, this is one drive (sda) with three partitions (1,2,5).
  • crasic
    crasic about 10 years
    Not necessarily wrong, if NTFS driver was not installed during install, Windows drive won't be put in fstab and will not automount
  • Alexis Wilke
    Alexis Wilke over 4 years
    The /dev/sda1 / /dev/sda2 / /dev/sda5 is generally used to define a boot partition (dev/sda1—also called a primary partition), an extended partition (/dev/sda2), and a logical partition (/dev/sda5). The number 5 for the extended is because we have 4 primary (no choice). The use of an extended allows for up to 15 partitions (minus one as you have to use a primary to define the extended) instead of just 4. Today you can further break down /dev/sda5 using LVM formatting but that was not yet automatic in 14.04 (started in 16.04).
  • Paddy Landau
    Paddy Landau over 4 years
    @AlexisWilke — That information is quite dated. It's true of the older MBR device partition type. The newer (which is quite old already) GPT device partition type allows for many more partitions, with extra functionality (such as naming, corruption recovery, and larger partition sizes). For UEFI, you need GPT, and all Windows machines that use UEFI (64-bit version 7 and above) use GPT. There are, of course, other device partition types, but they aren't relevant here. Also, some devices use a different naming standard, e.g. /dev/nvme01n1p5.