Installation
fortsh can be installed on Linux and macOS. Choose the method that works best for your system.
Quick Install
The fastest way to install fortsh:
curl -fsSL https://fortsh.musicsian.com/install.sh | bash
This script detects your operating system and uses the appropriate method.
Fedora / RHEL / Rocky Linux
fortsh is available from the musicsian repository.
# Add the repository
sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
# Install fortsh
sudo dnf install fortsh
Arch Linux (AUR)
fortsh is available on the AUR.
# Using yay
yay -S fortsh
# Using paru
paru -S fortsh
# Manual installation
git clone https://aur.archlinux.org/fortsh.git
cd fortsh && makepkg -si
macOS (Homebrew)
Install via the FortranGoingOnForty tap:
brew install FortranGoingOnForty/tap/fortsh
macOS Apple Silicon Note
On Apple Silicon Macs, fortsh has a 127-character command line limit due to a compiler limitation in flang-new. This affects very long commands but normal interactive use works fine. See macOS Apple Silicon for details.
Build from Source
For systems without prebuilt packages, or if you want the latest development version:
Requirements
- gfortran (Linux, macOS Intel) or flang-new (macOS Apple Silicon)
- make
- git
Build Steps
# Clone the repository
git clone https://github.com/fortrangoingonforty/fortsh.git
cd fortsh
# Build
make
# Install to /usr/local/bin
sudo make install
# Or install to ~/.local/bin
make dev-install
Compiler Notes
| Platform | Compiler | Notes |
|---|---|---|
| Linux | gfortran | Full feature set |
| macOS Intel | gfortran | Use -frecursive flag (handled by Makefile) |
| macOS ARM64 | flang-new | 127-char limit, requires LLVM flang |
Verify Installation
After installation, verify fortsh works:
fortsh --version
You should see the version number (currently 1.3.1).
Set as Default Shell
To use fortsh as your default login shell:
# Add fortsh to /etc/shells if not present
echo $(which fortsh) | sudo tee -a /etc/shells
# Change your default shell
chsh -s $(which fortsh)
Log out and back in for the change to take effect.
Next Steps
- First Steps - Learn basic usage
- Configuration - Customize your shell