Let's see how we can make the Zsh shell the default interactive shell for Ubuntu Linux Operating System,
Ignore step 1 and 2 if you already have Zsh installed,
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
You would see now the default shell is zsh.
Facing issues? Have Questions? Post them here! I am happy to answer!
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
- Change Android EditText Cursor Height - Android
- Python: Append A List at the Start of Another List - Python
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW - SharePoint
- Bash command to Read, Output and Manipulate JSON File - Bash
- How to run CMD console commands in Notepad++ - NotepadPlusPlus
- How to Connect to AWS Windows EC2 UI Instance from M1 Mac (Updated) - HowTos
- How to install xz data compression software using Brew - HowTos
- How to create Jira API Token for Atlassian Account to connect Jira Cloud REST API - Jira