[LINUX] Hide the warning that zsh can be used by default on Mac

<!-Hide warning that zsh can be used by default on Mac->

A warning that was not displayed before occurs

After updating to macOS Catalina, when I start bash, the following message is displayed. (I'm using fish by default)

ymmmtym@localhost ~> bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

ymmmtym@localhost:~$

Solution

From the conclusion, it was solved by adding the following to ~ / .bashrc.

~/.bashrc


export BASH_SILENCE_DEPRECATION_WARNING=1

About warning messages

Try to access the site (https://support.apple.com/ja-jp/HT208050) that was displayed obediently with the warning message.

Starting with macOS Catalina, Macs will use zsh as the default login and interactive shells. Earlier versions of macOS can also make zsh the default.

It seems that if you use something other than zsh, a warning message will be displayed.

bonus

It seems that the bash binary file is a little different only for Mac.

For Ubuntu 16.04

[email protected]:~$ strings /bin/bash |grep BASH_SILENCE_DEPRECATION_WARNING
[email protected]:~$

For Mac (macOS Catalina)

ymmmtym@localhost:~$ strings /bin/bash |grep BASH_SILENCE_DEPRECATION_WARNING
BASH_SILENCE_DEPRECATION_WARNING
ymmmtym@localhost:~$

Recommended Posts

Hide the warning that zsh can be used by default on Mac
Python standard module that can be used on the command line
[Django] About users that can be used on template
List the classes that can be referenced by ObjCClass
Goroutine (parallel control) that can be used in the field
Goroutine that can be used in the field (errgroup.Group edition)
Which octal literals can be used depends on the programming language
A timer (ticker) that can be used in the field (can be used anywhere)
About the matter that the re.compiled object can be used for the re.match pattern
File types that can be used with Go
Functions that can be used in for statements
How to install a Python library that can be used by pharmaceutical companies
Read the image posted by flask so that it can be handled by opencv
The problem that the ifconfig command cannot be used
Introduced "Glances" command, a monitoring tool that can be understood at a glance, on Mac
How to filter foreign keys that can be selected on the Django admin screen
Basic algorithms that can be used in competition pros
Python knowledge notes that can be used with AtCoder
ANTs image registration that can be used in 5 minutes
Qiita can now be viewed on the console (shell)
Deep learning course that can be crushed on site
Simple statistics that can be used to analyze the effect of measures on EC sites and codes that can be used in jupyter notebook
Install Mecab and CaboCha on ubuntu16.04LTS so that it can be used from python3 series
Explain & actually move the SMIS model that can "virtually try on clothes" by deep learning
[Django] Field names, user registration, and login methods that can be used in the User model
[Atcoder] [C ++] I made a test automation tool that can be used during the contest
How to set variables that can be used throughout the Django app-useful for templates, etc.-
Scripts that can be used when using bottle in Python
Implement a thread that can be paused by exploiting yield
I investigated the pretreatment that can be done with PyCaret
The mystery of the number that can be seen just by arranging 1s-The number of repunits and mysterious properties-
I tried to expand the database so that it can be used with PES analysis software
Understand the probabilities and statistics that can be used for progress management with a python program
About the matter that torch summary can be really used when building a model with Pytorch
Until torch-geometric can be used only with Windows (or Mac) CPU
Investigation of DC power supplies that can be controlled by Python
ZipArchive couldn't be used with the Laravel image launched by ConoHa.
Python standard input summary that can be used in competition pro
Can the Kalman filter be used to predict stock price trends?