2

I am trying to install SteamCMD on my Linux machine by using this guide. However, I ran into a problem after I created the user steam and installed SteamCMD. The whole error code is

Command 'steamcmd' is available in '/usr/games/steamcmd'
The command could not be located because '/usr/games' is not included in the PATH environment 
variable

However, I am not that tech savvy with Linux. I am unsure how I am able to give the user steam access to that path, so it can execute the steamcmd application.

Thanks in advance :)

0

1 Answer 1

3

$PATH is a shell variable that holds the list of directories in which your shell (for example, bash) will search for executables. So if you try to run a command named foo, your shell will look for an executable file named foo in one of those directories. You can see the current value by opening a terminal and running:

echo "$PATH"

Here, the guide you followed installs the executable steamcmd in the directory /usr/games/ and that directory isn't in your user's $PATH variable. So you can either:

  1. Call the executable using the full path to it, instead of just the name:

    /usr/games/steamcmd
    
  2. Add this directory to your $PATH. To do this, edit the file $HOME/.profile or, if it exists, the file $HOME/.bash_profile. If neither of the two files exist, just create a new, empty $HOME/.profile file. In that file, you add this line:

    export PATH="$PATH:/usr/games"
    

    Then, save the file, log out and log back in again, and now you can run steamcmd as you want.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.