What is dev sda in linux

Что означает / dev / sda для linux?

стоять за? Что это значит?

У меня установлены и Fedora, и Ubuntu, и если я исследую их с помощью Ext2explore из окон, я вижу следующие имена:

Пожалуйста, объясните мне, что это значит? Я имею в виду цифры там, а также /dev/sda/ .

TL; DR : это связано с тем, как linux (и все unixes) называют свои диски, во многом в том смысле, как Windows использует C :, D: и т. Д. ( ПРИМЕЧАНИЕ : это то, что мы называем метафорой. Другими словами — вопиющая ложь, которая помогает людям понять, даже не будучи даже точным. Читайте дальше для более подробного объяснения . )

/dev/ это часть в дереве каталогов unix, которая содержит все файлы «устройств» — unix традиционно рассматривает практически все, к чему вы можете обращаться, как файл для чтения или записи.

Первоначально sd идентифицировал устройство SCSI, но, благодаря широкому распространению USB (и других съемных) носителей данных, он стал универсальным для любого блочного устройства (другой термин Unix; в этом контексте, все, что способно нести данные), которое еще не было доступны через IDE. Когда появился SATA, разработчики решили, что было бы намного проще и удобнее для всех добавить его в существующую среду, а не написать совершенно новую среду.

Буква сразу после sd обозначает порядок, в котором она была впервые найдена — a, b, c . z, Aa . Az . и т. Д. (Не то чтобы в реальном мире было много ситуаций, когда 26 дискретных блоков устройств находятся на одной шине . )

Наконец, число после этого означает раздел на устройстве. Обратите внимание, что из-за довольно случайного способа обработки разделов ПК имеют только четыре «первичных» раздела, поэтому нумерация будет немного отличаться от фактического количества. Это не страшная проблема, так как основная цель схемы именования состоит в том, чтобы иметь уникальный и узнаваемый идентификатор для каждого раздела, найденного таким образом .

Так /dev/sda9 значит девятый раздел на первом диске.

Источник

Что означает /dev / sda для linux?

стоять? Что это означает?

у меня оба Fedora и Ubuntu установлен, и если я исследую их с помощью Ext2explore из windows, я вижу эти имена:

Пожалуйста, объясните мне что это значит? Я имею в виду цифры, а также /dev/sda/ .

3 ответов

TL; DR: это связано с тем, как linux (и все Unix) называют свои диски, во многом так, как windows использует C:, D: и т. д. (Примечание: это то, что мы называем метафорой. Другими словами, вопиющая ложь, которая помогает людям понять, даже отдаленно не будучи точной. Читайте дальше для более подробного объяснения. )

/dev/ — часть в дереве каталогов unix, содержащая все файлы «device» — unix традиционно обрабатывает примерно все, что вы доступ в виде файла для чтения или записи.

sd первоначально идентифицировал устройство SCSI, но с момента появления USB (и других съемных) носителей данных он стал универсальным для любого блочного устройства (другой термин unix; в этом контексте все, что способно переносить данные), которое еще не было доступно через IDE. Когда появился SATA, разработчики решили, что это будет намного проще и очень удобный для каждого к добавьте его в существующий фреймворк, а не пишите совершенно новый.

письмо сразу после sd означает порядок,в котором он был впервые найден — a,b, c. з АА. Аз. и т. д. (Не то, чтобы в реальном мире было много ситуаций, когда более 26 дискретных блочных устройств находятся на одной шине. )

Читайте также:  Проблемы при установке astra linux

наконец, число после этого обозначает раздел на устройстве. Заметьте что из-за довольно наобум шт ручка перегородки есть только четыре «основных» разделов, так что нумерация будет слегка от фактического значения. Это не страшная проблема, так как основная цель схемы именования состоит в том, чтобы иметь уникальный и узнаваемый идентификатор для каждого раздела, найденного таким образом.

Так /dev/sda9 означает девятый раздел на первом диске.

Источник

What does /dev/sda in Linux mean?

stand for? What does it mean?

I have both Fedora and Ubuntu installed and if I explore them using Ext2explore from Windows, I see these names:

Please explain to me what that means. I’m referring to the numbers and also the /dev/sda/ part.

3 Answers 3

TL;DR: It has to do with the way Linux (and other Unixes as well) name their drives, much in the way that Windows uses C:, D:, etc. (NOTE: This is what we call a metaphor. In other words, a blatant lie that helps people understand without being even remotely accurate. Read on for a more detailed explanation. )

/dev/ is the part in the Unix directory tree that contains all «device» files — Unix traditionally treats just about everything you can access as a file to read from or write to.

sd originally identified a SCSI device, but since the proliferation of USB (and other removable) data carriers, it became a catch-all for any block device (another Unix term; in this context, anything capable of carrying data) that wasn’t already accessible via IDE. When SATA came around, the developers figured it’d be much easier and much more convenient for everyone to add it into the existing framework rather than write a whole new framework.

The letter immediately after sd signifies the order in which it was first found — a,b,c. z, Aa. Az. etc. (Not that there are many situations in the real world where more than 26 discrete block devices are on the same bus. )

Finally, the number after that signifies the partition on the device. Note that because of the rather haphazard way PCs handle partitioning, there are only four «primary» partitions, so the numbering will be slightly off from the actual count. This isn’t a terrible problem as the main purpose for the naming scheme is to have a unique and recognizable identifier for each partition found in this manner.

To answer your specific question: /dev/sda9 means the ninth partition on the first drive.

Источник

What is /dev/sda in Linux?

Understanding the concept of /dev/sda in Linux is very important. Over time students have asked me, “What is /dev/sda in Linux”, here is the answer, let’s dig into it.

Table of Contents

What is Linux?

Linux is a collection of open-source Unix-type Operating systems which is based on Linux Kernel. It was first introduced by Linus Torvalds in 1991. Popular Linux distributions are – Ubuntu, Linux Mint, Fedora, Arch Linux, Kubuntu, and many more.

Files in Linux

In Linux operating systems each and everything is a file. However, there are many types of files available in Linux.

For example, Ordinary Files, Directory Files, and Device Files are file types in Linux.

  • Ordinary / General Files contains only data, in other words, it contains all the documents.
  • Directory Files contain Ordinary files as well as Directory Files.
  • Device Files contain all the device files, that is to say, it represents all the hardware devices.

What is /dev in Linux?

Before understanding the /dev/sda in Linux, you must have some knowledge about /dev.

Читайте также:  Windows disk check fat32

The front slash ‘/’ is the root in Linux and, dev is a directory file containing device files under root. The root file systems have to be present in every Linux operating system. The root file system contains all the tools to keep the system on. After the system boots up in single-user mode, this is the only file system that is available to the system administrator.

What is /dev/hda in Linux?

/dev/hda is the master IDE(Integrated Drive Electronics) drive on the primary IDE controller. Linux takes the first hard disk as a whole hard disk and it represents it by /dev/hda. The individual partitions in the disk take on names like hda1, hda2, and so forth. So, hdb is the second IDE hard disk.

What is /dev/sda in Linux?

The term sd stands for SCSI disk, that is to say, it means Small Computer System Interface disk. So, sda means the first SCSI hard disk. Likewise,/hda, the individual partition in the disk takes names as sda1, sda2, etc..

The active partition is indicated by an * in the middle column. The middle column refers to the “Status” of that particular partition. Status has two-state, Inactive, and Active.

The second hard disk will have the name /dev/sdb with the same numeric expressions.

SDA file structure

The lsblk command lists all the information about the specified block devices. The sda tree structures look like this

Watch our Explanation

To learn more about Linux simply click here.

The front slash ‘/’ is the root in Linux and, dev is a directory file containing device files under root. The root file systems have to be present in every Linux operating system. The root file system contains all the tools to keep the system on. After the system boots up in single-user mode, this is the only file system that is available to the system administrator.

/dev/hda is the master IDE(Integrated Drive Electronics) drive on the primary IDE controller. Linux takes the first hard disk as a whole hard disk and it represents it by /dev/hda. The individual partitions in the disk take on names like hda1, hda2, and so forth. So, hdb is the second IDE hard disk.

The Kernel is a collection of programs mostly written in C that directly communicate with the hardware. The Shell is actually the interface between the user and the kernel that effectively insulates the user from the knowledge of kernel functions. Read this to learn more.

In case you still have questions, contact experts from Essay Mill.

Enable FingerPrint Login in Ubuntu

File in Linux Operating System-Overview

Kernel and Shell in Linux – Simplest Explanation

12 thoughts on “ What is /dev/sda in Linux? ”

Thanks for the insight. Helpful and quality content. Cheers!

Thank you for the information. Short and enlighten.

You are welcome… Please Subscribe to get more updates.

so question is how we can use /dev/sda2 or /dev/sda3 etc we can do cd to that partition and so as we cant create any dir and files in it

They are basically your hard disk partitions, if you want to create any directory you’ll need root access.

ya i have root access i want to create directory in them sda3 so that i can add as storage to virtualizor. so can u tell me how to do it , because i tried to do /dev/sda3 i was not able to change directory to that partitions

Do you have a dual boot computer? want to mount the Windows partitions?

no i do not have dual boot computer

Читайте также:  Анонимный вход журнал windows

Sorry, can’t help with the virtualizer.
You may run nautilus from the terminal.

There is certainly a lot to know about this topic. I love all of the points you made.

your article states an inaccuracy: «Linux takes the first hard disk as a whole hard disk and it represents it by /dev/hda. The individual partitions in the disk take on names like hda1, hda2, and so forth. hd2 is the second IDE hard disk.»
But «hd2» is not the 2nd hard disk. The second hard disk is «hdb» not «hd2».
I have 2 hard disks on my linux laptop. they are named ‘sda’ and ‘sdb’. (FYI: one is a SATA drive and the other is an M.2 drive. If this were my article, i’d make a note to the audience that both SATA and M.2 fall under your ‘IDE’ category.
Writing that ‘hd2’ is the 2nd drive leads to a naming clash too:
If ‘hd2’ is the 2nd IDE hard disk, then is ‘hd211’ the 11th partition of the 2nd hard drive or is it the 1st partition of the 21st hard drive? do you see the problem with this naming scheme? this is what experienced developers learn to catch (hopefully) sooner than later before real problems & bugs develop due to poorly chosen naming schemes like ‘hd2’ for the 2nd hard drive when partition numbers are just concatenated without any separator symbol. if it were me, i think i might have named both with numbers, but used a hyphen between them: hd1-2 for the 2nd partition for the 1st hard drive. but letters for each drive might be a better naming scheme. cheers!

Источник

Is /dev/sda a file or a directory?

I want to format a flash drive as exFAT, but I want to make sure that I get the device right. So, I decided to check the contents of /dev/sda , where I believe the flash drive is. However, when I tried to cd into it, it gave me an error saying that it wasn’t a directory. So I thought «Oh, it’s a file that contains all the information about the contents of the drive.» Therefore, I tried to use Vim on it. But that gave me an error saying that it wasn’t a file!

Is /dev/sda a file or a directory? (Also, is there a better way to make sure that I’m using the correct device?)

2 Answers 2

/dev/sda is formally a file because in Unix/Linux almost everything is a file. Normally it’s a block special file associated with a block device. You can call /dev/sda a «device node». By «normally» I mean «by convention», because you can create /dev/sda as any other file type if you wish; still every user that has a clue will expect it to be a block special file.

A relatively common scenario where /dev/sdX turns out to be a regular file is after a user wrote something to this path without making sure it existed as a special file in the first place. Writing to a nonexistent path can create a regular file. Compare this answer of mine.

What Vim meant was your /dev/sda is not a regular file; cd told you it’s not a directory. It’s most likely a block special device as it should be. You can confirm this by ls -l or file . Example:

is there a better way to make sure that I’m using the correct device?

You cannot cd to /dev/sda to see its content. The device may contain one or more filesystems but to browse a filesystem you need to mount it first. Example:

This exact command will make sense if there’s a filesystem on the entire device. Usually there is a partition table; then filesystems reside in partitions referred to and mounted via /dev/sda1 , /dev/sda2 etc. Compare this question.

Источник

Оцените статью