|
|
| Line 37: |
Line 37: |
| users.users.myuser.useDefaultShell = true; | | users.users.myuser.useDefaultShell = true; |
| </nowiki>}} | | </nowiki>}} |
|
| |
| == Changing /bin/sh ==
| |
| {{Warning|Please note that NixOS assumes all over the place that the shell is bash, so override the default setting only if you know what you're doing.}}
| |
| {{ic|/bin/sh}} is a symlink to your default POSIX-compliant shell. It's used when writing shell scripts, so that the script works on all machines independently of which shell the user is using. /bin/sh doesn't have to be the same as your interactive shell (i.e. the one you use in your terminal). For example, some people set their interactive shells to [[zsh]]/[[fish]] but set /bin/sh to dash, because it's fast and scripts don't need any of those fancy zsh/fish features.
| |
|
| |
| To change your default POSIX shell on NixOS, use
| |
| <syntaxhighlight lang="nix">
| |
| # Dash is just an example, you can use whatever you want
| |
| environment.binsh = "${pkgs.dash}/bin/dash";
| |
| </syntaxhighlight>
| |
|
| |
|
| == See also == | | == See also == |