And you actually feel like you are using Linux, right?
And now it's showing my configuration, for example a Java location and stuff like that
It shows much more partitions. Hey guys and welcome to a new episode of Nomadic Dmitry channel
I'm very excited about this episode because today we're going to discuss the Linux
tools available for Mac and the Linux tools is not exactly the right term
because what I actually mean is that it's open source tools available for Mac
and it's like UNIX tools, Linux tools and altogether. The reason why I'm
bringing this topic is because a Mac os is especially open to the outside world
This was the system designed from the ground up to be able to use all
the advantages of the UNIX family of systems comparing to Mac
OS 9 which was completely closed down to the specific hardware and specific
vendors. It was very limited operating system in that sense.
Quite honestl, Mac OS 9 was not the best design operating system. I have a video
about the Mac OS 9 and my experience using it, so if you want go check it
out. I actually have an iMac G4 I used it on. Either way, today our topic is
Linux tools available for Mac. As you can see you guys have spent quite a while
making this presentation to make it beautiful, so if you guys like it please
consider subscribing and watching my later videos. Believe me we are going to
discuss a lot of interesting things.
I feel very passionate about this topic, so let's go
Today we're going to discuss three things basically. First of all it's
gonna be package management, to be specific we're going to discuss how
package management is done in Mac OS 10. It's interesting topic and not many
people actually discuss it those days, because what I see is that people are
usually just specifying the tools that you can use and not how you could actually
install those tools. This topic is not really discussed, so I decided why
not make overall overview video of the tools available on
the market, so you can decide for yourself. Then we are going to discuss
recommended packages to install, because there is a specific set of packages that
I specifically like to recommend. You are totally free to overview those
if you like you can even check, because there's like there's a lot of tools
available actually. This is just an example and
this is very exciting thing to discuss as well, so we'll discuss this one and
we're also gonna discuss the Mac specific commands. Guys this is
the commands that used only on the Mac, you will not find those commands on a
Linux system. We're gonna discuss this those kind of things as well, let's go
When we talk about installing Linux applications on Mac and open-source
applications of Mac there are actually multiple ways to do so
Honestly those approaches totally depend on what you're exactly
trying to achieve. Because it all comes down to one point: you just want
the application to be running and doing the specific tasks you want. You
just pick the right tools that you need. When it comes to running Linux
and UNIX app on your Mac there are five options basically. The most
common option that is used on a Mac it's installing those and those apps directly
You download open-source apps and you install it on your
machine and you run it, that's it. It may be in different flavors different
varieties of packages available but there it all comes down to one thing you
just have a binary you install it in your run it. That's it
You install it by either dragging and dropping or installing the
package. Second option is MacPorts, third option is Find, fourth option is
HomeBrew and the last option is compiling
We will talk about MacPorts, Find and HomeBrew. But talking about compiling
You can compile and run apps on your Mac like you do on Linux or Unix
There is no magic, you just compile it from the sources and it runs
Let's discuss the most popular options of package management
because installing directly and compiling well it's obvious for the most
part. Direct install: as I said basically there's no package management
here you just download the package and you install on your machine and a good
example is GIMP, you can download this and try for yourself
This is the application from the Linux community from the open-source community
and as you can see this is a screenshot from the website you can download it
it and install it directly. One thing I should just note guys is that previously
many of those apps required with X11 environment to run and X11 environment
is basically like a window management system for the Linux
operating system and then many of those apps in the past required it to be
installed on your Mac, but right now it's they try to integrate everything
into one package so you don't need to bother with all those. It actually
makes sense I mean there are advantages of this approach as well usually you see
those apps in those types it's pkg which you just install
through typical installer and the other option is dragging and dropping the application
to the Application folder which is also simple
GIMP is a regular application and it's a good example of such tools
You can try for yourself and see how it works. There is no magic at all
MacPorts. This is the option I personally used around 14 years ago
You can see a screenshot of a man page on this screen
which is a manual page for MacPorts
It's quite simple, you just install MacPorts package manually on your system
and after you installed you are able to execute command
like "port install" and this is how you install packages on your system
In many ways it's even easier then downloading the packages from the
internet, doing so something like that. Here you just type "port install [name of the app]"
DarwinPorts was the original name,
Old-time Mac users probably remember this tool or might be even still using it
It's still a relevant tool. I don't use it much
but I'm gonna tell you why. The next option is Fink. It's a bit
different, it's also a package management system and you can also
install the apps in those similar manner just type "fink install [name of the app]"
but the difference is that this one is not actively maintained
You can go on the website and see for yourself. For the recent Mac OS
versions you need to actually compile it from sources, there is no
binary installer for this one. While it's still available, even looking on the
website you can see that it does not really actively maintain. You can see
it from the UI of the website if the tool is maintained or not
This one is probably not in active development since it mentions
power PC is the main option there we can guess that it's not really a modern tool.
But it still has some very specific use cases
So if you are considering it, you can try to build something out of it
You can build it from sources, but there are other tools as I
mentioned. Package Installation process is similar you just type "fink install [name of the app]"
in the command line after you have Fink on your system and it works
The next one is a HomeBrew. This is what I use the most and this
is the one that is recommended by many developers, many advanced the users of
the Mac. You feel like you are using some variety of Linux
system basically, you type "brew install [name of the app]"
Website is modern and it has a repository search functionality
You can go to brew.sh and see for yourself
You can discover the available packages
available for your system with "brew install" command
There are also tools to fix your packages like "brew doctor"
which you can use if you have some issues with a HomeBrew package.
This command is going to examine your HomeBrew configuration and check the packages
"brew list" will show the list of installed apps. Installed packages on HomeBrew
system are called "formulas", like the name suggests it's all about making a HomeBrew's
There are multiple Brew packages available
This is the one to use on modern day Mac, this is very recent
This is like the most popular ones, so use this one if you are starting out
This my personal favorite and let's talk about the recommended packages
We discussed the tools you can use. You can pick any you like, but I would probably go with the Brew by default
What packages should you install by default?
1. Htop. This is the module I install by default
This allows me to see available memory and resources
Very good utility and makes sense to install it
2. Next one is a Midnight Commander (mc) - a file manager. In one of my videos I've mentioned that this is the type of app you install and never use
Much more beautiful tools are available that you can use, but MC takes a special place in my heart
3 Nmap - network discovery tool for system administrators
It allows to scan your network, analyze vulnerabilities and things like that
4. Gedit. Text editor from a GNOME environment
You can also install UI tools like Gedit using HomeBrew
Let's talk about Mac-specific commands
There are specific commands to explore and there are
interesting books written just about those Mac commands for those people who
are migrating from Linux to Mac these are like top-notch tools available there
The first tool allows to open a file using a specific Text Editor
I even added an alias to my ~/.bashrc file to do this action easily
You can also use gedit, of course. "gedit file.txt"
And it takes a while because it executes X11 Window management system
It indeed feels like a Linux app running in the Mac world
your Mac like how cool is that? Next we are going to discuss a "diskutil"
Let's compare actually running a Disk Utility.app vs command line
It just shows a couple of partitions in the app itself
But if you type this command line command "diskutil list"
it will show much more partitions (including EFI boot partition)
Disk Utility hides lots of partitions by default
This is confusing to many people, including myself
But command line shows all the Mac partitions, including the disk identifiers and partition scheme (GUID here)
I recommend learning more about diskutil
explore there are more options and then then what else
Mdls command is used to show file attributs
Mdfind command performs a Spotlight search
Mdutil manages specific Spotlight data. You can turn on or off indexing for the specific drives
Defaults: a command used to modify default settings for Mac Applications/System settings
It allows you to fine-tune the system the way you like, e.g show/hide hidden folders for example
Let's talk about interesting Mac OS locations
/opt/X11/bin shows X11 installed applications on your Mac
You can try launching xterm, xclock, xcalc or any other X11-app from there
As you can see it launches XQuartz in this scenario to run those apps
MacPorts binaries are located in /opt/local/bin
And you can see MacPorts apps there
whatever macports installs I have a Mac force installed I have a homebrew
Homebrew package binaries are located in /usr/local/Cellar by default
Let's run htop and see system resources available
Memory, processor, running processes, PIDs and other things are showed there
And if we type "less ~/.bashrc" we can see what's in BASH configuration file
It shows Java location, aliases I have and Android SDK locations
The "open command is not from Linux/Unix world, but rather from a NextSTEP
which became a base for Mac OS X later on (Steve Jobs worked in Next)
I hope this video was interesting, useful and you learned something new today
Please consider subscribing, press a like button
Also, what command line tools do you personally use on Mac? Write down below, it would be interesting to know
See you later!