Mac Os X And Unix

broken image


The history of macOS, Apple's current Mac operating system originally named Mac OS X until 2012 and then OS X until 2016, began with the company's project to replace its 'classic' Mac OS.That system, up to and including its final release Mac OS 9, was a direct descendant of the operating system Apple had used in its Macintosh computers since their introduction in 1984. Unix for Mac OS X Users unlocks the powerful capabilities of Unix that underlie Mac OS X, teaching how to use command-line syntax to perform common tasks such as file management, data entry,.

After using Macs for about fifteen years, I switched to Linux as my main operating system in July of 2018 and I'm enjoying it. Here's an introduction to Linux that may help you if you too are looking for a change.

Why switch from Mac to Linux?

My latest MacBook was four years old and was starting to feel a bit bloated and slow. It felt like a time to get a new one.

My previous three laptop purchases were all MacBooks but somehow this time it wasn't that tempting. I felt ready for a change, something different and something more aligned with my current needs.

I wasn't too locked into the Apple ecosystem. I don't have an iPhone so the integrations were not necessary for me. I didn't use iCloud, FaceTime or Siri either. If all of these are key to you, switching to Linux may not be worth it.

I used Windows before purchasing my first MacBook but returning was not in my considerations due to the state of that OS with inbuilt ads, bloat and privacy concerns.

I've never used Linux but the open source world is close to my heart. One of the tools I spend most of my time on for content publishing is WordPress and I love the passionate ecosystem it has. Linux seems very similar.

My old MacBook wasn't too compatible with Linux so I purchased a mid-range Windows machine to give Linux a try (you can even get a Linux laptop). And I got hooked fast.

The idea was to take baby steps and split my time between Mac and Linux but I quickly stopped turning on my MacBook. So it got handed down and I turned to Linux full time. I've now been running Linux exclusively for just over a year.

What are Linux distros and desktop environments?

Linux is a world of abundant choice. This can give you the freedom to do whatever you wish but it can be paralyzing to a newbie.

Linux distros

When you start learning about Linux you quickly hear all these different names that people recommend and rave about. MX, Manjaro, Mint, Ubuntu, elementary, Solus and so many more.

These all are Linux distributions (distros) or in other words, they are the different Linux operating systems. Linux, unlike Windows and Macs, doesn't only have one single OS.

There are hundreds of distros and many of them have very vocal fans explaining why such and such distro is the right one for your situation. It's amazing to have access to such a passionate community and ecosystem.

I'm here to save you some time and energy by telling you that the distro you pick doesn't matter that much. The differences are overblown, are more technical and not something you as a newbie should worry too much about.

You simply want to get your feet wet and start using Linux rather than worrying about which of the hundreds of options is the optimal one.

Linux desktop environments

A more practical difference to think about are the different desktop environments (DE) or in other words graphical user interfaces. These differ a lot in terms of aesthetics, usability, workflow and the apps they are integrated with.

There are many desktop environments too. You may hear people recommending KDE Plasma, XFCE, Cinnamon or window managers such as i3.

This means that the most important choice you have at the start of your Linux journey is to determine the desktop environment you want to try rather than what distros to run.

A look into Linux Gnome desktop environment

I've tried several desktop environments (and several distros too) and in my opinion, the Linux desktop environment people coming from macOS are most likely to enjoy and feel comfortable in is Gnome.

There are other macOS like Linux desktop environments such as Pantheon and Deepin but Gnome is the most used one and with the most resources behind it.

Gnome is the most popular Linux desktop environment and it is the default choice in most of the big distributions such as Ubuntu, Debian and Fedora.

The individual distros may do some minor alterations to Gnome. The screenshots in this post are from Debian but it will look close to this in Ubuntu, Fedora or Arch too with the only visible exceptions being the default background image and the preinstalled apps.

Here's a look at Gnome and how it works. This is pretty much how Gnome looks like after you log in:

So what do I like about Gnome coming from macOS?

It's very clean, minimal and modern. There are no distractions. There are no desktop icons. There's no visible dock. The top panel is the only thing visible other than the background image.

The panel consists of 'Activities' on the left, time and date at the center which at the same time is your notifications center and the tray icons for the network, Bluetooth, VPN, sound, brightness, battery and such on the right-hand side.

Gnome gets out of your way, it's very keyboard-centric and it just works. You'll notice some similarities with macOS such as window snapping and seeing previews of documents by hitting the space bar (exactly like Quick Look).

Gnome Activities Overview is like Mission Control and Spotlight Search in one

Dragging your mouse icon to the top left, or clicking on the 'Activities' in the top panel or pressing the 'Super key' on your keyboard (Apple key or Windows key) presents you with the 'Activities Overview'.

Activities Overview is kind of like having the macOS Mission Control and Spotlight Search on one screen.

Activities Overview gives you an overview of all the open applications and windows at the center.

On the left-hand side, you see the dock which features all your favorite applications. The dock gives you the indicator under all the open applications.

Is Mac Unix Based

On the right-hand side, you see the different spaces.

At the top center, you see the search box. As soon as you start typing the focus is on that search box. It searches applications installed, it searches the contents of the different files you have on your computer, it does calculations and so much more. Pretty much like Spotlight.

You simply start typing what you're looking for and then press enter to open the application or the file.

Preinstalled Linux applications

You can also see the list of all the installed applications (pretty much like Launchpad on Mac). Click on the 'Show Applications' icon in the dock or press Super key + A.

What can you expect in terms of applications available? You'll have a file manager (like Finder on a Mac), you'll have a text editor, you'll have a document viewer and you'll have a music player.

The default browser in most Linux distros is Firefox. The default office suite for documents, spreadsheets and presentations is LibreOffice.

Some apps may differ from distro to distro. Debian, for instance, installs some games by default as you can see in the screenshot above.

In general, Linux is very lightweight and takes very little disk space compared to macOS. Unlike macOS, it's also possible to delete any of the preinstalled apps that you don't want or need.

You'll have access to a software center too.

Gnome software center for additional apps

To update the operating system or to update, delete and install applications, you use the Software Center. There are thousands of applications available in the Software Center of your Gnome install.

For instance, there's Deja Dup which is like Time Machine and can do easy backups.

There's the Artha dictionary which allows you to quickly lookup words within apps the same way you can on a Mac.

There's GUFW which is a simple and easy to setup firewall.

You may be familiar with VLC from Mac already and it's one of the most popular media players on Linux too.

Flatpak for proprietary apps

Note that many Linux distros care about free and open-source software (see for instance Debian's Social Contract and Fedora's Mission and Foundations) so if you cannot find some of your favorite closed source tools in the software center by default, I recommend you add Flatpak.

It's a quick process to add it to your software center. It will allow you to search for and install proprietary applications such as Spotify, Slack, Zoom, Skype, Steam and others directly from the software center.

Pro Tip: It's a good idea to double check if your must-have apps are available on Linux or if there are adequate or better alternatives. Search for options on your favorite search engine or search here for applications available in Debian by default and search here for applications you can add using Flatpak.

Things you can change using Gnome settings and tweaks

Gnome preferences are split into two different sections. The main options are in 'Settings' and you have some additional options in the 'Tweaks' tool.

You get the majority of the same options as you have on macOS. It's simple to decide what notifications get to be shown on your screen, energy saver options are pretty much equal, and it's simple to turn off things such as location services. There's also a section for keyboard shortcuts that are easy to create and edit.

Here's a look at some of the settings you have access to such as to automatically empty trash, set the Night Light to make the screen warmer at specific points in a day and trackpad where you can enable things such as tap to click:

'Tweaks' tool allows you to change the look of Gnome from the default light mode to the dark mode. It also allows you to change the fonts and add any application to be launched at the startup.

There's also a world of Gnome extensions to add additional features and more customization options to your Gnome. There's, for instance, an extension to auto-hide the top panel when not in use.

Unix

Download a Linux ISO and give it a try on your hardware

My advice to you coming from macOS is to explore Gnome using either Debian or Fedora. They are large and community run distros. Either of them is a good starting point and a great introduction to the world of Linux for a Mac user.

Simply download the ISO image file from the official website. Here are the exact links for Fedora and Debian (look for the debian-live-10.X.0-amd64-gnome+nonfree.iso file in the Debian list).

Flash the ISO image file on a USB drive using Etcher (free tool available on macOS) and boot from it to try it on your computer.

On a Mac, you press the 'Option' key when the computer starts to boot using a USB. On most Windows PCs such as those from Dell, Lenovo or Acer, you press the F12 button at startup. Then you select the USB device from the boot menu.

Pro Tip: Your MacBook's hardware may not be compatible with Linux. Do try and run Linux using the USB on your hardware and see if things such as the trackpad, sound, network and webcam work before actually installing Linux. Like me, you might need to try it on a non-Apple machine.

How to install Linux Gnome using a USB

If everything works well and you're happy to go all-in Linux, the installation process is quick. Here's how to install Gnome on Debian but you will have a similar process on Ubuntu, Fedora and other distributions too:

Mac Os X Unix

In your 'Activities Overview', launch 'Install Debian'.

This will get you to the 'Welcome' page of the Calamares installer for Debian. Select your language and click on the 'Next' button.

On the 'Location' step, you can select your region and zone.

On the 'Keyboard' step, you can select your keyboard model.

On the 'Partitions' step, you should encrypt your new system to make it more secure.

Pro Tip: Note that by choosing the 'erase disk' option Gnome will be installed and whatever OS you used to have on your computer will be completely removed. Do not do this unless you're sure Linux is something you want to use as your daily driver.

On the 'Users' step, you can create your user account and password. There's also the option to log in automatically without asking for a password.

You can now review the 'Summary' page and if you're happy with everything and want to go ahead, click on 'Install'.

The install process will take few minutes and you will then be asked to remove your USB stick and restart your computer into the brand new world of Linux Gnome.

When you get more comfortable with Gnome or if you want to explore further, there's a big world of additional desktop environments and window manager opportunities out there for you. Most distros can actually run any of the desktop environments available.

Or you may just stick to Gnome if it fits your workflow, works the way you want and does what you need. It does for me. Have fun!

The UNIX Porting Guide is a first stop for UNIX developers coming to OS X. This document helps guide developers in bringing applications written for UNIX-based operating systems to OS X. It provides the background needed to understand the operating system. It touches on some of the design decisions, and it provides a listing and discussion of some of the main areas that you should be concerned with in bringing UNIX applications to OS X. It also points out some of the advanced features of OS X not available in traditional UNIX applications that you can add to your ported applications.

This document also provides an entry point for other documentation on various subjects that may be of interest if you are porting an application from a UNIX environment to OS X.

This document is an overview, not a tutorial. In many regards it is a companion to the more extensive Mac Technology Overview, but with a bias toward the UNIX developer.

This document also does not cover porting shell scripts to OS X. For more information about shell scripts and OS X, you should read Shell Scripting Primer.

Bringing UNIX Apps to OS X

The introduction of UNIX-like operating systems such as FreeBSD and Linux for personal computers was a great step in bringing the power and stability of UNIX to the mass market. Generally though, these projects were driven by power users and developers for their own use, without making design decisions that would make UNIX palatable to consumers. OS X, on the other hand, was designed from the beginning with end users in mind.

With this operating system, Apple builds its well-known strengths in simplicity and elegance of design on a UNIX-based foundation. Rather than reinventing what has already been done well, Apple is combining their strengths with the strengths brought about by many years of advancement by the UNIX community.

Who Should Read This Document?

Any UNIX developers can benefit from reading this book.

  • In-house corporate application developers

  • Commercial UNIX developers

  • Open source developers

  • Open source porters

  • Higher education faculty, staff, and students

  • Science and research developers

If you're a commercial UNIX developer, you are already familiar with other UNIX-based systems and may want to understand the differences between other systems and OS X. You might be interested in porting the GUI from an X11 environment into a native graphics environment using Carbon or Cocoa. You may also have special needs such as direct hardware access, exclusive file access guarantees, and so on.

If you're a corporate in-house developer (developing applications for internal use), you probably want to port applications with minimal code divergence.

If you're an open source developer, you might want information about how to incorporate new technologies into your software, and may be interested in GUI porting, depending on your level of interest. Alternately, you might be interested only in quickly porting code to a new platform with minimal changes so that you can easily get your changes back into the official code base. If so, you may be more likely to use compatibility shims than to use new APIs.

No matter what 'flavor' of developer you are, this book will provide information that is helpful to you and provide pointers to additional documents that may be of interest.

Important: If you are primarily interested in shell scripts and command-line compatibility, you should read Designing Scripts for Cross-Platform Deployment in Shell Scripting Primer. That document gives a more thorough overview of the shell environment in OS X, including common cross-platform compatibility issues.

Important: This document is not designed for pure Java developers. OS X has a full and robust Java 2 Platform, Standard Edition (J2SE) implementation. If you have a pure Java application already, it should run in OS X.

Organization of This Document

This document is a first stop for UNIX developers coming to OS X. It contains many links to more extensive documentation. Specific details of implementation are covered here only in cases where it is not adequately covered in other places in the documentation set.

To use this document most effectively, first read Overview of OS X to find out the basics about the Mac and to get some of the high-level information you need to begin your port. If you already have an application that builds on other UNIX-based platforms, Compiling Your Code in OS X will help you find out how to compile your code on OS X.

Most of your effort, however, should be spent towards making decisions concerning which, if any, graphical user interface to implement with your application. Choosing a Graphical Environment for Your Application helps you with this.

If you want to refactor your application to take advantage of the rich feature set of OS X, see Additional Features for examples of features available in OS X.

Once you have a complete application, read Distributing Your Application for information on getting your application to OS X users.

See Also

Developer documentation can be found at Apple's developer website at http://developer.apple.com/. This site contains reference, conceptual, and tutorial material for the many facets of development on OS X. The OS X Developer Tools CD includes a snapshot of the developer documentation, which can be searched for and viewed in Xcode's doc viewer. The man pages are also included with the OS X Developer Tools.

Apple Developer Connection (ADC) offers a variety of membership levels to help you in your development. These range from free memberships that give you access to developer software, to paid memberships that provide support incidents as well as the possibility of software seeds. More information on memberships is available at http://developer.apple.com.

Once a year in early Summer, Apple hosts the Worldwide Developers Conference (WWDC) in the San Francisco, California Bay area. This is an extremely valuable resource for developers trying to get an overall picture of OS X as well as specific implementation details of individual technologies. Information on WWDC is available on the ADC website.

Apple hosts an extensive array of public mailing lists. These are available for public subscription and searching at http://lists.apple.com. The unix-porting list is highly recommended. The darwin-dev and darwinos-users lists also offer much help but less specific to the task of porting.

In addition to Apple's own resources, many external resources exist, for example, O'Reilly's Mac DevCenter, http://www.oreillynet.com/mac/.



Copyright © 2002, 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-06-11





broken image