The easiest way to authenticate is to save the token on your machine. You can do that from the terminal using the [`login`] command:  
```bash
huggingface-cli login
```  
The command will tell you if you are already logged in and prompt you for your token. The token is then validated and saved in your `HF_HOME` directory (defaults to `~/.cache/huggingface/token`). Any script or library interacting with the Hub will use this token when sending requests.  
Alternatively, you can programmatically login using [`login`] in a notebook or a script:  
```py
>>> from huggingface_hub import login
>>> login()
```  
You can only be logged in to one account at a time. Logging in to a new account will automatically log you out of the previous one. To determine your currently active account, simply run the `huggingface-cli whoami` command.  
<Tip warning={true}>  
Once logged in, all requests to the Hub - even methods that don't necessarily require authentication - will use your access token by default. If you want to disable the implicit use of your token, you should set `HF_HUB_DISABLE_IMPLICIT_TOKEN=1` as an environment variable (see [reference](../package_reference/environment_variables#hfhubdisableimplicittoken)).  
</Tip>