Bash logo — source: Pinterest Bash was written by Brian Fox for the GNU Project, to replace the Bourne Shell. It was released in 1989 and a wide number of Linux distributions uses it, so does.
- Which Linux Shell Is The Best For Macos 10
- Which Linux Shell Is The Best For Macos X
- Which Linux Shell Is The Best For Macos Download
Both Linux and Unix provides various shell out of the box. One can find bash (Bourne Again shell), ksh (Korn shell), csh (C shell)/tcsh (TC shell), sh (Bourne shell) and more installed by default. However, how do you check which shell am I using? What is the best way to find out what shell I am using on Linux? The echo $SHELL is not so reliable. This page explains how to find out which shell I am using at a Linux, MacOS, FreeBSD, or Unix-like systems.
ADVERTISEMENTS
How can I find out what shell I am using?
Aug 19, 2016 The modern-day Apple Macintosh runs a UNIX-style operating system called MacOS X where you can get at the command line by running an application called Terminal. By default, Terminal gives you the bash shell, but you can change that to give you zs. Oct 18, 2019 Click the “Login Shell” dropdown box and select “/bin/bash” to use Bash as your default shell or “/bin/zsh” to use Zsh as your default shell. Click “OK” to save your changes. Bash on macOS Is Still Outdated. Note that the version of Bash (Bourne Again SHell) included with macOS is still pretty outdated, however.
The following echo command or printf command should work:
OR
Please note that $SHELL is the shell for the current user but not necessarily the shell that is running at the moment. Try the following examples
echo '$SHELL'
OR
printf 'My current shell - %sn' '$SHELL'
Please note that $SHELL is the shell for the current user but not necessarily the shell that is running at the moment. Try the following examples
Hence, I recommend using the following syntax to check which shell you are using.
How do I check which shell am I using?
Here is another old good Unix trick. Use the ps command with -p {pid} option. The following command selects the processes whose process ID numbers appear in pid. Use the following command to find out which shell you are in:
Sample outputs:
ps -p $$
Sample outputs:
So what is a $ argument passed to the -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing, you will find the name of your shell (look for CMD column).
Sample outputs:
ps -p $$
Sample outputs:
From my Linux box:
Sample outputs:
ps -p $$
Sample outputs:
You can store your shell name in a variable as follows :
Please note those are backquotes, not apostrophes. Or better try out the following if you have a bash shell:
Another option is as follows:
OR
Sample outputs from the above commands:
MYSHELL=`ps -hp $$|awk '{echo $5}'`
Please note those are backquotes, not apostrophes. Or better try out the following if you have a bash shell:
MYSHELL=$(ps -hp $$|awk '{echo $5}')
Another option is as follows:
echo $0
OR
printf '%sn' $0
Sample outputs from the above commands:
How do I check how many shells are installed on my Linux box?
The /etc/shells is a text file which contains the full pathnames of valid login shells. Type the following [nixmd name=”cat”] to see list how many shells are installed on your Linux or Unix box:
cat /etc/shells
Okay, so when I open the Terminal app, which shell is opened by default?
Your default shell is defined in /etc/passwd file. So try the following grep command:
It looks like /bin/bash shell is my default shell. Want to change your default shell? Read “change shell in Linux or Unix” FAQ page for more info. Let us summarize all command once again.
How to check which shell am I using:
Use the following Linux or Unix commands:
- ps -p $$ – Display your current shell name reliably.
- echo '$SHELL' – Display the shell for the current user but not necessarily the shell that is running at the movement.
- echo $0 – Another reliable and simple method to get the current shell interpreter name on Linux or Unix-like systems.
- cat /etc/shells – List pathnames of valid login shells currently installed
- grep '^$USER' /etc/passwd – Print the default shell name. The default shell runs when you open a terminal window.
- chsh -s /bin/ksh – Change the shell used from /bin/bash (default) to /bin/ksh for your account
Do you want to make Ubuntu look like Mac OS X? If so, we’re going to show you how to do it, step-by-step.
The whole point of using Linux is that you can do things like this
It doesn’t matter whether you have a bad case of Apple envy, or you simply appreciate the design aesthetic of Apple’s OS; there’s nothing wrong with aping the appearance of a rival operating system.
After all, the whole point of using Linux is that you are free to do things like this — and hey: you certainly can’t make macOS look like Ubuntu!
How To Make Ubuntu Look like a Mac
A stack of mac GTK themes, icon sets, fonts and cursors are available for Linux, just a quick Google away.
The ones included below are the ones we use/think give you the best Mac-like look on your Linux box, But don’t be afraid to explore DeviantArt, GitHub and other avenues if our choices don’t quite match with your tastes.
1. Pick the Right Desktop Environment
GNOME Shell
To achieve the most Mac-like look on Linux you need to use the most appropriate desktop environment and that is GNOME Shell.
This is not a slight against other desktop environments (DEs) as Unity, Budgie, MATE and Cinnamon can all be moulded to resemble Cupertino’s computing OS too.
But GNOME Shell is the most customisable desktop environment. This is a key ask in a task like this. GNOME Shell lets you theme and re-arrange everything you need to with the least amount hackery or fuss.
If you’re using Ubuntu 18.04 LTS or later you already have everything you need to get started, so skip ahead.
But if you don’t have GNOME Shell installed on Ubuntu you will need to install it first.
This is easy. Just click the button below and follow in the on-screen prompts (select ‘lightdm’ as the display manager when asked):
You’re also going to need to the GNOME Tweaks tool in a few steps time, so install that now too:
Once both installations are complete you need to logout and select the ‘GNOME Shell’ session from the Unity Greeter:
A word on using Unity
One thing GNOME Shell can’t offer, that the Unity desktop can, is global menu support.
Now, I don’t consider this to be a negative as more and more applications use use Client Side Decorations, making the need for a global menu redundant.
But if having an omnipresent set of app menus stripped across the top of the screen is part of the Mac experience you don’t wish to lose, stick with Unity.
2. Install a Mac GTK Theme
The single easiest way to make Ubuntu look like a Mac is to install a Mac GTK theme.
Our top recommendation is the ‘macOS Mojave’ theme by Vinceluice. This is a near-enough pixel-perfect clone of Apple’s OS skin, and is available in light and dark versions. It’s one of the best designed Mac GTK themes out there (it also has a matching GNOME Shell theme).
The ‘macOS Mojave’ theme requires GNOME 3.20 or later, so you’ll need to be running Ubuntu 16.10 or later to use it.
If you’re running the older Ubuntu 16.04 LTS release you can use the competent ‘macOS Sierra’ clone created by the B00merang project:
Tip: How To Install GTK Themes
Once you download your chosen macOS theme from the link(s) above, you will need to install it.
To install themes in Ubuntu first extract the contents of the archive you downloaded, then move the folder inside to the
~/.themes
folder in your Home directory.If you do not see this folder press
Ctrl + H
to reveal hidden folders. Next, find the .themes folder or create it if it doesn’t exist. Move the extract folder mentioned above to this folder.Finally, to change theme, open
GNOME Tweak Tool > Appearance
and select your chosen theme (and the GNOME Shell theme, if you also downloaded one).3. Install a Mac Icon Set
Next grab some a Mac Icon set for Linux. A quick Google will throw up a bunch of results. Most, sadly, aren’t complete enough to function as a full icon set, so you’ll also want to use (and in some cases manually specify) a fall back icon theme like Faba, or Papirus.
To avoid all of that hassle you may wish to use the fabulous ‘La Capitaine‘ icon pack.
What’s great about La Capitaine is that it’s a proper Linux icon set, with custom macOS inspired icons for many Linux apps and not just a direct port of mac icons to Linux. It’s also totally open-source, and is available to download from Github.
How to Install Icon Themes
Once you’ve downloaded your chosen theme from the link(s) above you need to install it. To do this first extract the contents of the archive you download, then move the folder inside to the
~/.icons
folder in your Home directory.If you don’t see this folder press
Ctrl + H
to view hidden folders. Next, find the .icons folder or create it if it doesn’t exist. Move the extract folder mentioned above to this folder.Finally, to apply, open
GNOME Tweak Tool > Appearance
and select your chosen theme.4. Change the System Font
Which Linux Shell Is The Best For Macos 10
If you’ve used Mac OS X / macOS at some point in the past few years you’ll know it has clean, crisp system typography.
‘Lucida Grande’ is the familiar Mac system font, though Apple uses a system font called ‘San Franciso’ in recent releases of macOS.
A quick Google should turn up plenty more information (and links to download San Francisco font) but be aware that neither font is not licensed for distribution — so we can’t link you to it, sorry!
Thankfully there’s an open-source alternative to ‘Lucida Grande’ called Garuda. It’s even pre-installed out of the box on Ubuntu, so you don’t need to go on a font safari to find it.
Head to
GNOME Tweak Tool > Fonts
and set the ‘Windows Titles’ and ‘Interface’ fonts to Garuda Regular (or any other font you wish).If you use Unity you can use Unity Tweak Tool to change the font on Ubuntu.
5. Add a Desktop Dock
Ask people what a Mac desktop looks like and chances are they will mention its ubiqutious desktop dock. This is a combined application launcher and window switcher.
If you opted to use GNOME Shell back in Step 1 install the excellent Dash to Dock extension from the GNOME extensions site. This dock can be adjusted, tweaked and tune to look exactly like its macOS counterpart.
Dash to Dock doesn’t look very mac-ish by default so you will want to dive in to the
GNOME Tweak Tool > Extensions > Dash to Dock > Appearance
to change the colour to white, and lower the opacity.Plank Dock
If you chose to stick with the Unity desktop you can set the Unity Launcher to hide (
System Settings > Desktop > Behaviour
) and install Plank, a desktop dock, to handle app launching and window switching:Plank can be configured with all sorts of themes too, making it easy to replicate the Mac OS X experience. Gnosemite is a faithful mac Plank theme worth a look.
Which Linux Shell Is The Best For Macos X
That’s it; we’ve achieved our aim to make Ubuntu look like a Mac — now it’s your turn.
Which Linux Shell Is The Best For Macos Download
We’d love to see a screenshot of your mac-inspired creation so do feel free to share one in the comments.