Change default shell from bash to zsh by default?

Thanks! Merged. Will test this from now on.

While I see your point and commend your work, there is a strong argument for moving away from terminals for average users. A simple misstep (oops I actually pressed enter on rm -rf in my home directory before I filled out the path) can cause somewhat catastrophic issues

I would argue for creating UI solutions whenever possible. It might be worth it looking in to things in Whonix that can only be done via the shell at some point.

A bit off topic, just pontificating. Zsh default is solid.

2 Likes

Also off-topic, there’s also Debian -- Package Search Results -- safe-rm and Debian -- Package Search Results -- trash-cli which one day can be considered for installation by default and to replace rm in documentation.

Status of zsh by default in Whonix:


  • Non-Qubes-Whonix new builds: zsh is enabled by default since Whonix 17.



  • User choice: Users can configure bash, zsh or any other shell of their choice as per the usual mechanism in Debian. Also documented here, See Default Interactive Shell in Kicksecure wiki.
    (Whonix is based on Kicksecure.)

related source code file for enabling zsh by default:
https://github.com/Kicksecure/dist-base-files/blob/master/debian/dist-base-files.postinst

bug:

sudo apt purge firefox*

zsh: no matches found: firefox*
zsh: exit 1 sudo apt purge firefox*

Need to use quotes.

sudo apt purge "firefox*"

This was functional with bash.

Fixable?

1 Like

Thank you, merged!

This issue was solved but there’s a new issue…

…the newuser module is back for Qubes-Whonix 17 templates.

(Same message as in post Change default shell from bash to zsh by default? - #37 by Patrick)

Reported here:
Qubes-Whonix: enable zsh by default · Issue #8343 · QubesOS/qubes-issues · GitHub

Resolved. Now zsh gets enabled by default everywhere.

  • Non-Qubes-Whonix
  • Qubes-Whonix
  • existing (upgraded) builds

Weird different in functionality between bash and zsh which is sorta annoying in commands typing:

If i type lets say sudo apt upda and i press on Tap it will complete the word to update and put space to write the next word which will be like this:

sudo apt updasudo apt update if i type lets say && it will be like this sudo apt update &&

The bug:

in bash:

bash

sudo apt updasudo apt update sudo apt update &&

in zsh:

zsh

sudo apt updasudo apt update sudo apt update&&

hope it can be fixed.

1 Like

Make colors better looking similar to what i have suggested (or at least close to):

1 Like

If you change the xfce4-terminal colors, it will adapt the prompt also. Not something that should be done by Zsh, but on XFCE theming directly.

1 Like

Thanks.

The character ; will continue to have space removed before it if done after tab completion.

2 Likes

ok do you know how to do it similarly to kali?

ah ok, whats the reason?

ah ok got you.

I downloaded some Kali packages on Debian Unstable at that time and it looked good. See the last link, it is an Xfce colorscheme then you have to edit the terminal > preferences > colorscheme.
I was planning on doing the Xfce adaptation of Kali to Whonix, but got occupied.

2 Likes

Thanks!

Merged and uploaded to Whonix 17 testers repository.

1 Like

The missing space before && seems fixed to me.

1 Like