To set the JAVA_HOME environment variable in Linux for all users, you will need to add a line to the /etc/environment file.