Let's see how we can make the Zsh shell the default interactive shell for Ubuntu Linux Operating System,
Step 1: Open Terminal and first to apt update (need to add sudo if not root user)
# apt update Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB] ... Get:17 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [879 kB] Get:18 http://ports.ubuntu.com/ubuntu-ports focal-security/multiverse arm64 Packages [3242 B] Fetched 17.1 MB in 11s (1593 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 1 package can be upgraded. Run 'apt list --upgradable' to see it.
Step2 : Now lets install zsh using command - apt install zsh
# apt install zsh Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libcap2 libgdbm6 zsh-common Suggested packages: gdbm-l10n zsh-doc The following NEW packages will be installed: libcap2 libgdbm6 zsh zsh-common 0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded. Need to get 4438 kB of archives. After this operation, 17.9 MB of additional disk space will be used. Do you want to continue? [Y/n] y .. Get:3 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 zsh-common all 5.8-3ubuntu1 [3744 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 zsh arm64 5.8-3ubuntu1 [653 kB] Fetched 4438 kB in 4s (1266 kB/s) ... Selecting previously unselected package zsh-common. Preparing to unpack .../zsh-common_5.8-3ubuntu1_all.deb ... Unpacking zsh-common (5.8-3ubuntu1) ... Selecting previously unselected package zsh. Preparing to unpack .../zsh_5.8-3ubuntu1_arm64.deb ... Unpacking zsh (5.8-3ubuntu1) ... Setting up zsh-common (5.8-3ubuntu1) ... Setting up libcap2:arm64 (1:2.32-1) ... Setting up zsh (5.8-3ubuntu1) ...
Step 3: Now use the command and you will be prompted to add the path of the shell you want to use as your Login Shell, type the path of Zsh.
# chsh Changing the login shell for root Enter the new value, or press ENTER for the default Login Shell [/bin/bash]: /usr/bin/zsh
Step 4: Close the terminal and launch again to take effect
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to zsh,
- Resolve - zsh: command not found: code
- zsh: command not found [fix] macOS
- How to fix: zsh: command not found: jupyter
- How to make ZSH as the default shell on Ubuntu
- How to Add New Entry to ZSH PATH
- Add Syntax Highlighting in Zsh Shell
- Fix: zsh: command not found: npm after installation (Node.js)
- Fix: zsh: command not found: mysql (Mac XAMPP)
- Ubuntu zsh: command not found: nano
- Fix: ZSH: cd: too many arguments (macOS)
- Fix - cd: no such file or directory: .zshrc
- How to reload zsh shell profile file?
- Fix zsh: permission denied: script.sh
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- macOS Ventura 13: The default interactive shell is now zsh
- How to Add Autocomplete in Mac Terminal
- Fix - zsh: command not found: pip
- ZSH: exec format error eclipse M1/M2 Mac
- Setting up Zsh Syntax Highlighting
- How to reload Zsh .zshrc Profile
- zsh: command not found: brew [fix]
- How to clear ZSH history of commands executed on Mac Terminal
- Fix - zsh: command not found: conda [macOS]
- Fix: cd: string not in pwd
More Posts:
- Fix Windows Update Install Error 0x80070005 - Windows
- Android Studio : Connection Error : Failed to download patch file - Android-Studio
- Fix - cd: no such file or directory: .zshrc - zsh
- [Fix] bash: script.sh: /bin/bash^M: bad interpreter: No such file or directory - Bash
- How to configure PDF iFilter for SharePoint - SharePoint
- Android Disable back button programatically - Android
- Fix: python3: Library/Developer/CommandLineTools/usr/bin/python3: No module named notebook (jupyter) - Python
- How to rename a Pandas DataFrame Column Names - Python