-7

Platform: OS X: Yosemite 10.10.4; MacbookPro 15" Retina (mid-2015).

I am new to OS X, I want to explore the underlying operating system and it's Linux components especially.

Linux has standard directories, like:

/bin,
/sbin,
/home,
/var,
/tmp,
/root,
/usr,
/opt,

besides possible others.

In the terminal I don't see any of these directories them:

Leons-MacBook-Pro:~ leon$ cd ~
Leons-MacBook-Pro:~ leon$ sudo cd ~
Leons-MacBook-Pro:~ leon$ sudo ls -l
total 88
-r--------   1 leon  staff      7 Jul  1 02:34 .CFUserTextEncoding
-rw-r--r--@  1 leon  staff  12292 Jul  8 17:06 .DS_Store
drwx------  20 leon  staff    680 Jul  8 17:07 .Trash
-rw-------   1 leon  staff   4114 Jul  8 14:38 .bash_history
drwx------   9 leon  staff    306 Jul  6 02:52 .dropbox
drwxr-xr-x   5 leon  staff    170 Jul  1 11:50 .eclipse
drwxr-xr-x   5 leon  staff    170 Jul  6 15:49 .p2
-rw-r--r--   1 leon  staff      0 Jul  1 11:45 .pkglist
-rw-r--r--   1 leon  staff    979 Jul  4 11:28 .profile
-rw-r--r--   1 leon  staff    243 Jul  4 02:07 .profile.macports-saved_2015-07-04_at_03:21:55
-rw-r--r--   1 leon  staff    611 Jul  4 03:21 .profile.macports-saved_2015-07-04_at_11:28:13
drwxr-xr-x   6 leon  staff    204 Jul  4 03:33 .subversion
-rw-r--r--   1 leon  staff    691 Jul  4 12:00 .viminfo
drwx------   4 leon  staff    136 Jul  4 14:28 Applications
drwx------+  7 leon  staff    238 Jul  6 02:52 Desktop
drwx------+  6 leon  staff    204 Jul  6 03:11 Documents
drwx------+ 48 leon  staff   1632 Jul  8 17:07 Downloads
drwx------@  9 leon  staff    306 Jul  6 02:52 Dropbox
drwx------@ 51 leon  staff   1734 Jul  8 17:07 Library
drwx------+  3 leon  staff    102 Jun 30 19:47 Movies
drwx------+  4 leon  staff    136 Jul  8 17:07 Music
drwx------+  4 leon  staff    136 Jul  2 15:39 Pictures
drwxr-xr-x+  5 leon  staff    170 Jun 30 19:47 Public
drwxr-xr-x  32 leon  staff   1088 Jul  2 19:32 llvm
Leons-MacBook-Pro:~ leon$ 

Questions

Regarding terminal contents:

  1. How can I view these standard directories (provide commands/steps)?
  2. Should these directories all appear, or does OS X not include some of them?
  3. What do all files / directories starting with "." (dot) mean:

    • What does the dot mean?
    • What are the dot files used for (by what application or services)

Regarding Kernel version features and abilities:

  1. How to display OS X kernel version which is running ?

  2. Can I upgrade manually kernel version of OS X without upgrading whole OS X? If yes - please explain how?

  3. In general - what are the main differences of latest OS X and (preferably refer to) latest kernel version - from commands and features point of view? Meaning: what's in OS X "is missing" and "what extras" it has compared to standard Linux?

  • For the first part you ls'ed into your home directory( ~). Do ls -la / – tron_jones Jul 8 '15 at 15:51
  • 2
    Your question is poorly written and way to broad and outside the scope of what is expected on Stackexchange. You may want to consult stackoverflow.com/help/asking for info on how to properly "ask a question." – Allan Jul 8 '15 at 15:51
  • 1
    Your question also indicates that you have a very deficient understanding of Linux in general. This is not a bad thing and I applaud you for wanting to learn more. Please being your Linux journey by watching this video: youtu.be/_gCwCOhMcog – Allan Jul 8 '15 at 15:56
  • 1
    @Leon Kigelman, OS X is not Linux! – user3439894 Jul 8 '15 at 17:40
  • 1
    I thought I might add that there isn't an universally accepted file system standard. Linux had its FHS standard but Linux distributions do not necessarily follow it. Anyways try man hier , this will give you a general layout of the file system Darwin expects. – fd0 Jul 8 '15 at 18:05
2

OS X is UNIX based (Darwin), not Linux based, although similar that is an important distinction... OS X is very different from Ubuntu or some other Linux distro.

Regarding terminal contents:

  1. The standard directories are there, but they are in ls / (i.e. the root of the drive) not in ls ~ (the home folder of the current user).

  2. Some of the directories are different because OS X is UNIX based, but primarily because it's got a lot of custom Apple stuff sitting on top.

  3. Files and folders starting with a dot are hidden. They are used be various applications and services, it depends which one you are interested in as to the answer to your question.

Regarding Kernel version features and abilities:

  1. You can find the details of your system with uname -a in the terminal.

  2. I don't believe it is possible to modify the OS X kernel, I certainly wouldn't attempt to do so, it's unlikely to be something Apple anticipate, and software updates will likely overwrite this.

  3. I don't know.

2
  1. How can I view these standard directories (provide commands/steps)

You view directories by issuing the ls in the root directory:

cd /
ls -la
  1. Should these directories all appear, or MacOS doesn't include some of them ?

The directories ultimately don't matter. It's the application/function and where it is located that matters.

  1. What do all files / directories starting with "." (dot) mean: a) what dot means ? b) what are they used for (by what application or services) ?

The single dot (".") means current directory. The double dot ("..") means parent directory. If I wanted to copy something from one directory to the directory I am in, I would use the single dot instead of typing out the directory again. Example:

cp /some/path/on/the/system/foo.bar .

If I wanted to copy something that was any number of directories above the one I was in, I would use the notation

cp ../../../foo.bar .
  1. How to display MacOS Kernel version which is running

The exact same way you would in Linux - with uname

uname -a
Darwin Allans-iMac.home 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64  

You can also click on "About this Mac" on the GUI

About this Mac

  1. Can I upgrade manually Kernel version of MacOS without upgrading whole MacOS?

Apple does not make their kernel freely available, so the short answer is no. But, how do you update? Your App Store app will notify you when updates are available for you to install.

  1. In general - what are the main differences of latest MacOS and (preferably refer to) latest Kernel version - from commands and features point of view ?

If you would like to see the changes from one version to the next, this Wikipedia article is a good place to start

Meaning: what's in MacOS "is missing" and "what extras" it has compared to standard Linux ?

That's too broad of a question given that "Linux" is only the kernel or core of the OS and "MacOS" used in your context is referring to the whole OS. It is also too broad because there are too many different distributions of Linux from DSL, Mint, all the way to RedHat and Suse.

OS X is not Linux. OS X is based on BSD while Linux is the kernel that was developed by Linus Torvalds. Linux Distributions like RedHat, Ubuntu, Mint, or Suse are based on the Linux kernel.

Your question is like trying to figure out what is "missing" when comparing Lego to an Erector Set and all of its knock-offs.

It is advisable that you spend some time with Linux and OS X books and videos to gain a better understanding to the two operating systems.

I hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .