LinuxCommandLibrary

ibmcloud-logout

Log out from IBM Cloud CLI

TLDR

Log out of the current session

$ ibmcloud logout
copy

SYNOPSIS

ibmcloud logout [-h | --help]

PARAMETERS

-h, --help
    Display help information for the command.

DESCRIPTION

The ibmcloud logout command terminates the current authentication session with IBM Cloud. It removes the access token, API endpoint target, and account information from the local configuration file, typically located at ~/.bluemix/config.json or similar. This is essential for security when switching between multiple IBM Cloud accounts on the same machine, ending a session on a shared system, or preventing unauthorized access to cloud resources.

Upon execution, the command clears the current login context without affecting other configurations or plugins. It does not delete resource-specific targets or plugin data unless explicitly managed. Users often pair it with ibmcloud login for account switching workflows. The command provides feedback confirming logout success, such as 'API endpoint: https://cloud.ibm.com (default) is not targeted' and 'Logout successful.'

This utility is part of the IBM Cloud CLI, a powerful tool for managing IBM Cloud resources via terminal, supporting IaC practices, automation scripts, and DevOps pipelines.

EXAMPLES

ibmcloud logout
Simply logs out the current session.

EXIT STATUS

Returns 0 on success, non-zero on failure (e.g., no active session).

HISTORY

Introduced in the original Bluemix CLI ('bx logout') around 2015, rebranded to IBM Cloud CLI in 2018. Evolved from Cloud Foundry CLI roots, with ongoing updates for multi-account support and enhanced security.

SEE ALSO

ibmcloud login(1), ibmcloud target(1), ibmcloud account(1)

Copied to clipboard