• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

LinuxSec Blog

Linux Tutorial for Beginners

  • About Me
  • Categories
  • Linux Blog
  • Hacker News
  • Geekbench
You are here: Home / Utilities / How to Install ZSH to Replace your Bash on Linux

How to Install ZSH to Replace your Bash on Linux

October 31, 2019 by Jack Wilder Leave a Comment

How to Install ZSH to Replace your Bash on Linux. ZSH or Z Shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.

How to Install ZSH

In this tutorial i am using Ubuntu. ZSH is already on Ubuntu repository and you can install it using apt.

sudo apt update && sudo apt install zsh

Or if you are using Fedora or CentOS, run this command

sudo dnf install zsh

Next, you need to change your default shell from bash to ZSH.

chsh $(whoami) -s $(which zsh)

Logout and login again to your desktop. After you open the terminal with zsh for the first time, you need to configure the .zshrc. Choose 2 for recommended configuration. (Populate your ~/.zshrc with the configuration recommended by the system administrator and exit (you will need to edit the file by hand, if so desired).)

Ok, you already install zsh with default interface. Next i will show you how to install Oh my ZSH, a delightful, open source, community-driven framework for managing your Zsh configuration.

Install Oh my ZSH

Install OMZ using installer with curl.

curl -L https://blog.linuxsec.org/oh-my-zsh | sh

Default theme for Oh My ZSH is robbyrussell, you can update it by modifying your .zshrc.

nano ~/.zshrc

Change the value of ZSH_THEME, example

ZSH_THEME="bira"

Reload your zsh configuration.

source ~/.zshrc

And this is the result.

For all available theme for Oh my ZSH, you can check it on Oh My ZSH Wiki.

Ok. So, that’s for today. Ask me everything if you have any problem with this tutorial. And dont forget to share it if you think it is helpful. Thank you and see you in the next tutorial.

Shares

Filed Under: Utilities






Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Random Post

How to Change Root Password in Ubuntu Linux

Leave a Comment

The Future Plan for This Blog

Leave a Comment

How to Install HandBrake 1.3.0 in Ubuntu 19.10

Leave a Comment

How to Change Hostname in CentOS 8

Leave a Comment

Easier Network Scanning with NetAss2

Leave a Comment

Ads


Powered by WordPress and Genesis Framework. Style by LinuxSec.