Where should you place a custom executable in Cloud Shell so it is in the default PATH and persists across sessions?
Choose an answer
Tap an option to check your answer.
Correct answer: ~/bin.
Why this is the answer
The ~/bin directory is the correct location because Cloud Shell automatically adds this directory to the user's PATH variable if it exists. This ensures that any executables placed there can be run directly from the command line without specifying the full path, and it persists across sessions because the home directory is persistent in Cloud Shell. Cloud Storage is a storage service, not a location for executables to be automatically added to the PATH. /google/scripts is not a standard or persistent location for user-defined executables. /usr/local/bin is a system-wide directory that users typically do not have write access to in Cloud Shell, and changes there would not persist.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed