Here [1] has a little error in writing, as shown below:
werner@X10DAi:~$ SAGE_GAP_COMMAND = "/usr/local/bin/gap -s 4G" sage
SAGE_GAP_COMMAND: command not found
But the correct version should look like this, aka, without white spaces around the `=':
werner@X10DAi:~$ SAGE_GAP_COMMAND="/usr/local/bin/gap -s 4G" sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.0.beta7, Release Date: 2023-04-01 │
│ Using Python 3.10.7. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: sage.interfaces.gap.gap_cmd
'/usr/local/bin/gap -s 4G'
Best,
Zhao