Install golf

Golf is installed in a home directory (either in a separate user account or in your own home directory). Minimum permissions (required and set by the installation) for home directory are 711 (allowing access to specific sockets but no read, write or directory listing permissions). The plain text of install script is at https://golf-lang.com/gginst.sh.
Get Golf source code
Get Golf source code from either:
Install Golf
Golf itself does not require sudo as it installs in a local ".golf" folder. You may need sudo privilege to install standard Open Source toolkit libraries (such as MariaDB, SQLite, PostgreSQL, XML, Regex, Curl, OpenSSL etc), base libraries (if not installed already, and they usually are), or SELinux support (if you use it). They are system-wide by nature and require sudo.

The default installation (above) will ask you if you'd like to install the above toolkit packages, You can install them if and when you need them, or you can install them now. To run the default installation:
./gginst.sh

If you'd like to install all base and toolkit packages automatically now, then use the following:
./gginst.sh all

The environment variables (such as PATH) are now set in .bashrc file, and will take effect next time you login. To continue working with Golf in the current shell:
. ~/.bashrc

Try Golf
Go to 123-hello-world for your Hello World.
Notes about Golf installation
- SELinux
If you have SELinux enabled then you'll need to install SELinux support for Golf. This requires sudo privilege because it involves setting Operating System permissions for Golf. This will be done automatically during the installation.

If you don't want or need SELinux support, you can use permissive mode with:
sudo setenforce 0

in which case you won't need to install SELinux support.
- Afterwards
The above will install Golf in your local $HOME/.golf directory. It will setup permissions and update your .bashrc as well as your current environment, so you can use Golf right away.
- Uninstall Golf
Here's how to uninstall.


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.