Where is is my C:\ disk ??

Moderators: b1o, jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9284
Joined: 14 Mar 2010, 16:34

Where is is my C:\ disk ??

Postby viking60 » 20 Dec 2016, 10:14

When you are in a command window (CMD) in windows you can see your working directory or working drive by typing

Code: Select all

cd
.
This will show you the letter of your drive (typically C:\) and your path.

To further explore the contents of your current path you can type

Code: Select all

dir
to see the contents.

cd stands for change directory or folder.

Executing the cd command with no arguments does behave different in Linux and Windows:

Windows = shows your current working folder and path
Linux = goes to your home directory
"cd" in Windows = "pwd" in Linux.

you can go "back" in both systems by typing

Code: Select all

cd ..


The one thing that Windows users will miss the most is the drive letter C:\

You will not find it in Linux.

In Linux C:\ = /

Yes - no letter; simply a slash

This takes some getting used to.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
R_Head
Berserk
Posts: 2585
Joined: 17 Mar 2010, 15:40

Re: Where is is my C:\ disk ??

Postby R_Head » 20 Dec 2016, 15:56

I know... forgot most of the commands since I do not work IT any more. Used to be good on UNIX, you know how that goes, you do not use it, you are going to loose it.

What about the B Drive... B:\ :lol:

User avatar
viking60
Über-Berserk
Posts: 9284
Joined: 14 Mar 2010, 16:34

Re: Where is is my C:\ disk ??

Postby viking60 » 20 Dec 2016, 17:26

That would be the good old slot for the diskette. :-D
I do still have it here.

This gives me the opportunity to explain how to find the storing space in Linux:

Code: Select all

lsblk

Will show all your disks:

Code: Select all

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1   1,8G  0 rom  /run/media/viking/viking,iso
fd0      2:0    1     4K  0 disk
sda      8:0    0 931,5G  0 disk
sda2   8:2    0     1K  0 part
sda5   8:5    0  48,6G  0 part /
sda1   8:1    0 484,5G  0 part
sda6   8:6    0 398,5G  0 part /home


This is probably not as intuitive as C:\ D:\ and B:\ and to confuse our Windows using friends we have to bring in something called mount point.

This shows that my "C:/" is on sda5 and that "My Documents" are on sda6 (/home)

My B:/ is on fdo and is simply called "disk".

It takes some getting used to when you come from Windows since we rarely talk about disks and partitions there.

It might be easier for our Windows using friends to type:

Code: Select all

fdisk -l

It will look like this:

Code: Select all

 fdisk -l
Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x997da8cd

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048 1016078335 1016076288 484,5G  7 HPFS/NTFS/exFAT
/dev/sda2       1016079120 1953520064  937440945   447G  5 Extended
/dev/sda5       1016080384 1117899089  101818706  48,6G 83 Linux
/dev/sda6       1117900800 1953519615  835618816 398,5G 83 Linux
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Linux education”