How to install Unix on Mac

Hi everyone! New to Unix/Linux and this community. I'm currently in a Navy school learning Unix and I would like to practice the commands I'm learning from home. I am hoping someone can point me in the right direction to get Unix on my M1 macbook pro.
Thank you in advance.

@dirtough , welcome, your apple OS is already a unix variant - based around BSD , so unless there's specific commands (which?) not available just use that.

Apple M1 - Wikipedia.

What specific variant of unix are you learning at Navy school ?

1 Like

Yes, macOS is a Unix variant.
If your Unix course is shell commands, then open a terminal app.
In macOS the default shell is zsh. You can start another shell like bash: simply enter
bash

Thanks for the quick response. We are using VMware and Gnome 2.10.0 desktop. Hope that helps. I couldn't find any other info on the system.

@dirtough,

at a terminal type and show (copy/paste) the output of the following, tks
(ignore an errors/warnings)

uname -a
lsb_release -a
cat /etc/*-release
cat /etc/issue
cat /etc/issue.net

These do not work on macos, sorry.

MacStudio:$ cd /etc
MacStudio:$ ls -l *release*
ls: *release*: No such file or directory
MacStudio:$ ls -l *rel*
ls: *rel*: No such file or directory 
1 Like

If you are on macOS, just click on the Apple menu and the "About".... you will get a popup and then click "More Info ..."

This will give you lots of information about your system.

If you wish to get more into tech details, then click "System Report".... and you will will see all your system information.

What is important here, is the exact version of macOS you are running @dirtough ?

Thanks.

Normally on macos we set our default shell in the Terminal Settings. For example on my main mac, the shell has been set to /bin/bash and so all my new terminal screens are bash:

1 Like

Download virtualbox

@Ihattaren , why ? macos IS a Unix variant !

macOS is not only a "unix variant"; but macOS is the most popular unix operating system in the world by far due to unix on the desktop (which dominates servers by a huge number):

Desktops

macOS is not the most popular server OS; but if you look at the broader market of servers and desktops combined, macOS dominates as the leading unix OS worldwide.

macOS Sonoma 14.3.1

I think this might be the answer! Thank you!

I changed Shells open with: /bin/bash in Terminal settings and after closing and reopening Terminal I see this:

The default interactive shell is now zsh.
To update your account to use zsh, please run 'chsh -s /bin/zsh'.

Is this as it should be after the changes?

Post a clear screen shot.

Thanks

If you see the prompt for entering your commands below this message, then - yes, this is correct.
I believe it just informs you, that you're using manually selected shell bash, instead of the default shell zsh.

Yes, it is the default behavior:

But you can change it by adding the following line to ~/.bash_profile

export BASH_SILENCE_DEPRECATION_WARNING=1

Then, when you start a new terminal, you get this:

This is how my macOS profile is set up, since I use bash and not zsh.

See also the following (but I suggest you use the method I described above and not the method in the blog post below):

macos$ cat  ~/.bash_profile
export BASH_SILENCE_DEPRECATION_WARNING=1