Macos chsh non standard shell. Note that you need the https://brew.
Macos chsh non standard shell Apr 12, 2020 · 然后,检查当前默认Shell是否为FishShell,如果不是,使用echo $SHELL命令确认当前Shell。 接着,确保FishShell的位置已添加到/etc/shells文件中,避免遇到non-standard shell错误。 最后,使用chsh命令更改默认Shell为FishShell。 Oct 24, 2022 · fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh. It acts as a bridge between the user and the system’s services. You can change the shell that new Terminal windows and tabs open with. But Catalina replaced it with zsh. This article explodes some advantages of Fish, such as pre-installed plugins, faster and simpler setup, along with a step-by-step guide to make your migration seamless and efficient. How can I do that? I installed bash 4 on my MacBook. I really hope it is possible to change the Login shell from bash to something else. I am not exactly sure where to look for. Instructions for Windows Instructions for Mac Instructions for Linux Sep 26, 2020 · Shell 종류는 여러가지가 있는데, 그중 제가 사용해본 쉘은 ksh, bash, zsh가 있습니다. chsh is not enough to change the default shell. bash_profile (even if I give a --source or --rcfile parameter). It offers features like syntax highlighting, autosuggestions, and tab completions that are designed to make using the command line a more pleasant experience. Feb 14, 2025 · Improving your terminal productivity is the aim of every Developer and Engineer working for many hours on a Shell environment. to Fish? Dec 11, 2021 · 2 New to macOS, and I was trying to change default shell from zsh to fish, but I set wrong default shell path. app 's default shell to BASH? For some reason, my friend's Mac (10. Installing themes, plugins, setting default aliases and functions can proof to be a challenge on Bash. 6 I have read this long thread and the 10 working solutions there How to set my default shell on Mac? but nothing works for me. Sep 6, 2023 · I felt comfortable using bash shell on MacOS. Make fish the default check the fish path with which fish. Um Ihre Standard-Shell von Zsh auf Bash zu ändern, führen Sie einfach den Befehl „chsh -s /bin/bash“ im Terminal aus und öffnen Sie es erneut. Following various references I did chsh -s /bin/bash But not too happy Apr 9, 2016 · In standard linux, and in previous versions of Mac OS X, you would add a new shell like /usr/local/bin/zsh to /etc/shells, then use chsh -s /usr/local/bin/zsh to change to it. Mar 20, 2021 · When I now start fish from the default shell, it recognises all commands (like git flow init). There are several types of shells available, with Bash and Zsh being the most popular in Unix-like operating systems, including macOS. So if I do exec $SHELL it starts a fish shell not zsh. Jan 13, 2020 · Install the latest Bash shell on macOS with Homebrew and make it your default shell. It provides a user interface for executing commands, scripts, and programs. desktop files used by Gnome and KDE to identify filetypes and default actions. If the content of /etc/shells (which is governed by Jul 20, 2018 · Set up the fish shell on Mac — step by step fish shell is one of the most popular shells for terminal in Mac and Linux. Tagged with macos, cli, bash. Make sure you press Command + , while your terminal is open and change the 'Shells open with' option to 'Default login shell. Password for jiyinyiyong: chsh: /usr/local/bin/fish: non-standard shell While it works when I use the pkg which installed fish at /usr/bin/fish. When you spend a lot of time in the terminal, you can be a whole lot more productive by switching your shell to `fish`. 16 bash and/or b. In the examples below it was located at: /opt/homebrew/bin/fish. The make install command ought to do this automatically. bash is a must. Add fish to the know shells run the command: sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells' Restart your terminal Set fish as the default shell run the command: chsh -s /opt/homebrew/bin/fish Restart your terminal and check if Mar 13, 2022 · If you get a message about a non-standard shell, that means that your shell is not listed in /etc/shells. Here's what I did: brew install fish echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells chsh -s /usr/bin/fish I should have typed chsh -s /opt/homebrew/bin/fish, but I typed chsh -s /usr/bin/fish. If you get an error like chsh: /usr/local/bin/bash: non-standard shell, add /usr/local/bin/bash to /etc/shells. - Installing ZSH · ohmyzsh/ohmyzsh Wiki 以fish为例 安装 fish 修改/etc/shells文件 添加/usr/local/bin/fish 【我的文件,包含zsh、fish】 修改默认的shell. 我不想每次打开终端都重新输入fish。我想让Fish shell成为默认选项。如何在Mac上设置Fish shell为默认shell?How can I set my default shell on a Mac, e. This is the same reason you can't use . You could try setting the default shell in your user account. run the 5. If this not work due to non-standard shell error, use below commands instead. 6. Then log out and back in. It’s always better to gain some experience in the shell environment and see how things work before installing things like this. e. sudo sh -c "echo $(which zsh) >> /etc/shells" chsh -s $(which zsh) Terminal Configuration Step 1: Set a Theme We will use Dracula theme for our Terminal. Password for jr: chsh: /opt/homebrew/Cellar/bash/5. 11. The standard shells that chsh will allow users to change to (or from), without root permission, are those listed in the file /etc/shells. Actually, it doesn't set the default shell, just the one you use for that session. To change shell to zsh from bash: Jan 25, 2018 · Steps to reproduce chsh -s /usr/local/bin/pwsh Expected behavior pwsh should become your shell Actual behavior chsh: /usr/local/bin/pwsh: non-standard shell bash stays your shell because pwsh is no Nov 22, 2025 · If you’ve ever tried to use associative arrays (key-value pairs) in a Bash script on macOS Yosemite (10. Is it safe to upgrade the bash shell using Homebrew: $ brew install bash If safe, how do I make it the default instance of the shell I run The open command uses the MIME type database and the . Thankfully, switching your Mac‘s default shell from Zsh to Bash is […] 2 days ago · This post guide you to change the default shell from zsh to bash on Mac step by step. fish 's syntax is too different from Bourne shell (/bin/sh) syntax. I don’t recommend this for novices. /bin/bash /bin/csh /bin/dash /bin/ksh /bin/sh /bin/tcsh /bin/zsh /opt/homebrew/bin/bash and retry changing the shell: Scot-MBP:~ sfederman$ chsh -s /opt/homebrew/bin/bash Changing shell for Mar 21, 2012 · Note this changes the default shell used by Terminal app, which is different from the default login shell, that is changed through the following step instead… Change a User Default Login Shell in Mac OS X You can also change the default shell through the command line itself using the chsh command, which is shorthand for ‘change shell’. After changing the default shell with chsh -s /opt/homebrew/bin/fish, suddenly it won't recognise anything anymore and always gives a Unknown command. 13. profile with other non-Bourne-derived shells, such as csh and tcsh. shrc in someone's dotfiles on github. Oct 7, 2025 · Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. At this point SHELL hasn't changed to zsh because we're in the same shell session as before. Mar 30, 2023 · I switched my main shell to fish shell. Put bluntly, it's not very Mac-like. 3 with bash version 3. However, you may be feeling limited by Zsh or simply missing the familiarity of Bash from previous Linux or coding experience. But csh was still the default in Unix-based computers, and had added some non-standard features. Sep 1, 2019 · The last line tells you what the problem is: chsh: /usr/local/bin/zsh: non-standard shell. To change your default shell setting by using the shell, You can first view the /etc/shells file to note the available shells and their paths on your system. Previously, accessing fish shell from zsh shell still a Apr 11, 2020 · I have a new catalina system and need compatibility with traditional linux. x so I decided to update bash via: brew install bash Brew places the new bash under /usr/local/Cellar/bash: brew info bash bash: stable 4. Sep 7, 2013 · chsh -s /usr/local/bin/fish Changing shell for jiyinyiyong. Users & Groups System Settings > Ctrl-click on user and select Advanced Options… You can select the default shell from Dec 29, 2021 · Install zsh: brew install zsh Make zsh the default shell: chsh -s $(which zsh). This can be changed with this: brew install bash chsh -s /opt/homebrew/bin/bash However, I want to change my shell from bash to zsh. If at least one of these environments is installed, but the open command is not working, this probably means that the relevant files are installed in a non-standard location. In this guide we show you how to install Zsh and Dec 22, 2020 · How to install and configure fish shell on macOS via homebrew. without any arguments) or with the -s or --shell flag, followed by the shell path. I have tried running the following while logged in as user zol: $ chsh -s /bin/zsh $ sudo chsh -s /bin/zsh zol $ su -c 'chsh -s /bin/zsh zol' # The abo Apr 23, 2025 · 【工具推荐】——fish-shell,一款macOS好用的shell工具 🛠工具与编程 github 1 170 2025 年3 月 27 日 如何在ubuntu中通过fish使用conda 🛠工具与编程 ubuntu , conda , fish 0 21 2025 年5 月 27 日 【转载】fish-shell教程 🛠工具与编程 fish , shell 0 8 2025 年3 月 27 日 如何解决zsh: command not Aug 14, 2009 · 152 When zsh is set as a login shell on Mac OS X, when it is started by iTerm, zsh doesn't consider that it's being run as a login shell, although it's started as ‘-zsh’ (‘-’ is put as the first character of arg [0]) which is supposed to mean that it should start as a login shell. When running bash scripts inside zsh-Terminal I want it to use the homebrew bash version 4 instead of the default 3 of OS X. g. Use Dec 8, 2020 · What happened (include command output) chsh: /opt/homebrew/bin/fish: non-standard shell Command output cat73@Cats-MacBook-Pro /opt> brew install fish Initialized empty Git repository in /opt/homebrew/. com Feb 3, 2015 · When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. See full list on howtogeek. The information is formatted and supplied to an editor for changes. # Ftpd will not allow users to connect who are not using # one of these shells. Jul 11, 2018 · I still don't have fish shell added to my shells file. Jan 28, 2014 · 我想现在应该有很多人都已经使用zsh作为默认的Shell了,尤其是搭配 oh-my-zsh 之后,真是好用得飞起。 一般,我们在切换系统默认的Shell的时候,都会使用 chsh -s /bin/zsh 命令来进行修改。今天我遇到一个问题,在某台老服务器上,使用这个命令无法修改,具体原因未知。始终提示——chsh: Shell not changed I am running El Capitan 10. This can happen after installing a shell with Homebrew, which is a reasonable thing to do because you can get a newer version than the one that came with macOS. 15(1)-rel Jan 10, 2025 · What is a Shell? A shell is a command-line interpreter that allows users to interact with the operating system. Use the passwd utility instead. bashrc and . echo '/opt/homebrew/bin/ba May 27, 2024 · 关闭并重新打开终端,或者输入 echo $SHELL 来检查当前的 shell 是否已经被更改为 fish。 如果输出为 /opt/homebrew/bin/fish 或其他 fish 正确路径,说明设置成功。 Dec 27, 2023 · As a long-time Mac user, chances are you‘ve been using Zsh as your standard shell for interacting with macOS via the command line. May 8, 2022 · Set fish as the default shell: Add the shell to /etc/shells with echo /usr/local/bin/fish | sudo tee -a /etc/shells Change the default shell with chsh -s /usr/local/bin/fish Oh My Fish: Package manager for customizing the fish shell Check all the themes contained in Oh My Fish: omf theme I installed the Agnoster theme: omf install agnoster May 20, 2023 · When homebrew is installed, run brew install fish. If the change shell command didn't work, something is blocking it. Dec 19, 2018 · By default, macOS ships with `bash` as its shell prompt. Changed the login shell from Users&Groups to use /opt/bin/homebrew/bash. Die zentralen Thesen Apple verwendet jetzt Zsh als Standard-Shell unter macOS, die alte Bash-Shell ist jedoch weiterhin enthalten und leicht umschaltbar. Also includes several useful functions. Nov 19, 2024 · 更改默认 shell 后,您需要重新登录或者开启一个新的终端会话来使更改生效。 来找到 Fish shell 的完整路径。 来检查 Fish shell 是否已经安装在您的系统上。 来确认 Fish 现在是默认的 shell。 您可能需要输入您的用户密码来确认这个更改。 来查看当前的默认 shell。 The open command uses the MIME type database and the . Here is what I've tried brew install fish sudo Mar 8, 2017 · I'm new to OS X. Password for user: chsh: /usr/local/bin/nu: non-standard shell OS : MacOS Big Sur Mar 3, 2017 · Over time, lots of people fixed bugs in and added features to the C shell, culminating in an improved version of csh known as "tcsh". 16/bin/bash: non-standard shell Can anyone point out how to a. You can run chsh interactively (i. As it is, chsh throws the error: chsh: How can I change Terminal. Unix를 사용했을 때는 ksh (korn shell)을 사용했었고, ksh 많이 Changing the default shell without chsh or administrator privileges Ask Question Asked 13 years, 11 months ago Modified 7 years, 2 months ago Mar 24, 2025 · Some people prefer the latest Bash version for macOS (because /bin/bash is still a version in the 3. git/ Apr 23, 2016 · 出于安全考虑,用户的默认shell只能从这个文件里的shell列表里选,所以 /usr/local/bin/bash 是不被信任的。 只要把这个路径加在这个文件末尾就可以了,不然会报错 chsh: /usr/local/bin/bash: non-standard shell Jan 8, 2023 · Terminal Preferences are not required to set the default shell. 2. The chpass utility cannot change the user’s password on Open Directory systems. weigh in on whether the bash version is what is breaking my cp command?) Apr 17, 2023 · How to run chsh -s /bin/zsh [Re-Titled by Moderator] Oct 20, 2021 · I used the following to set my default shell chsh -s `which fish` Which works great, but many commands such as brew and npm no longer works. 42 These are applicable to macOS v10. Might want to verify the contents of /etc/shells: # List of acceptable shells for chpass(1). So let’s get into it… MacOS 1 Install brew (if you haven't Apr 26, 2025 · The latest macOS systems comes with Z Shell (Zsh) as default shell, but who still preferred to use bash can still use it by switching the default shell. Blablabla… I guess you found this page in a Google search because something with the setup didn’t work, and you don’t care why I like fish. Default shell has been changed and the computer has been restarted. 3. 5 (Sierra) (16F73) and probably some other recent and upcoming versions of macOS. – Z shell – Wikipedia Read more about ZSH at An Introduction to the Z Shell. Non-standard is defined as a shell not found in /etc/shells. The tool is designed to be run by unprivileged users. Change the default shell to Bash by running the following command: Dec 29, 2018 · Zsh, or z shell, is a popular shell alternative to bash and tcsh, complete with many improvements and customization options offered through the Oh-My-ZSH project. What opportunities are you most interested in? How many lines does your shell configuration take? This question is because I saw monstrously complex . Password for adamatan: chsh: Operation CHANGE DEFAULT SHELL 使用 chsh 语句即可将 fish 设置为默认 shell 。 Apr 17, 2015 · You can set fish as your default shell by running chsh -s $(which fish) To do so for another user, just add the username at the end of the command, and use sudo. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community. If you did chsh -s /bin/fish you would probably get chsh: /bin/fish is an invalid shell Investigating this issue (with man 1 chsh) would probably reveal the existence of /etc/shells to you. (To set it back to bash, you need to use Fish syntax of course, like this chsh -s $(which bash)) If you encounter a message saying something like: chsh: /opt/homebrew/bin/fish: non-standard shell You need to Changing shell for jr. 103 I'm trying to change the Login Shell of Mac OS X from bash to zsh. Does anyone use csh in FreeBSD 14 for a non-privileged user or even Nov 26, 2018 · I am on Mac 10. Hey, I'm unable to change my login shell to nushell chsh -s which nu Changing shell for user. The customization options and the features out of the box are also excellent. How can I switch it to use bash the right way? 🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. I'm running OS X Lion on a MacBook Pro. sh/ package manager installed on your machine. config/fish/config Aug 14, 2014 · I still am met with the error chsh: fish: non-standard shell when using chsh -s /usr/local/bin/fish When done with sudo su I get chsh: WARNING: shell 'fish' does not exist Just to confirm I can type fish and get the fish shell Nov 26, 2024 · Discover how switching from Zsh to Fish shell can enhance your productivity with faster performance, rich built-in functionality, and an user-friendly configuration experience. If you’d like to use zsh as the default shell in Terminal for Mac OS rather than bash, you can do so rather easily with taking the following steps: The open command uses the MIME type database and the . When I enter the command-line $ chsh: /usr/local/bin/fish I get this: chsh: /usr/local/bin/fish: non-standard shell I have read from the source I mentioned above that I should add fish shell to /etc/shells before I use this command-line Nov 16, 2023 · Sharing my notes on setting up the fish shell on macOS, including customizations like plugins, themes, and abbreviations. 42 ( Oct 24, 2022 · fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. Zsh offers many advantages over the standard bash shell on Mac. chsh - Nov 21, 2022 · Change to Bash Shell from the Terminal To change a user account’s default shell on macOS, simply run the chsh -s (change shell) command in a Terminal window. 1. config/fish and touch ~/. /usr/local/bin/bash) in the "Enter full path to shell" field to run it as a login shell. Oct 9, 2019 · I know Catalina uses zsh as the default login shell and interactive shell, but it is very annoying when I open iTerm. 6) defaults to using TCSH instead of BASH. So, I've a Macbook Air M2 running the latest MacOS as of this post (Sonoma 14. Within iTerm, I used homebrew to install the latest bash version (5. The location of zsh (/usr/local/bin/zsh) was not among our accepted list of locations in /etc/shells. 3, 2, 1 Sleep Crisp fonts on Alacritty Jan 17, 2019 · Note it's better to use chsh to change your login shell, instead of editing /etc/passwd by hand. I don't know if this will populate in the terminal / advanced user account locations, but "The Way This Has Worked For Years"™ in Linux-land is that you must update /etc/shells with the path to the shell location, and then use chsh -s /usr/local/bin/bash username to use it. This is how you can instal Fish on MacOS and make your default shell. 12. Nov 26, 2014 · The abover changes my default shell to ZSH, however even after starting a fresh session $SHELL is still set to /usr/local/bin/fish, my previous shell. Mar 5, 2024 · Tell about your favorite FreeBSD shell. Aug 16, 2019 · 3 Run your chsh command with sudo to make changes effective system-wide. What convinced me are the auto-suggestions and auto-completion. Nov 30, 2021 · 8 In Mac OS Catalina default interactive shell is zsh. The default shell in macOS is Bash – good but not for all terminal operations, especially as scripting environment. Note that you need the https://brew. Nov 19, 2022 · Started using Monterey. The obvious remedy is to choose /bin/bash as the command to open shells with (as below), but then it fails to load . I see it is possible in Mac OS X Leopard, but for OS X Lion I can't find a way. It covers an overview of both shells, the steps for setting them up, Sep 19, 2025 · Fish is a smart and user-friendly command line (like bash or zsh). Only the information that the user is allowed to change is displayed. I've installed homebrew and iTerm2. Jun 6, 2009 · You can also run just chsh and change the shell field. Aug 25, 2020 · A piece of friendly advice Oh My Zsh is a fun, colorful, and even productive add-on for Zsh that makes lots of changes and adds lots of scripts and functions to your Zsh environment. ' Before we jump into the installation, let‘s first motivate why Zsh is worth switching to as your default shell. Jun 8, 2023 · Missing bash shell on macOS Catalina? Here is how to set default shell to bash on the latest version of macOS Catalina/Big Sur using chsh. app or run command with /bin/bash, it shows verbose message like below: $ /bin/b Jan 31, 2016 · Run script for first time, with login shell set to bash Script bails out at some point after install zsh from Homebrew Re-run the script. David Korn from Bell Labs worked on the KornShell, or "ksh", which tried to improve the situation by being backwards-compatible with the Bourne shell's language but Apr 18, 2013 · According to this page: All Debian shell packages should insert the name of their binary into the shells file; if they do not this is a bug. 235 The correct answer should've addressed your problem: chsh: /usr/bin/zsh: non-standard shell The reason this is the case is because chsh will only accept shells that are defined in the file /etc/shells, as you can see by reading the manual for chsh: chsh will accept the full pathname of any executable file on the system. 0). While bash is certainly capable for many use cases, it lacks modern usability features and is quite rudamentary. Change the default shell in Terminal on Mac The default shell is zsh. After that, edit /etc/shells and add fish to it: # sudo edit /etc/shells Add the bottom of the file add: /opt/homebrew/bin/fish Then set the shell as default with: chsh -s /opt/homebrew/bin/fish It does require logging again to be activated. brew install bash Jul 10, 2012 · You can't. Why? Can I switch it back? If so, how? Does it make sense to do so? Any gotchas? Mar 1, 2015 · Getting the following error when trying to change your mac terminal to use zsh? chsh: /usr/local/bin/zsh: non-standard shell All you need to do to fix this is to add Apr 9, 2022 · 以上這些 shell 都是作業系統認可的標準 shell 環境, 所以當身邊的果粉嘗試使用 chsh -c 設定 Homebrew 所安裝的 zsh 時, 自然就會收到 non-standard shell 這種錯誤而無法完成設定了。 Jul 22, 2025 · To fix this I needed to add fish as an allowed shell in /etc/shells by running the following command: sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells' Then, I ran the command to change the shell again: chsh -s /opt/homebrew/bin/fish This time I did not see the message about non-standard shell so I assumed I was good. You can switch from zsh to bash on macOS Ventura, Monterey, Big Sur, and Catalina after reading. I haven't found anything regarding this issue and uninstalled fish and brew several times Jul 31, 2022 · Initial install chsh: /etc/shells: non-standard shell Like ordinary people, I started with To change your shell to Bash on a Mac, you can use the following command in the Terminal: chsh -s /bin/bash Understanding Shells on macOS A shell is a program that provides an interface for users to interact with the operating system. Choose one of the following options. It offers features like syntax highlighting, autos Nov 9, 2021 · What you've done -should- work. On older Macs the path might differ. This is mostly for my future self to reference, but just in case anyone else finds it useful, here is how I setup fish shell on macOS. 10), you may have encountered the frustrating error: `bash: declare: -A: invalid option`. use cp --backup=numbered on mac os12 (and/or c. brew install fish Add /usr/local/bin/fish to /etc/shells chsh -s /usr/local/bin/fish [Recommended] Create config directories and files: Create mkdir -p ~/. This tutorial will help you for switching between Zsh and Bash on macOS systems. x range). Aug 30, 2023 · 苹果现在在macOS上将Zsh作为默认的shell。 我们喜欢Zsh,但可靠的旧Bash shell仍然包含在macOS中,如果你更喜欢,可以快速切换回Bash。 I've tried to switch my default shell to zsh, using chsh: chsh -s /bin/zsh and: chsh -s `which zsh` Both commands ended with: Changing shell for adamatan. Jan 30, 2024 · 回归 vanilla (fish) shell 2024-01-30 tl;dr 从使用十年的 oh-my-zsh 切换到 fish shell 的完整迁移指南,包括卸载、安装、配置默认 shell、路径设置和常用别名配置的详细步骤。 原文 Back to a vanilla (fish) shell Apr 14, 2014 · In iTerm, under Preferences > Profiles > General > Command select Custom Shell from the dropdown, and put the path to your desired shell (e. It is also available on Windows 10 with the introduction of Windows Nov 19, 2025 · The Z shell (zsh) is a Unix shell []. Consider asking for more help. zejqzmezyrnlmvuqhbogicwywjeptbeyfnepjediihpdkibhanclzvreqvguhvdwvubufdjaadbbmvwnpx