Need some help with understanding and changing to zsh from bash

first of all, i don’t understand what is manjaro-zsh-config;
is it something like oh-my-zsh or is it some basic configurations for zsh in manjaro,
and is compatible along side oh-my-zsh?(or does oh-my-zsh replaces it and create a new config file?)

and what is the correct way to activate zsh?
i already have it installed by default:

Summary

as i understand i first run “zsh” and go through the setup;
(any specificity concerning manjaro,or i can just choose whatever suits me?)

then i just type:

chsh -s $(which zsh)

and log out/in.

do i also need to run one of these two?:(saw it in some tutorial)

chsh -s /bin/zsh root

or

chsh -s /bin/zsh my_username 

and the correct way to revert to bash would be

chsh -s /bin/bash

?

Hi @linub,

Zsh is like bash. It is a command-line frontend, a terminal emulator. Basically you use it just like bash, instead of bash. The big difference is that it’s much more feature rich.

I have both installed, AFAIK and have 0 problems. I can’t be 100% sure, as I’m not near my PC to check.

Yes, you do a setup, in which you futomize a lot of the things.

The chsh -s $(which zsh) will probably have ro be run for every user, IIRC.

I am not sure about the other 2 commands, so can’t comment on that.

Hope this helps.

1 Like

the config files for the Manjaro pre-configured zsh are all already there
probably
either in /etc/skel
or in your $HOME as well

if you run the zsh configuration - you’ll do just that
you re-configure it
and, in the process, likely invalidate the pre-configured … configuration

chsh -s $(which zsh)
this will change your shell to zsh - no change if it was zsh already

chsh -s /bin/zsh root
this will change the shell to zsh for the root account - if it is allowed (the command here was without “sudo”)

chsh -s /bin/zsh my_username
same as the first one - your account is targeted

correct

1 Like

Assuming you have the package already installed, you can make a query using pacman to get an idea about what the manjaro-zsh-config package is for:

sudo pacman -Qil manjaro-zsh-config

1 Like

so in order to use the manjaro settings i need to skip this process?

that was what I meant
I’m not sure as I never did this.
But there is a configuration already.
If you re-configure zsh … you’ll likely alter/invalidate the pre-existing configuration
that would seem logical to me :wink:

1 Like

zsh can be configured on per user or system-wide basis.

If you have an existing user, change the user’s shell as explained on previous posts, then just copy /etc/skel/.zshrc into the user’s home directory and make sure that file is owned and at least readable for that user. Again, this is assuming you have manjaro-zsh-config installed and all its dependencies met.

1 Like

i have manjaro-zsh-config installed by default and also .zshrc i the home directory.
i know now how to install it for that user.
the only thing i’m not sure about is what to choose in the setup,to not overide the default manjaro settings.
i watched these two videos(one on arch and one on manjaro)and they get different setting options:

Summary

https://youtu.be/A6xWiqOpulI?t=211
https://youtu.be/4KBuPCeF9Gc?t=245

… in the setup of what?

not watching videos to get the gist of it …
sorry

you want to improve the existing setup
alter it
but not override it?

add to it?

I think the zsh configuration script will not run again for your user account, unless the contents of the .zshrc file are lost.

Not 100% sure, but personally I haven’t had issues in that regard.

I have the same questions as OP. I’m sorry, but I read this thread thoroughly twice, and it doesn’t really help much. Please, let’s not rehash the basics of shells; these questions are somewhat specific…

  1. What is the purpose of the manjaro-zsh-config package?

Someone said to query pacman or check the git page, but that doesn’t really answer the question. As far as I can tell, installing it does nothing on its own. It places pre-configured zsh scripts and config files in /usr/share/zsh, but I’m given no guidance how to configure it for users.

The issue is whenever I run zsh for the first time, it creates a .zshrc config file in /home and those settings seem to override everything. However, if I use zsh without this config, I’m given barebones zsh without any themes/plugins.

Okay, we can ignore that for now and just copy /etc/skel/.zshrc to ~/ and boom you have default manjaro zsh, but this setup makes tweaking configuration inconvenient compared to the old method of editing .zshrc. I have to assume I’m still missing something like running an install/config script which copies and edits these files from the package and/or creates links so they’re actually used for configuration.

  1. The only way I’ve ever managed zsh config is by editing ~/.zshrc in conjunction with various plugins. I got the oh-my-zsh package and plan on using it to manage zsh themes. How do we import manjaro-zsh-config and use it with this configuration manager, or am I missing something again (i.e. oh-my-zsh overrides the settings so this isn’t relevant) ?

Thanks for your consideration.