Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jwolf6589

macrumors 601
Original poster
Dec 15, 2010
4,912
1,643
Colorado
Anyone got any starter websites for learning Unix on the Mac? I once was good at MSDOS so I have some background in command terminals. Thanks..
 

spainbran

macrumors member
Sep 20, 2021
74
50
Heu ....
Mac has drifted from Unix a long time ago.
The basic Unix soft included in MacOs is so outdated that it is not relevant anymore:

onf ~ > nano --version
GNU nano, version 5.9
(C) 1999-2011, 2013-2021 Free Software Foundation, Inc.
(C) 2014-2021 the contributors to nano
Compiled options: --disable-libmagic --enable-utf8
onf ~ > which -a nano
/usr/local/bin/nano
/usr/bin/nano
onf ~ > /usr/bin/nano --version
GNU nano version 2.0.6 (compiled 18:33:35, Oct 1 2021)
Email: nano@nano-editor.org Web: http://www.nano-editor.org/
Compiled options: --disable-nls --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

Install a VirtualBox with a real Linux kernel, not a black box.

Onf.
 

bsamcash

macrumors 65816
Jul 31, 2008
1,033
2,623
San Jose, CA
Install a VirtualBox with a real Linux kernel, not a black box.
OP asked for UNIX, not Linux. Not all POSIX standard operating systems are equal.

Anyone got any starter websites for learning Unix on the Mac? I once was good at MSDOS so I have some background in command terminals. Thanks..
I’m very happy to see you showing interest in this. Is it just terminal commands you’re looking to learn, or would you like to learn more about the history and philosophy of UNIX? There is a very rich history going back 50ish years.

Here is a resource from Apple’s own website.
 

jwolf6589

macrumors 601
Original poster
Dec 15, 2010
4,912
1,643
Colorado
OP asked for UNIX, not Linux. Not all POSIX standard operating systems are equal.


I’m very happy to see you showing interest in this. Is it just terminal commands you’re looking to learn, or would you like to learn more about the history and philosophy of UNIX? There is a very rich history going back 50ish years.

Here is a resource from Apple’s own website.
Just some basic commands thank you.
 

spainbran

macrumors member
Sep 20, 2021
74
50
All Posix OS's are equal.
Macos is not one of them that is all.
For a personal use, Linux is the standard, except from BSD systems which are not for every one (Which Macos was 20 years ago).

But don't learn command lines on Macos, it's like learning to walk on water, frozen 2000 years ago (You don't know if it will hold tomorrow).

Onf.
 

jwolf6589

macrumors 601
Original poster
Dec 15, 2010
4,912
1,643
Colorado
All Posix OS's are equal.
Macos is not one of them that is all.
For a personal use, Linux is the standard, except from BSD systems which are not for every one (Which Macos was 20 years ago).

But don't learn command lines on Macos, it's like learning to walk on water, frozen 2000 years ago (You don't know if it will hold tomorrow).

Onf.
You clearly did not read my OP.

"Anyone got any starter websites for learning Unix on the Mac? I once was good at MSDOS so I have some background in command terminals. Thanks.."
 

jwolf6589

macrumors 601
Original poster
Dec 15, 2010
4,912
1,643
Colorado

You‘ll find MacOS among that list. As for the rest of your post, that’s just your opinion but it doesn’t address what OP actually asked for.
Looking at the commands on that page I see Unix is similar to DOS but different. When I learned DOS it was way back in 1999 and it was then called MSDOS under Windows 3.11. I learned how to create batch files and do advanced things that I have forgotten or that are not compatible with Windows 10, or any version of Windows other than 3.11.
 

bsamcash

macrumors 65816
Jul 31, 2008
1,033
2,623
San Jose, CA
Looking at the commands on that page I see Unix is similar to DOS but different. When I learned DOS it was way back in 1999 and it was then called MSDOS under Windows 3.11. I learned how to create batch files and do advanced things that I have forgotten or that are not compatible with Windows 10, or any version of Windows other than 3.11.
One important distinction to make is that *nix operating systems can us different shells that are not all compatible. One of the most popular is Bash. I would recommend researching that.
 
  • Like
Reactions: Argoduck

probablytom

macrumors newbie
Apr 20, 2021
5
10
Good lord the pettiness on this website sometimes. I love a good forum.
I read perfectly:

If the Op wants a list of Macos commands, it is not the same as Unix commands.
Macos is a BSD derivative, nothing else.
"If the OP wants a list of linux commands, it is not the same as Unix commands. Linux is a kernel common to many popular open-source operating systems, nothing else."

What does it even mean to want to learn "unix"? OP's been very clear in that they effectively want a better understanding of terminal commands, and I think it's fair to assume — correct me if I'm wrong OP! — how to navigate the parts of a system common to most popular non-windows OSes. It sounds to me like they want a better understanding of what's under the hood and already have a mac. I really don't think they care about, say, standard-compliant PTHREAD support. They're not reviving PLAN9. Can we be realistic about their actual question, regardless of how it's phrased?

So, OP! I happen to teach university-level systems programming. It's brilliant that you want to learn these things, I think an understanding of at least some basic commands is really valuable and can give you a good insight into how the machine works under-the-hood. The terminal runs soemthing called "bash" — googling around for that will give you the commands you're looking for, and some useful guides too. When I'm teaching these things I find a good way of showing people how it works is just to be immersed in it — you'll find after you've learned a bit that most things you do graphically have a bash equivalent somewhere — so a useful thing to do might be to follow the helpful list of commands above and set yourself a task that you'll try to only use the terminal for for a while. My recommendation would be opening files.

Some quick background. You might already know these notes, but if not they're good to know. Your bash "prompt" (the bit you type into) is always at a certain place in your files, and you can navigate around and open files using commands. Another note: bash commands have a very simple structure. There are usually multiple parts separated by spaces. The first part is the "command", and everything following it is an "argument". Some commands have no arguments. If you want to know more information about a command, there's a built-in manual! Type man somecommand to know more about a command called somecommand. You can scroll with arrow keys, and q quits the manual.

Here's some useful commands to get started, although the linked page earlier in the thread is also good.

commandargumentsnotes
openany filename in your current directoryopens that file in its default application! This is like double-clicking.
cdany folder in your current directory
or
.. to go "up" a folder (into the one containing your current folder)
Means "change directory". It navigates your bash prompt "into" that directory. This is like double-clicking on a folder in Finder.
pwdNoneWill tell you your current directory (its entire path — this is every folder you'd need to double-click to get from your harddrive to your current directory.) You'll get used to this.
lsNone
or
any folder in your current directory
Stands for "list". Will tell you what's in your current directory. If you give it a folder name — anything you could ls into — it'll tell you what's in that.

Maybe these commands are too basic for you, I'm not sure what you've seen already, but the point is that you can navigate the files like you would in Finder. If you restrict yourself to just opening files using open instead of Finder / Spotlight, you'll find yourself getting more familiar with it in no time. From there, pick another task, google around how to do it in Bash, and try only doing it in Terminal for a while. You'll understand the terminal in no time!



P.S. Typing open -a <application> <file> will open your file in a specific application. <application> should be the full path to the application you want to use. Don't feel obliged to try this if it doesn't make sense yet, but if the above feels too easy, try adding this in for extra practice.
 

bsamcash

macrumors 65816
Jul 31, 2008
1,033
2,623
San Jose, CA
Good lord the pettiness on this website sometimes. I love a good forum.

"If the OP wants a list of linux commands, it is not the same as Unix commands. Linux is a kernel common to many popular open-source operating systems, nothing else."

What does it even mean to want to learn "unix"? OP's been very clear in that they effectively want a better understanding of terminal commands, and I think it's fair to assume — correct me if I'm wrong OP! — how to navigate the parts of a system common to most popular non-windows OSes. It sounds to me like they want a better understanding of what's under the hood and already have a mac. I really don't think they care about, say, standard-compliant PTHREAD support. They're not reviving PLAN9. Can we be realistic about their actual question, regardless of how it's phrased?

So, OP! I happen to teach university-level systems programming. It's brilliant that you want to learn these things, I think an understanding of at least some basic commands is really valuable and can give you a good insight into how the machine works under-the-hood. The terminal runs soemthing called "bash" — googling around for that will give you the commands you're looking for, and some useful guides too. When I'm teaching these things I find a good way of showing people how it works is just to be immersed in it — you'll find after you've learned a bit that most things you do graphically have a bash equivalent somewhere — so a useful thing to do might be to follow the helpful list of commands above and set yourself a task that you'll try to only use the terminal for for a while. My recommendation would be opening files.

Some quick background. You might already know these notes, but if not they're good to know. Your bash "prompt" (the bit you type into) is always at a certain place in your files, and you can navigate around and open files using commands. Another note: bash commands have a very simple structure. There are usually multiple parts separated by spaces. The first part is the "command", and everything following it is an "argument". Some commands have no arguments. If you want to know more information about a command, there's a built-in manual! Type man somecommand to know more about a command called somecommand. You can scroll with arrow keys, and q quits the manual.

Here's some useful commands to get started, although the linked page earlier in the thread is also good.

commandargumentsnotes
openany filename in your current directoryopens that file in its default application! This is like double-clicking.
cdany folder in your current directory
or
.. to go "up" a folder (into the one containing your current folder)
Means "change directory". It navigates your bash prompt "into" that directory. This is like double-clicking on a folder in Finder.
pwdNoneWill tell you your current directory (its entire path — this is every folder you'd need to double-click to get from your harddrive to your current directory.) You'll get used to this.
lsNone
or
any folder in your current directory
Stands for "list". Will tell you what's in your current directory. If you give it a folder name — anything you could ls into — it'll tell you what's in that.

Maybe these commands are too basic for you, I'm not sure what you've seen already, but the point is that you can navigate the files like you would in Finder. If you restrict yourself to just opening files using open instead of Finder / Spotlight, you'll find yourself getting more familiar with it in no time. From there, pick another task, google around how to do it in Bash, and try only doing it in Terminal for a while. You'll understand the terminal in no time!



P.S. Typing open -a <application> <file> will open your file in a specific application. <application> should be the full path to the application you want to use. Don't feel obliged to try this if it doesn't make sense yet, but if the above feels too easy, try adding this in for extra practice.
Perfect post.
 

jwolf6589

macrumors 601
Original poster
Dec 15, 2010
4,912
1,643
Colorado
Good lord the pettiness on this website sometimes. I love a good forum.

"If the OP wants a list of linux commands, it is not the same as Unix commands. Linux is a kernel common to many popular open-source operating systems, nothing else."

What does it even mean to want to learn "unix"? OP's been very clear in that they effectively want a better understanding of terminal commands, and I think it's fair to assume — correct me if I'm wrong OP! — how to navigate the parts of a system common to most popular non-windows OSes. It sounds to me like they want a better understanding of what's under the hood and already have a mac. I really don't think they care about, say, standard-compliant PTHREAD support. They're not reviving PLAN9. Can we be realistic about their actual question, regardless of how it's phrased?

So, OP! I happen to teach university-level systems programming. It's brilliant that you want to learn these things, I think an understanding of at least some basic commands is really valuable and can give you a good insight into how the machine works under-the-hood. The terminal runs soemthing called "bash" — googling around for that will give you the commands you're looking for, and some useful guides too. When I'm teaching these things I find a good way of showing people how it works is just to be immersed in it — you'll find after you've learned a bit that most things you do graphically have a bash equivalent somewhere — so a useful thing to do might be to follow the helpful list of commands above and set yourself a task that you'll try to only use the terminal for for a while. My recommendation would be opening files.

Some quick background. You might already know these notes, but if not they're good to know. Your bash "prompt" (the bit you type into) is always at a certain place in your files, and you can navigate around and open files using commands. Another note: bash commands have a very simple structure. There are usually multiple parts separated by spaces. The first part is the "command", and everything following it is an "argument". Some commands have no arguments. If you want to know more information about a command, there's a built-in manual! Type man somecommand to know more about a command called somecommand. You can scroll with arrow keys, and q quits the manual.

Here's some useful commands to get started, although the linked page earlier in the thread is also good.

commandargumentsnotes
openany filename in your current directoryopens that file in its default application! This is like double-clicking.
cdany folder in your current directory
or
.. to go "up" a folder (into the one containing your current folder)
Means "change directory". It navigates your bash prompt "into" that directory. This is like double-clicking on a folder in Finder.
pwdNoneWill tell you your current directory (its entire path — this is every folder you'd need to double-click to get from your harddrive to your current directory.) You'll get used to this.
lsNone
or
any folder in your current directory
Stands for "list". Will tell you what's in your current directory. If you give it a folder name — anything you could ls into — it'll tell you what's in that.

Maybe these commands are too basic for you, I'm not sure what you've seen already, but the point is that you can navigate the files like you would in Finder. If you restrict yourself to just opening files using open instead of Finder / Spotlight, you'll find yourself getting more familiar with it in no time. From there, pick another task, google around how to do it in Bash, and try only doing it in Terminal for a while. You'll understand the terminal in no time!



P.S. Typing open -a <application> <file> will open your file in a specific application. <application> should be the full path to the application you want to use. Don't feel obliged to try this if it doesn't make sense yet, but if the above feels too easy, try adding this in for extra practice.
Wow! Very impressive post. I will look at more in depth when I get home to MacBook Pro.
 

yitwail

macrumors 6502
Sep 4, 2011
427
479
Quick tip, for anyone learning *nix -- 'man' command is your friend. You can even use 'man' to get info on the 'man' command itself with
Code:
man man
Just remember, press space bar to get to the next man page, and press q to exit the command. ;)
 

spainbran

macrumors member
Sep 20, 2021
74
50
I just want to be root on my own machine ..., like on any UNIX system.
7 years without logging in to an AIX system, still shaking.

Onf.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.