this post was submitted on 24 Mar 2025
32 points (100.0% liked)
Linux Questions
1550 readers
3 users here now
Linux questions Rules (in addition of the Lemmy.zip rules)
- stay on topic
- be nice (no name calling)
- do not post long blocks of text such as logs
- do not delete your posts
- only post questions (no information posts)
Tips for giving and receiving help
- be as clear and specific
- say thank you if a solution works
- verify your solutions before posting them as facts.
Any rule violations will result in disciplinary actions
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I forgot about fish. I've read it isn't POSIX compliant. It's my distro's default shell but I really didn't feel like using it so I installed zsh instead. I mostly use Zsh because it's a lot easier to find unformation about it online. I don't currently write shell scripts but I may wish to in the not-so distant future. Is Zsh a good choice for that? Thank you!
You can whatever shell you like and still write scripts in bash, as bash is a part of (practically) every system. When you write a .sh script the first line will indicate which shell to use, so you can run bash scripts from any shell so long as you have it installed.
This is the way! I also like using zsh with oh-my-zsh as an interactive shell, but I still write my scripts in Bash. They can run anywhere (and most scripts you'll find online are also in Bash)
Yup, same. I prefer zsh and omz, but I write all my shell scripts in bash for portability and compatibility.
The #!/bin/bash thing (first line) is called the shebang and it can use any application not just shell, so that means Python or PowerShell or any other tool.