My terminal doesn't change to zsh

I tried switching profiles and used kitty, same problem
I can manually access zsh by typing zsh and It loads
I want it the replace the bash like everyone has not every time write it

So at this point and with the info given, I’m not sure why you expect it to be zsh.

3 Likes

:backhand_index_pointing_up:

have you tried changing the shell??

1 Like

These are the notes I use to setup ZSH. Hope it helps:

How to setup ZSH in Arch Linux

  1. Verify what shell is currently installed (default is bash).

$ echo $SHELL

  1. Install ZSH

sudo pacman -S zsh

  1. Install ZSH plugins:
sudo pacman -S zsh-autosuggestions zsh-completions zsh-syntax-highlighting starship ttf-jetbrains-mono-nerd
  1. Configure ZSH basic User Configuration:**

From terminal run ā€˜zsh’ which will start the wizard.

  1. Change the default Shell for a User.

a. Change the Current User to use ZSH Shell.

`sudo chsh -s /usr/bin/zsh`

b. Change a specific user account to use ZSH Shell.

sudo chsh -s /usr/bin/zsh <USER TO CHANGE>

  • Must Log out and back in to get the change
  1. Setup ZSH Plugins and Starship Prompt:

a. Edit the .zshrc file.

nano ~/.zshrc

b. Use the following .zshrc content in your configuration file:

# Lines configured by zsh-newuser-install  
HISTFILE=~/.histfile  
HISTSIZE=1000  
SAVEHIST=1000  
bindkey -e  
  
#Path to Functions and Plugins  
export ZSH="/usr/share/zsh"  
fpath=($ZSH/functions $ZSH/site-functions $fpath)  
  
#Source ZSH Plugins  
source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh  
source $ZSH/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null  
  
# End of lines configured by zsh-newuser-install  
# The following lines were added by compinstall  
zstyle :compinstall filename '/home/rsruser/.zshrc'  
  
autoload -Uz compinit; compinit  
  
# End of lines added by compinstall  
  
# This will set Starship as default prompt theme  
eval "$(starship init zsh)"
  1. Enable starship on the BASH shell:

a. Edit the ~/.bashrc file:

nano ~/.bashrc

b. Add the following line at the end of the file:

eval "$(starship init bash)"

Source:

https://medium.com/tech-notes-and-geek-stuff/install-zsh-on-arch-linux-manjaro-and-make-it-your-default-shell-b0098b756a7a)
https://github.com/ChristianChiarulli/Machfiles/blob/master/zsh/.config/zsh/zshrc

ZSH Plug-ins:

1 Like

On KDE Plasma this is not really how this should be done.

First of all because the system $SHELL being BASH is actually a bit important for Plasma.

Second because when using konsole we really should configure our preferred shell using the Profiles Settings.


Never use root/sudo/pivelege-escalation on paths in $HOME .. or anywhere its not required, really.
Particularly for files in the user home - this will break permissions.
And for files sourced by software broken permissions likely break their expected operation.

1 Like

yes
chsh -s /usr/bin/zsh
Changing shell for user.
Password:
chsh: Shell not changed.

thx for the effort
I have followed this and still
Changing shell for root.
chsh: Shell not changed.

see the edits I did

So what should I do to make zsh work with KDE other than changing the DE?

Your login shell being something doesnt mean you cant configure your personal or terminal emulator shell.
It should be as simple as editing the profile (or creating a new one) and setting the Command: option to the desired shell, ex: /usr/bin/dash.
But your OP seems to indicate that did not work?

do u use Konsole?

I didn’t really get wdym in the last 2 sentences

Imgur

But your opening post sounded like you already tried that and it did not work?

I will note that while trying to replicate your issue I found what may be a bug, or maybe less-documented expected behavior, but anyways - the configured shell did not seem to be properly initialized unless the profile was set :check_mark: as ā€œDefault profileā€.

Imgur

oh yes I did this and made it default
strangely now sometimes it opens in ZSH and sometimes decide to make the error mentioned above
also kitty happens the same

So it is an error in the system file I have?

Then I might think there is a configuration problem somewhere.
First try to make a new profile.
If that does not work then maybe go checking the permissions of files in HOME and/or seeing if there is anything funny such as in your ~/.zshrc file that might .. I dunno .. be launching bash or just have fatal errors?

I could not replicate the issue here beyond the ā€˜Default profile’ oddity.

Imgur

As to your chsh, it’s configured by /etc/shells, which contains the historically accurate path for zsh, /bin/zsh.
Unix uses links.

Thanks for your feedback (my notes I tested on Gnome).

I corrected the use of sudo in my notes.

If you are editing an existing file, this will not break file permissions. If you create a file … that is a different story.

Hi Enderr,

First I must say that I do not use a root account at all. This is dangerous. The best practice is to have a regular account and then use sudo to elevate rights when I need to.

Secondly, I did include the links to where I sourced information to make the tech note. Perhaps follow the sources so you can learn about configuring ZSH. I would always leave the root account as BASH.

Best of luck.

1 Like

Dont tell that distros like RHEL or Debian. They both come with a root account enabled and no sudo configured. If I am not mistaken arch linux has a root account enabled by default too.

There is nothing wrong with having a root acount and using it. As long as it has a very good password.

On the other hand, sudo is seen critical by some people with regard to security. It has had some critical security issues in the past. E.g. CVE-2017-1000367 or CVE-2021-3156.

Also, it is very easy to make sudo insecure by misconfiguration.

1 Like