Uninstall and replace the Bash

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
David Chiang
Level 3
Level 3
Posts: 102
Joined: Sun Jul 01, 2007 4:42 am
Location: Higashiōsaka, Japan
Contact:

Uninstall and replace the Bash

Post by David Chiang »

I'm looking for the safest possible way to change the old shell to the Z shell (zsh). This could get a little complicated, but I want to risk it as the latter is a lot more powerful. In addition, it's also constantly being developed and could soon replace the former.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
LMDE 5 Elsie (64-bit), Linux Kernel 5.10.0, Cinnamon 5.6.8, inxi 3.3.28;
HTPC: ASUS TUF B450M-Pro Gaming, 3.6 GHz AMD Ryzen 7 3700X (8 cores),
AMD Radeon Pro WX 7100, 2 × 4 TiB Seagate BarraCuda ES.3, 4 × 16 GiB HyperX Predator DDR4;
t42
Level 11
Level 11
Posts: 3732
Joined: Mon Jan 20, 2014 6:48 pm

Re: Uninstall and replace the Bash

Post by t42 »

-=t42=-
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Uninstall and replace the Bash

Post by Flemur »

David Chiang wrote: Wed Mar 03, 2021 4:49 am I'm looking for the safest possible way to change the old shell to the Z shell (zsh). This could get a little complicated, but I want to risk it as the latter is a lot more powerful. In addition, it's also constantly being developed and could soon replace the former.
Thanks, t42!

Here are several of my 2-cents:

Changing to zsh isn't complicated.
Don't uninstall bash, other things need it (like all those scripts with #!/bin/bash).
Don't use those "helper" things (e.g. oh-my-zsh, etc) I mentioned in that post.

I use terminal history a lot and zsh uses a (surprisingly user-hostile) negative number to return the last N entries:
history -3 = show the last three commands. history 3 = show everything except the first three commands, which is pretty useless; hence my alias h='(){ history "-"$1 }', so h 3 shows the last three commands.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
David Chiang
Level 3
Level 3
Posts: 102
Joined: Sun Jul 01, 2007 4:42 am
Location: Higashiōsaka, Japan
Contact:

Re: Uninstall and replace the Bash

Post by David Chiang »

Thanks t42, but this isn't exactly what I want. I don't want to just switch between the two, I want a permanent transition to zsh.

@Flemur
Many thanks also to you for the warnings, of course i would like to do it without additional software, although something like that is certainly difficult. I don't think it's a good idea to run two shells in parallel, so I'm looking for a way to completely replace the bash. :)
Last edited by David Chiang on Wed Mar 03, 2021 8:57 am, edited 1 time in total.
LMDE 5 Elsie (64-bit), Linux Kernel 5.10.0, Cinnamon 5.6.8, inxi 3.3.28;
HTPC: ASUS TUF B450M-Pro Gaming, 3.6 GHz AMD Ryzen 7 3700X (8 cores),
AMD Radeon Pro WX 7100, 2 × 4 TiB Seagate BarraCuda ES.3, 4 × 16 GiB HyperX Predator DDR4;
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Uninstall and replace the Bash

Post by Flemur »

David Chiang wrote: Wed Mar 03, 2021 8:42 am Thanks t42, but this isn't exactly what I want. I don't want to just switch between the two, I want a permanent transition to zsh.
As it says in that post:
To make it permanent, enter these
chsh -l # list the shells
chsh -s /bin/zsh # use the FULL PATH of zsh returned from chsh -l

Now when you login or start a terminal, you'll be running zsh.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
David Chiang
Level 3
Level 3
Posts: 102
Joined: Sun Jul 01, 2007 4:42 am
Location: Higashiōsaka, Japan
Contact:

Re: Uninstall and replace the Bash

Post by David Chiang »

Flemur wrote: Wed Mar 03, 2021 8:50 am As it says in that post:
To make it permanent, enter these
chsh -l # list the shells
chsh -s /bin/zsh # use the FULL PATH of zsh returned from chsh -l

Now when you login or start a terminal, you'll be running zsh.
The problem with this is that it's just a permanent switch to zsh and not a real transition!
LMDE 5 Elsie (64-bit), Linux Kernel 5.10.0, Cinnamon 5.6.8, inxi 3.3.28;
HTPC: ASUS TUF B450M-Pro Gaming, 3.6 GHz AMD Ryzen 7 3700X (8 cores),
AMD Radeon Pro WX 7100, 2 × 4 TiB Seagate BarraCuda ES.3, 4 × 16 GiB HyperX Predator DDR4;
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Uninstall and replace the Bash

Post by Flemur »

David Chiang wrote: Wed Mar 03, 2021 9:00 amThe problem with this is that it's just a permanent switch to zsh and not a real transition!
Lemme make a note for future reference... permanent switch means something completely different than real transition for some reason.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
David Chiang
Level 3
Level 3
Posts: 102
Joined: Sun Jul 01, 2007 4:42 am
Location: Higashiōsaka, Japan
Contact:

Re: Uninstall and replace the Bash

Post by David Chiang »

Flemur wrote: Wed Mar 03, 2021 9:08 am Lemme make a note for future reference... permanent switch means something completely different than real transition for some reason.
No, not for 'some reason', it's for a good reason!
As long as the bash is still installed there's always an easy way back and that's not what I'm talking about.
(Some people obviously have a problem with meaningful reading.) :roll:
Last edited by David Chiang on Wed Mar 03, 2021 9:40 am, edited 1 time in total.
LMDE 5 Elsie (64-bit), Linux Kernel 5.10.0, Cinnamon 5.6.8, inxi 3.3.28;
HTPC: ASUS TUF B450M-Pro Gaming, 3.6 GHz AMD Ryzen 7 3700X (8 cores),
AMD Radeon Pro WX 7100, 2 × 4 TiB Seagate BarraCuda ES.3, 4 × 16 GiB HyperX Predator DDR4;
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Uninstall and replace the Bash

Post by Flemur »

David Chiang wrote: Wed Mar 03, 2021 9:15 am
Flemur wrote: Wed Mar 03, 2021 9:08 am Lemme make a note for future reference... permanent switch means something completely different than real transition for some reason.
No, not for 'some reason', it's for a good reason!
As long as the bash is still installed there's always an easy way back and that's not what I'm talking about.
Good luck
bash.jpg
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
David Chiang
Level 3
Level 3
Posts: 102
Joined: Sun Jul 01, 2007 4:42 am
Location: Higashiōsaka, Japan
Contact:

Re: Uninstall and replace the Bash

Post by David Chiang »

Flemur wrote: Wed Mar 03, 2021 9:21 amGood luck!
It has nothing to do with luck, more like an ice-cold calculation, but thank you very much for the hint!
LMDE 5 Elsie (64-bit), Linux Kernel 5.10.0, Cinnamon 5.6.8, inxi 3.3.28;
HTPC: ASUS TUF B450M-Pro Gaming, 3.6 GHz AMD Ryzen 7 3700X (8 cores),
AMD Radeon Pro WX 7100, 2 × 4 TiB Seagate BarraCuda ES.3, 4 × 16 GiB HyperX Predator DDR4;
Locked

Return to “Software & Applications”