LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   My first post to access this site. (https://www.linuxquestions.org/questions/linux-newbie-8/my-first-post-to-access-this-site-898290/)

santafos 08-19-2011 10:17 AM

My first post to access this site.
 
So here it goes.
This question has been asked countless times before I am sure but I need to post in order to begin looking up. I do things for myself if at all possible.
Short version is I have no idea what I am doing. That has never stopped me before.
My company is (work here not owner) is being eaten by a bigger fish who are not fans of the ittybittysquishey. So I am going to learn Linux. Don't know what distro so I am approaching this the same way I began learning Windows 3.1 back when my country were mere colonies. So I need first to navigate the BASH the same way I learned dos.
If I were to have two partitions in windows C:\ and D:\ on the same hard drive I would have sda1 and sda2 (solid state drives youbetcha) I can dir D:\ from c:\ but I can't seem to ls -l sda2 from root whilst on mounted sda1. These are the type of questions I have and will have. Any suggestions as where to start this learning process in short order? There seem to be an overwhelming number of resources and I have limited time to do this. Kids and a life tend to get in the way.
Looking forward to getting to know this site real well.

acid_kewpie 08-19-2011 10:48 AM

sda1 refers to the partition on a block device. in daily use of a system you would never refer to that, just the filesystem. The use of "C:" in dos / windows is an excellent example of pointless arbitrary windows conventions becoming not only accepted by taken to be good things. What on earth does "C:" mean?? how many users these days even knew what A: and B: are / were?

Under unix, all partitions are attached to a single filesystem tree. files living on sda1 may be accessible at /home whilst files on sda2 could be just at /. It doesn't matter to the operating system or the end user what lives where, just that the files are there and ready to use. so you'd never do "ls -l sda1", it doesn't work like that.

BTW, you did not need to post anythign if you didn't want to, that's only to stop people posting URL's on their first post.

SL00b 08-19-2011 11:18 AM

In Windows, any disk partition gets its own drive letter, whether it's a different physical device, or if it's merely a partition on the same device. Windows is stupid like that.

Linux improves on the process by giving you a way to tell the two apart. When you attach a physical hard drive, it'll be recognized as /dev/sda. A second one would become /dev/sdb. And so on.

Each partition on each device would get a partition number. So the first partition on /dev/sda would be /dev/sda1, then /dev/sda2, /dev/sda3, etc. The same pattern applies when you format and then partition /dev/sdb.

Once you've completed the process of formatting/partitioning your disks, you then mount them. Each partition is a filesystem, and each filesystem gets mounted somewhere along the directory tree. You pick where.

The top-level directory is root (/), and /dev/sda1 will always mount there. Typically, /dev/sda2 is your swap filesystem, so you won't go browsing that, since it's a different filesystem type altogether. The next one to mount would be /dev/sda3. You'll pick a mount point somewhere along the directory tree (someplace empty, or else you'll end up making the files under it inaccessible... sometimes that's a good idea, usually it's not what you want, though). When you want to do an ls -l of that filesystem, you do it to the mount point.

For example, if we mount /dev/sda3 at /var, then the way to browse the contents of /dev/sda3 would be:

Code:

cd /var
ls -l

Or just:

Code:

ls -l /var

frankbell 08-19-2011 07:12 PM

Here are three good references for starters:

http://linux.about.com/. It's oriented to Ubuntu, but it's full of good info.

http://tille.garrels.be/training/tldp/. Machtelt Garrels Intro to Linux.

http://www.slackbook.org/. Slackware oriented, but excellent on the basics, such as file structure, permissions, and the like.

chrism01 08-19-2011 09:40 PM

Good tutorial
http://rute.2038bug.com/index.html.gz

This a is good short read http://linux.oneandoneis2.org/LNW.htm; covers basic differences between MSWin and Linux

jefro 08-20-2011 02:55 PM

Or use a graphical way to view partitions like gparted.

santafos 08-28-2011 08:28 AM

Thank you all for the direction. The Windows/Linux transition is a little difficult having limited time but I believe this new hobby is going to be more fun than work.


All times are GMT -5. The time now is 10:17 PM.