Questions tagged [zsh]

zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

Zsh is a Unix shell used as an interactive login shell as well as a powerful command interpreter for shell scripting.

Zsh has been improved over time, with many of the useful features of other shells like bash, ksh and tcsh being borrowed and incorporated into zsh.

References:

339 questions
387
votes
8 answers

How to make ZSH the default shell?

I am trying to set ZSH as my default shell, however it keeps reverting back to bash. I have tried this code: sudo chsh -s $(which zsh) I've also tried: sudo chsh -s /bin/zsh Also tried these commands without sudo. Any ideas on what else I need…
Tom
  • 4,239
198
votes
4 answers

Pressing enter produces ^M instead of a newline

For example, if I am tail -fing a file or reading user input, will produce ^M in the terminal instead of ending the read or adding a newline to stdout. ^J works fine. I'm sshing into the ubuntu system, if that matters. This happens to me…
benekastah
  • 2,089
156
votes
6 answers

Make Command Not Found

I am having a problem that doesn't seem to be common based on searching various forums. I cannot run the Make command. Message: The program 'make' is currently not installed. You can install it by typing: sudo apt-get install make So do this: sudo…
snoopdogg
  • 1,561
145
votes
10 answers

Moving from bash to zsh

I'm considering moving from bash to zsh as I often come across posts praising zsh. I'm an experienced command line user and I'm assuming the basics are pretty much the same, so I'm looking for advice to get the benefits of moving, and any gotchas to…
Hamish Downer
  • 19,506
133
votes
7 answers

How to set up aliases in zsh?

I know that in bash you can set up aliases in a .bash_aliases file, so that the command you type doesn't need to be a command stored in the binaries in the system. Is there any way I can get aliases into zsh?
Thomas Ward
  • 78,878
99
votes
1 answer

How to make a permanent alias in oh-my-zsh?

In my .zshrc I tried to make a few aliases .I looked into a lot of places, but I couldn't find out a way that worked. I used this code below: # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can…
Shamveel Ahammed
  • 1,093
  • 1
  • 7
  • 4
58
votes
2 answers

How do you share history between terminals in zsh?

How can it be achieved so that every command that is entered, is visible in every open terminal's history? When having multiple terminals open, the history isn't shared, i.e. what you entered in one terminals history, doesn't show up in another one.…
MJB
  • 1,874
51
votes
2 answers

chsh -s /usr/bin/zsh not working

I'm trying to permanently change my shell to zsh using chsh command, but it's not working. zsh is installed (via apt) and works fine when I invoke it directly from a bash prompt terminal. But I can't get zsh to load in terminals by default, and…
bgibson
  • 5,037
45
votes
5 answers

Why is bash the default shell in most OS?

Why is bash the default shell in most OSes (Ubuntu, Fedora, OSX, etc.)? Why is it that a lot of advanced users mostly use zsh? If it is that good, why is it not the default? I use both I don't see a difference for all my tasks are simple :)
Talal
  • 899
40
votes
3 answers

ZSH is not launched while opening a new terminal with `gnome-terminal`

I am using Ubuntu 12.04 and started using zsh. The way I changed my shell is $ sudo chsh -s /usr/bin/zsh I changed my prompt theme etc and the changes kicked in. When I do a echo $SHELL I can see that zsh is my shell. But when I open a new terminal…
mehant
  • 503
37
votes
9 answers

oh my zsh for the root and for all user

I have installed zsh and I am using Oh My ZSH plugins. Everything works fine, but when I become a root user, it changes to the default zsh theme. What should I do to make the Oh My ZSH configuration as the default zsh for all users including root? I…
27
votes
5 answers

Configuring to detect if a command does not exist, suggest installation

Can the zsh shell be configured to show what bash shows when a command does not exist, similarly to this: kahless:~$ sysv-rc-conf The program 'sysv-rc-conf' is currently not installed. You can install it by typing: sudo apt-get install…
Thomas Ward
  • 78,878
25
votes
4 answers

Possible side effects of changing shell from zsh to bash

My web server was tampered by someone who was using zsh shell. I feel more comfortable using bash shell, as that's the defaults that come with Ubuntu and OS X (the two main operating systems I use). But this questions is focused on Ubuntu server. I…
JohnMerlino
  • 7,829
25
votes
3 answers

Apt-get * wildcard with ZSH

ZSH: sudo apt-get remove --purge ubuntuone-* ERROR: zsh: no matches found: ubuntuone-* Works on Bash. What's the problem ? :-D
24
votes
4 answers

When I use ZSH, how do I set PATH in /etc/profile.d?

I'm using zsh as my shell, and I'm trying to configure my environment. I usually define my $JAVA_HOME variable by creating a file: /etc/profile.d/java.sh with the following content export JAVA_HOME=/path/to/jdk export…
1
2 3
22 23