{"id":20157,"date":"2024-02-17T10:12:56","date_gmt":"2024-02-17T07:12:56","guid":{"rendered":"https:\/\/kifarunix.com\/?p=20157"},"modified":"2024-03-10T15:59:19","modified_gmt":"2024-03-10T12:59:19","slug":"install-zsh-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-zsh-on-ubuntu-24-04\/","title":{"rendered":"Install Zsh on Ubuntu 24.04"},"content":{"rendered":"\n<p>In this tutorial, we are going to learn how to install Zsh on Ubuntu 24.04. Zsh is a versatile UNIX shell with interactive login and script processing capabilities, closely resembling ksh but offering numerous enhancements, including command-line editing, built-in spelling correction, programmable command completion, shell functions with autoloading, a history mechanism, and various other features.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-zsh-on-ubuntu-24-04\">Installing Zsh on Ubuntu 24.04<\/a><ul><li><a href=\"#install-zsh\">Install ZSH<\/a><\/li><li><a href=\"#configure-zsh-on-ubuntu-24-04\">Configure ZSH on Ubuntu 24.04<\/a><\/li><li><a href=\"#install-oh-my-zsh-on-ubuntu-24-04\">Install Oh-my-Zsh on Ubuntu 24.04<\/a><\/li><li><a href=\"#configure-oh-my-zsh-on-ubuntu-24-04\">Configure Oh-My-Zsh on Ubuntu 24.04<\/a><ul><li><a href=\"#oh-my-zsh-theme-configuration\">Oh-My-Zsh Theme Configuration<\/a><\/li><li><a href=\"#oh-my-zsh-custom-themes\">Oh-My-ZSH Custom Themes<\/a><\/li><li><a href=\"#install-powerlevel-10-k-oh-my-zsh-theme\">Install Powerlevel10k Oh-My-Zsh Theme<\/a><\/li><\/ul><\/li><li><a href=\"#enable-oh-my-zsh-plugins-on-ubuntu-24-04\">Enable Oh-My-Zsh Plugins on Ubuntu 24.04<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-zsh-on-ubuntu-24-04\">Installing Zsh on Ubuntu 24.04<\/h2>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"http:\/\/zsh.sourceforge.net\/\" target=\"_blank\">Z shell<\/a>&nbsp;(ZSH) Zsh is a UNIX command interpreter (shell) usable as an interactive login shell and as a shell script command processor. It incorporates features of other shells such as Bash, tcsk, ksh. Some of the features include;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Smart command TAB auto-completion<\/li>\n\n\n\n<li>Improved variable\/array handling<\/li>\n\n\n\n<li>Spelling correction<\/li>\n\n\n\n<li>Enables sharing of command history among all running shells<\/li>\n\n\n\n<li>Editing of multi-line commands in a single buffer<\/li>\n\n\n\n<li>It is highly customization<\/li>\n<\/ul>\n\n\n\n<p>Zsh configuration is managed by&nbsp;a delightful, open source and community-driven framework&nbsp;called&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/robbyrussell\/oh-my-zsh\" target=\"_blank\"><strong>Oh My Zsh<\/strong><\/a>. Oh My Zsh comes bundled with a ton of functions, helpers, plugins and themes that can be used to spice your shell experience.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-zsh\">Install ZSH<\/h3>\n\n\n\n<p>In order to install Zsh, there are a few tools we will need. These include <code>wget<\/code>, <code>curl<\/code> and <code>git<\/code>. They can be installed by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install wget curl git -y<\/code><\/pre>\n\n\n\n<p>ZSH is available on the default Ubuntu 24.04 default repos. Thus to install it and its required dependencies, run  the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install zsh<\/code><\/pre>\n\n\n\n<p>To check installed version of ZSH;<\/p>\n\n\n\n<p>Command output<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zsh 5.9 (x86_64-ubuntu-linux-gnu)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-zsh-on-ubuntu-24-04\">Configure ZSH on Ubuntu 24.04<\/h3>\n\n\n\n<p>You can begin by changing your default shell to zsh. Replace <strong>kifarunix<\/strong> with your username.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -s $(which zsh) kifarunix<\/code><\/pre>\n\n\n\n<p>If you are logged in on a shell as a standard user, simply change your shell by running;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chsh -s $(which zsh)<\/code><\/pre>\n\n\n\n<p>If you do not have enough privileges to run <code>chsh<\/code> or <code>usermod<\/code> command, simply check suggestions listed <a href=\"https:\/\/unix.stackexchange.com\/questions\/136423\/making-zsh-default-shell-without-root-access\/136426\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>&nbsp;or&nbsp;<a href=\"http:\/\/zsh.sourceforge.net\/FAQ\/zshfaq01.html#16\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> on how to change shell as non-privileged user. Not sure it&#8217;s gonna work.<\/p>\n\n\n\n<p>Close the current terminal and open a new one to use your new shell.<\/p>\n\n\n\n<p>If this doesn&#8217;t work, simply logout and re-login. Once logged in, open a terminal. You will be prompted to set your Zsh start up files. See the screenshot below;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/setup-zsh-startup-files.png&quot;,&quot;figureClassNames&quot;:&quot;aligncenter size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20160&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1266,&quot;targetHeight&quot;:700,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image: Install Zsh on Ubuntu 24.04&quot;,&quot;alt&quot;:&quot;Install Zsh on Ubuntu 24.04&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"700\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/setup-zsh-startup-files.png?v=1708153543\" alt=\"Install Zsh on Ubuntu 24.04\" class=\"wp-image-20160\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/setup-zsh-startup-files.png?v=1708153543 1266w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/setup-zsh-startup-files-768x425.png?v=1708153543 768w\" sizes=\"(max-width: 1266px) 100vw, 1266px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image: Install Zsh on Ubuntu 24.04\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<p>To populate your&nbsp;<code>~\/.zshrc<\/code>&nbsp;with the default configuration settings, select option 2.<\/p>\n\n\n\n<p>You will immediately see changes on the appearance of your shell prompts.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/default-appearance-zsh.png&quot;,&quot;figureClassNames&quot;:&quot;aligncenter size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20161&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1183,&quot;targetHeight&quot;:714,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image&quot;,&quot;alt&quot;:&quot;&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1183\" height=\"714\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/default-appearance-zsh.png?v=1708153570\" alt=\"\" class=\"wp-image-20161\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/default-appearance-zsh.png?v=1708153570 1183w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/default-appearance-zsh-768x464.png?v=1708153570 768w\" sizes=\"(max-width: 1183px) 100vw, 1183px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<p>To confirm the current shell;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo $SHELL<\/code><\/pre>\n\n\n\n<p>Command output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/bin\/zsh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-oh-my-zsh-on-ubuntu-24-04\">Install Oh-my-Zsh on Ubuntu 24.04<\/h3>\n\n\n\n<p>To be able to customize the appearance of your ZSH, you need the oh-my-zsh framework which can be installed by either using the <code>curl<\/code>&nbsp;or&nbsp;<code>wget<\/code>&nbsp;commands as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sh -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/robbyrussell\/oh-my-zsh\/master\/tools\/install.sh)\"<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sh -c \"$(wget https:\/\/raw.githubusercontent.com\/robbyrussell\/oh-my-zsh\/master\/tools\/install.sh -O -)\"<\/code><\/pre>\n\n\n\n<p>Upon installation, you will see yet another change in the appearance of your terminal.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/install-oh-my-zsh-ubuntu.png&quot;,&quot;figureClassNames&quot;:&quot;aligncenter size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20162&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1173,&quot;targetHeight&quot;:681,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image&quot;,&quot;alt&quot;:&quot;&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1173\" height=\"681\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/install-oh-my-zsh-ubuntu.png?v=1708153588\" alt=\"\" class=\"wp-image-20162\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/install-oh-my-zsh-ubuntu.png?v=1708153588 1173w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/install-oh-my-zsh-ubuntu-768x446.png?v=1708153588 768w\" sizes=\"(max-width: 1173px) 100vw, 1173px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-oh-my-zsh-on-ubuntu-24-04\">Configure Oh-My-Zsh on Ubuntu 24.04<\/h3>\n\n\n\n<p>Want the \u201coh-my-zsh\u201d feeling, right? Proceed to configure it.<\/p>\n\n\n\n<p>The Oh-my-Zsh configuration files are located under&nbsp;<code>$HOME\/.oh-my-zsh\/<\/code>&nbsp;directory. Note that ZSH config file is <code>$HOME\/.zshrc<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"oh-my-zsh-theme-configuration\">Oh-My-Zsh Theme Configuration<\/h4>\n\n\n\n<p>Oh-My-Zsh themes are located under <code>$HOME\/.oh-my-zsh\/themes\/<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1 $HOME\/.oh-my-zsh\/themes\/<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>3den.zsh-theme\nadben.zsh-theme\naf-magic.zsh-theme\nafowler.zsh-theme\nagnoster.zsh-theme\nalanpeabody.zsh-theme\namuse.zsh-theme\napple.zsh-theme\narrow.zsh-theme\naussiegeek.zsh-theme\navit.zsh-theme\nawesomepanda.zsh-theme\nbira.zsh-theme\nblinks.zsh-theme\nbureau.zsh-theme\ncandy-kingdom.zsh-theme\ncandy.zsh-theme\nclean.zsh-theme\ncloud.zsh-theme\ncrcandy.zsh-theme\ncrunch.zsh-theme\ncypher.zsh-theme\ndallas.zsh-theme\ndarkblood.zsh-theme\ndaveverwer.zsh-theme\ndieter.zsh-theme\ndogenpunk.zsh-theme\ndpoggi.zsh-theme\ndstufft.zsh-theme\ndst.zsh-theme\nduellj.zsh-theme\neastwood.zsh-theme\nedvardm.zsh-theme\nemotty.zsh-theme\nessembeh.zsh-theme\nevan.zsh-theme\nfino-time.zsh-theme\nfino.zsh-theme\nfishy.zsh-theme\nflazz.zsh-theme\nfletcherm.zsh-theme\nfox.zsh-theme\nfrisk.zsh-theme\nfrontcube.zsh-theme\nfunky.zsh-theme\nfwalch.zsh-theme\ngallifrey.zsh-theme\ngallois.zsh-theme\ngaryblessington.zsh-theme\ngentoo.zsh-theme\ngeoffgarside.zsh-theme\ngianu.zsh-theme\ngnzh.zsh-theme\ngozilla.zsh-theme\nhalf-life.zsh-theme\nhumza.zsh-theme\nimajes.zsh-theme\nintheloop.zsh-theme\nitchy.zsh-theme\njaischeema.zsh-theme\njbergantine.zsh-theme\njispwoso.zsh-theme\njnrowe.zsh-theme\njonathan.zsh-theme\njosh.zsh-theme\njreese.zsh-theme\njtriley.zsh-theme\njuanghurtado.zsh-theme\njunkfood.zsh-theme\nkafeitu.zsh-theme\nkardan.zsh-theme\nkennethreitz.zsh-theme\nkiwi.zsh-theme\nkolo.zsh-theme\nkphoen.zsh-theme\nlambda.zsh-theme\nlinuxonly.zsh-theme\nlukerandall.zsh-theme\nmacovsky-ruby.zsh-theme\nmacovsky.zsh-theme\nmaran.zsh-theme\nmgutz.zsh-theme\nmh.zsh-theme\nmichelebologna.zsh-theme\nmikeh.zsh-theme\nmiloshadzic.zsh-theme\nminimal.zsh-theme\nmira.zsh-theme\nmlh.zsh-theme\nmortalscumbag.zsh-theme\nmrtazz.zsh-theme\nmurilasso.zsh-theme\nmuse.zsh-theme\nnanotech.zsh-theme\nnebirhos.zsh-theme\nnicoulaj.zsh-theme\nnorm.zsh-theme\nobraun.zsh-theme\noldgallois.zsh-theme\npeepcode.zsh-theme\nphilips.zsh-theme\npmcgee.zsh-theme\npygmalion-virtualenv.zsh-theme\npygmalion.zsh-theme\nrandom.zsh-theme\nre5et.zsh-theme\nrefined.zsh-theme\nrgm.zsh-theme\nristo.zsh-theme\nrixius.zsh-theme\nrkj-repos.zsh-theme\nrkj.zsh-theme\nrobbyrussell.zsh-theme\nsammy.zsh-theme\nsimonoff.zsh-theme\nsimple.zsh-theme\nskaro.zsh-theme\nsmt.zsh-theme\nSoliah.zsh-theme\nsonicradish.zsh-theme\nsorin.zsh-theme\nsporty_256.zsh-theme\nsteeef.zsh-theme\nstrug.zsh-theme\nsunaku.zsh-theme\nsunrise.zsh-theme\nsuperjarin.zsh-theme\nsuvash.zsh-theme\ntakashiyoshida.zsh-theme\nterminalparty.zsh-theme\ntheunraveler.zsh-theme\ntjkirch_mod.zsh-theme\ntjkirch.zsh-theme\ntonotdo.zsh-theme\ntrapd00r.zsh-theme\nwedisagree.zsh-theme\nwezm+.zsh-theme\nwezm.zsh-theme\nwuffers.zsh-theme\nxiong-chiamiov-plus.zsh-theme\nxiong-chiamiov.zsh-theme\nys.zsh-theme\nzhann.zsh-theme\n<\/code><\/pre>\n\n\n\n<p>To change the ZSH theme, open the configuration file, <code>$HOME\/.zshrc<\/code>, and set the value of&nbsp;<code>ZSH_THEME=<\/code>&nbsp;to the name of your preferred theme.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim $HOME\/.zshrc<\/code><\/pre>\n\n\n\n<p><code>robbyrussel<\/code>&nbsp;is the default theme for ZSH.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\n# Set name of the theme to load --- if set to \"random\", it will\n# load a random theme each time oh-my-zsh is loaded, in which case,\n# to know which specific one was loaded, run: echo $RANDOM_THEME\n# See https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/Themes\n<strong>ZSH_THEME=\"robbyrussell\"<\/strong>\n...\n<\/code><\/pre>\n\n\n\n<p>To change the theme, simply get the name of the theme from <code>$HOME\/.oh-my-zsh\/themes\/<\/code> and replace <strong><code>robbyrussell<\/code><\/strong> with it.<\/p>\n\n\n\n<p>Before you can change to a theme, you can <a href=\"https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/Themes\" target=\"_blank\" rel=\"noreferrer noopener\">preview them here<\/a>.<\/p>\n\n\n\n<p>For example, to change the theme to <code>gnzh<\/code> theme, <code><strong>$HOME\/.oh-my-zsh\/themes\/gnzh.zsh-theme<\/strong><\/code>, update the ZSH_THEME line so it look like;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>ZSH_THEME=\"gnzh\"<\/strong><\/code><\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<p>Reload the&nbsp;<code>~\/.zshrc<\/code>&nbsp;to effect the changes everytime you make changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.zshrc<\/code><\/pre>\n\n\n\n<p>This is how <code>gnzh<\/code> theme looks like;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/change-zsh-theme.png&quot;,&quot;figureClassNames&quot;:&quot;aligncenter size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20163&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1229,&quot;targetHeight&quot;:711,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image&quot;,&quot;alt&quot;:&quot;&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1229\" height=\"711\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/change-zsh-theme.png?v=1708153619\" alt=\"\" class=\"wp-image-20163\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/change-zsh-theme.png?v=1708153619 1229w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/change-zsh-theme-768x444.png?v=1708153619 768w\" sizes=\"(max-width: 1229px) 100vw, 1229px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<p>Want to use multiple selected themes randomly? Edit the <code>$HOME\/.zshrc<\/code> and set the theme to <strong><code>random<\/code><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>ZSH_THEME=\"random\"<\/strong><\/pre>\n\n\n\n<p> Then, define the themes to use in a random manner as in;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ZSH_THEME_RANDOM_CANDIDATES=( \"gnzh\" \"agnoster\" \"robbyrussel\" )<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"oh-my-zsh-custom-themes\">Oh-My-ZSH Custom Themes<\/h4>\n\n\n\n<p>There are also other <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/External-themes\" target=\"_blank\">external ohmyzsh themes<\/a> that you can check on. Custom themes can be installed on <code>$ZSH_CUSTOM<\/code> directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo $ZSH_CUSTOM<\/code><\/pre>\n\n\n\n<p>Command output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>$HOME\/.oh-my-zsh\/custom<\/strong><\/code><\/pre>\n\n\n\n<p>For example, let us try Powerlevel10k.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-powerlevel-10-k-oh-my-zsh-theme\">Install Powerlevel10k Oh-My-Zsh Theme<\/h4>\n\n\n\n<p>To install and use Powerlevel10k theme, you first need to install the recommended font, <code><strong>Meslo Nerd Font patched for Powerlevel10k<\/strong><\/code>.<\/p>\n\n\n\n<p>Download <code><strong>Meslo Nerd Font patched for Powerlevel10k<\/strong><\/code> fonts;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd $HOME\/Downloads<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/romkatv\/powerlevel10k-media\/raw\/master\/MesloLGS%20NF%20Regular.ttf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/romkatv\/powerlevel10k-media\/raw\/master\/MesloLGS%20NF%20Bold.ttf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/romkatv\/powerlevel10k-media\/raw\/master\/MesloLGS%20NF%20Italic.ttf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/romkatv\/powerlevel10k-media\/raw\/master\/MesloLGS%20NF%20Bold%20Italic.ttf<\/code><\/pre>\n\n\n\n<p>To install the fonts, create a <code>.fonts<\/code> directory in your home directory if it doesn&#8217;t already exist:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91; -d ~\/.fonts ] || mkdir ~\/.fonts<\/code><\/pre>\n\n\n\n<p>Copy all the downloaded fonts to the fonts directory created above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp ~\/Downloads\/*.ttf ~\/.fonts\/<\/code><\/pre>\n\n\n\n<p>Refresh the font cache for your user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fc-cache -f -v ~\/.fonts<\/code><\/pre>\n\n\n\n<p>Now, the TrueType font should be available for use by applications for your user only<\/p>\n\n\n\n<p>Next, configure your terminal to use Powerlevel10k <code>MesloLGS NF<\/code>&nbsp;font. Each type of terminal has a different way in which it can be configured to use this theme.<\/p>\n\n\n\n<p>For example, to configure GNOME terminal to use this font;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Right click anywhere on the terminal and select Preferences.<\/li>\n\n\n\n<li>On the selected profile, under&nbsp;<code>Profiles,<\/code> check&nbsp;<code>Custom font<\/code>&nbsp;under&nbsp;<code>Text Appearance<\/code>&nbsp;and select&nbsp;<code>MesloLGS NF Regular<\/code>.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/zsh-powerlevel10-fonts.png&quot;,&quot;figureClassNames&quot;:&quot;alignright size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-11785&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1026,&quot;targetHeight&quot;:696,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image&quot;,&quot;alt&quot;:&quot;&quot;}\" data-wp-interactive=\"core\/image\" class=\"alignright size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1026\" height=\"696\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-powerlevel10-fonts.png\" alt=\"\" class=\"wp-image-11785\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-powerlevel10-fonts.png?v=1646245766 1026w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-powerlevel10-fonts-768x521.png?v=1646245766 768w\" sizes=\"(max-width: 1026px) 100vw, 1026px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>Once you set the theme, close the Preferences window.<\/li>\n<\/ul>\n\n\n\n<p>For some terminals, you have to close them and open them again to be able to see the fonts.<\/p>\n\n\n\n<p>Once that is done, you can then download and install Powerlevel10k oh-my-zsh theme by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone --depth=1 https:\/\/github.com\/romkatv\/powerlevel10k.git $ZSH_CUSTOM\/themes\/powerlevel10k<\/code><\/pre>\n\n\n\n<p>Once Powerlevel10k theme is in place, edit the Zsh configuration file, <code>$HOME\/.zshrc<\/code>, and change the theme to <code>powerlevel10k\/powerlevel10k<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim $HOME\/.zshrc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n# ZSH_THEME=\"robbyrussell\"\n# ZSH_THEME=\"gnzh\"\n<strong>ZSH_THEME=\"powerlevel10k\/powerlevel10k\"<\/strong><\/code><\/pre>\n\n\n\n<p>Save and exit the Zsh configuration then reload the configs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.zshrc<\/code><\/pre>\n\n\n\n<p>Upon reloading Zsh configs, Powerlevel10k&nbsp;configuration wizard&nbsp;will ask a few questions so as to configure your prompt.<\/p>\n\n\n\n<p>Answer the questions appropriately. Choose how you want your shell prompt to look like by going through a series of provided questions.<\/p>\n\n\n\n<p>Once, done save the changes and your Powerlevel10k prompt now looks like;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;uploadedSrc&quot;:&quot;https:\\\/\\\/kifarunix.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/zsh-powerlevel10k.png&quot;,&quot;figureClassNames&quot;:&quot;aligncenter size-full&quot;,&quot;figureStyles&quot;:null,&quot;imgClassNames&quot;:&quot;wp-image-20164&quot;,&quot;imgStyles&quot;:null,&quot;targetWidth&quot;:1235,&quot;targetHeight&quot;:674,&quot;scaleAttr&quot;:false,&quot;ariaLabel&quot;:&quot;Enlarge image&quot;,&quot;alt&quot;:&quot;&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1235\" height=\"674\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/zsh-powerlevel10k.png?v=1708153644\" alt=\"\" class=\"wp-image-20164\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/zsh-powerlevel10k.png?v=1708153644 1235w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/02\/zsh-powerlevel10k-768x419.png?v=1708153644 768w\" sizes=\"(max-width: 1235px) 100vw, 1235px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"context.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"context.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<p>oh my zsh!!! Isn&#8217;t it?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"enable-oh-my-zsh-plugins-on-ubuntu-24-04\">Enable Oh-My-Zsh Plugins on Ubuntu 24.04<\/h3>\n\n\n\n<p>There are a ton of oh-my-zsh plugins to further spice up your shell. Plugins are stored under, &nbsp;<code>~\/.oh-my-zsh\/plugins<\/code>. It is also possible to define custom plugin location, like, <code>~\/.oh-my-zsh\/custom\/plugins<\/code>.&nbsp;<\/p>\n\n\n\n<p>Plugins can be enabled by defining them under the plugins section on <code>~\/.zshrc<\/code> config file. For example, to enable colored man pages plugin;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code># Which plugins would you like to load?\n# Standard plugins can be found in ~\/.oh-my-zsh\/plugins\/*\n# Custom plugins may be added to ~\/.oh-my-zsh\/custom\/plugins\/\n# Example format: plugins=(rails git textmate ruby lighthouse)\n# Add wisely, as too many plugins slow down shell startup.\n<strong>plugins=(git <strong>colored-man-pages<\/strong>)<\/strong>\n<\/code><\/pre>\n\n\n\n<p>Save and exit the shell. Then source&nbsp;<code>~\/.zshrc<\/code>&nbsp;for the changes to take effect.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>source ~\/.zshrc<\/strong><\/code><\/pre>\n\n\n\n<p>The verify the plugin by running, <code>man man<\/code>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"647\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-plugins.png\" alt=\"\" class=\"wp-image-11788\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-plugins.png?v=1646246537 1008w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/zsh-plugins-768x493.png?v=1646246537 768w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/figure><\/div>\n\n\n<p>There are a lot of customization that can be done on ZSH and Oh-My-Zsh. Feel free to explore. Otherwise, we have come to an end of our guide on how to install Zsh on Ubuntu.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to install Zsh on Ubuntu 24.04. Zsh is a versatile UNIX shell with interactive login and<\/p>\n","protected":false},"author":10,"featured_media":11790,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[7400,7399,7403,7402],"class_list":["post-20157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-install-oh-my-zsh-on-ubuntu-24-04","tag-install-zsh-on-ubuntu-24-04","tag-ubuntu-24-04-oh-my-zsh","tag-z-shell","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20157"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=20157"}],"version-history":[{"count":5,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20157\/revisions"}],"predecessor-version":[{"id":20923,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/20157\/revisions\/20923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11790"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=20157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=20157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=20157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}