---
title: "Tutorial: How to handle multiple accounts within the Netlify CLI"
description: "The Netlify CLI allows you to run a local development server, run your functions or plugins locally, deploy your site, and much more; but did you know it can handle multiple Netlify accounts? Learn how in this blog post."
source: "https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli/"
last_updated: "2026-08-29T09:25:02.000Z"
---
The [Netlify CLI](https://cli.netlify.com/) allows you to run a local development server, run your functions or plugins locally, deploy your site, and much more; but did you know it can handle multiple Netlify accounts?

Let me show you how!

This post assumes you already have the CLI installed and you’ve already logged in with an account. If not, you should check out [our getting started with the Netlify CLI guide](https://docs.netlify.com/cli/get-started/).

## Switching between accounts

Let’s say you have 2 accounts on Netlify, one for your team, and one for your personal projects.

To be able to run `netlify dev` on sites linked to each account, you can connect the CLI to both, and switch between them!

For this, use the command `netlify switch` in your terminal.

It should list the current accounts connected. If you’d like to connect a new one, select `I would like to login to a new one`.

This will open a browser window, asking you to log in with Netlify and grant access to Netlify CLI.

Once you’ve authorised, you can close the browser tab, go back to your terminal, and you should see the following message:

![Screenshot of Netlify CLI success message for switching accounts](/v3/img/blog/netlify-cli-switch-account-success.jpg)

Run `netlify switch` again, you should see your 2 accounts and be able to switch between them!

Have more accounts? No problem! Follow these same steps for each account you’d like to connect!

If you’d like to know more about all the commands available, you can find additional information on the [dedicated Netlify CLI site](https://cli.netlify.com/).

Have fun!

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Handling multiple accounts with Netlify CLI&url=https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2021%2F08%2F04%2Fhandling-multiple-accounts-with-netlify-cli%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)
-   [Bluesky](https://bsky.app/intent/compose?text=Handling multiple accounts with Netlify CLI+https://www.netlify.com/blog/2021/08/04/handling-multiple-accounts-with-netlify-cli//)

* * *

### Tags

-   [Engineering](/blog/tags/engineering/)
-   [Netlify CLI](/blog/tags/netlify-cli/)
-   [Netlify](/blog/tags/netlify/)

## Keep reading

![](/_astro/3f45eb6eda4ea8814be310e3df4a7883a5bd9ba0-1200x675_ZcBDUS.webp)

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/8fe9e8a23f944c9912003233d99a2df7fee637cf-1600x900_Z1gMhmf.webp)

Guides & Tutorials May 15, 2026

[

### Tracking AI search traffic: how to use Netlify Log Drains to maximize AEO

](/blog/tracking-ai-search-traffic)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

## Recent posts

News & Announcements August 25, 2026

[

### Compete in OpenAI’s WebMCP Challenge with Netlify

](/blog/compete-openai-webmcp-challenge)

-   ![Profile picture of Karthik Puvvada](/_astro/e5524d3c315ad5114e1d5300d8991bfe902916fe-192x192_Z1w18MB.webp)
    
    Karthik Puvvada
    

News & Announcements August 19, 2026

[

### New clarifying questions in Agent Runners

](/blog/new-clarifying-questions-in-agent-runners)

-   ![Profile picture of Taylor Barnett-Torabi](/_astro/cf4624da8c1286738397b6fecb53bad504df140b-400x400_ZsvK0s.webp)
    
    Taylor Barnett-Torabi
    

Opinions & Insights August 14, 2026

[

### The full power of Git, without the friction: A conversation with Netlify CTO Dana Lawson

](/blog/netlify-source-with-netlify-cto-dana-lawson)

-   ![Profile picture of Dana Lawson](/_astro/856bf146d0c05c9dc25d45b59f7eac955fbbd644-512x512_1n84rs.webp)
    
    Dana Lawson
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)