Set zsh as default shell
I'm just getting started with coder.com - another team at my company set up an instance. I tried using
chsh
to switch my default shell to zsh, but new vscode sessions are still using bash. Restarting the workspace reset the shell to bash again. What's the recommended way to get my shell to zsh by default? Will I need to build my own workspace AMI or something? Thanks in advance!7 Replies
<#1303147690338684978>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
You should ask your template admin to add dotfiles modules to the template, and then you can use your dotfiles to customize to your environment.
https://registry.coder.com/modules/dotfiles
Dotfiles - Coder Registry
Allow developers to optionally bring their own dotfiles repository to customize their shell and IDE settings!
Thanks! that's supported, but I'm not clear on what I'd put into a dotfiles repo to make zsh the default. I was planning on chsh, but seems like that doesn't work. Do you know of any example repo that switches the default shell?
yes, you'd use chsh
here's a script I wrote to change the shell using
chsh
you run it as root as ./changeshell.sh <user> <shell>
I can make a Coder module to switch the shell if you wantthanks Theo! I'll give it a try.
let me know how it goes!
I tried this today, but it looks like our installation runs dotfiles/install.sh as
coder
not root (so the above just exits 1). So I tried switching the script to just sudo chsh -s /usr/bin/zsh coder
which runs, but the shell I get after connecting is still bash. I'll follow up with the folks that set up our installation to see if they have ideas