This is a work in progress, I will be... Full Story
By Manny Fernandez
May 1, 2020
Switching back to Bash on new MacBook Pro
So I made the plunge during this coronavirus quarantine and bought the new 2020 MBP with 64GB of RAM. Mostly because of the RAM but also for the new keyboard…. but I digress. Well on my other MBP, I had upgraded from previous versions prior to macOS moving to ZSH instead of BASH. I am pushing back and will hold out as long as I can with BASH. Here is how to switch between the two. This combines other posts I have done about removing ZSH warning, and another article about removing the computer name from BASH.
Lets get started
You can change the default shell per user. By default, any new user will have the ZSH assigned to them. Since I got a new laptop, I created a new user and it got the ZSH shell. In your macOS GUI, go to System Preferences
then Users & Groups
.
You will need to unlock the security settings on the bottom left.
Obviously, when the lock is closed, the configuration is ….. you guessed it… Locked.
Once you log in, you should see the lock, unlocked.
Now you will find your user
Next, we will hit the ^ or the control key and click on the username to the left. You should see Advanced Options
, click that.
As you can see, there is a Login shell
section on this screen.
You can choose the dropdown and choose from various shells.
Once this is done and you enter into the shell, you will see Computer Name
on the screen.
You will now need to create a new file in the user home directory or ~
folder.
You will need to create the file. I use vi
but you can use your favorite text editor.
cd ~ vi .bashrc
Once there, you will need to hit the lowercase i
to edit. Enter the line below.
PS1='\u:\w\$'
Once you enter the info, hit the esc
key (Now a physical key on the new MBP) then :x
and enter
Now we will make it so the changes take effect every-time you launch the terminal.
vi .bash_profile
You will need to hit the lowercase i
again and enter the following (as above)
source ~/.bashrc export BASH_SILENCE_DEPRICATION_WARNING=1
Optional
Optionally, you run the following commands
chsh -s /bin/zsh
to change back to zsh
or chsh -s /bin/bash
to move to bash
One you run the optional command, you will need to close the terminal app and reopen it.
Hope this helps
Recent posts
-
-
I have been playing with the free version of... Full Story
-
In my day job, I am on a lot... Full Story