Exit Claude

If Claude is already open and running, run the slash command:

/exit

Another option is to press ⌃ control+C on your MacBook two times.

If you want to restart Claude, simply type in claude and press Enter.

Log Out

If you want to log out of your account, run the slash command:

/logout

That's it. You're logged out. Claude will no longer be connected to your account on this computer.

Log Back In

Whenever you want to use Claude Code again, run the slash command:

/login

Your web browser will open. Sign in to your Anthropic account and click "Allow." Once you do that, go back to your terminal. Claude is ready to use.

Am I Logged In Right Now?

If you're not sure, type this:

claude auth status

It will tell you if you're logged in or not. If it says you're not connected, just run claude login again.

Common Questions

Do I need to log out every time I close my computer?
No. Your login stays active for a long time. You only need to log out if you want to, or if someone else uses your computer.

Claude says my login expired. What do I do?
Just type claude login and sign in again. This happens sometimes if you haven't used Claude Code in a while.

I'm getting a weird error when I try to use Claude.
Try logging out and back in. That fixes most problems:

claude logout
claude login

Can I switch to a different account?
Yes. Just type claude login and sign in with the other account. It replaces the old one automatically.

Previous Lesson
Lightning icon
Claude Code Setup Begin Your Journey
Next Lesson
Meter icon
Check Your Usage Know Your Limits