# Open, reopen, and close projects

## Opening projects

Procedure: Project opening settings

In CLion, you can open several projects simultaneously in different windows.

By default, each time you open a project while another one is opened, CLion prompts you to choose whether to open the project in the same window or in a new window. If necessary, you can change this behavior using controls on the [System Settings](system-settings.html) page.

1. Go to `Settings | Appearance & Behavior | System Settings`.

2. Select one of the Open project in options:

![Project opening settings](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_prjopening_settings.png)

* New window to open a new CLion window each time a new project is opened.

* Current window to stay in the same CLion window.

* Ask to keep the default behavior and choose from a dialog for each new project.

Procedure: Open a project

1. Click Open on the [Welcome screen](welcome-screen.html) or select `File | Open` from the main menu.

2. In the [Select Path](select-path-dialog.html) dialog, select the directory that contains the project to open.

* In the case of a CMake project, the directory should contain `CMakeLists.txt`.

* For a [compilation database](compilation-database.html) project, it should contain `compile_commands.json`.

* For a [gradle](gradle-support.html) project, you need to point CLion to the `build.gradle` file and then choose Open as Project.

3. Specify whether you want to open the project in a new window, or close the current project and reuse the existing window.

For CMake projects, CLion comes with a CMake Profile Wizard to help you configure [Toolchains](how-to-create-toolchain-in-clion.html) and [CMake Profiles](cmake-profile.html) for the first time:

![CMake Profile Wizard](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_cmake_wizard.png)

Procedure: Open a project from the command line

* In the command prompt, type:

```SHELL
clion <path_to_the_project folder>
```

See [Open files from the command line](opening-files-from-command-line.html) for more information.

## Reopening recent projects

CLion keeps the history of your recent projects. When CLion starts, the last project (or projects if there were several projects opened at once in your previous session) reopens by default. You can change this behavior in the Startup/Shutdown section of the `Settings | Appearance & Behavior | System Settings` dialog.

Procedure: Reopen a recent project

* Call `File | Recent Projects` from the main menu and select the desired project from the list.

* Invoke the Run Anything dialog by pressing `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Xcode), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (ReSharper), `Ctrl` (ReSharper (macOS)), `Ctrl` (QtCreator), `Ctrl` (QtCreator (macOS)), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) twice (or search for Run anything in `Help | Find Action` `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `⌘ ⇧ A` (Xcode), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (ReSharper), `⌘ ⇧ A` (ReSharper (macOS)), `Ctrl+Shift+A` (QtCreator), `⌘ ⇧ A` (QtCreator (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS))). In the Run Anything dialog, type Open to see the list of recent projects:

![open recent project from Run Anything](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_run_anything_open.png)

* On the [Welcome screen](welcome-screen.html), click Projects in the left-hand pane and then select the project of interest in the right-hand pane where the list of your recent projects is shown. Start typing in the Search projects field to filter the list of recent projects.

Procedure: Remove a project from the list of recent projects

* Go to `File | Recent Projects` and click Manage Projects at the very bottom of the list of recent projects.  From the list of recent projects, select the project to remove and then click the closing icon for the project to remove.

The selected project will be removed from the list of the recent project in the Project window and on the [Welcome screen](welcome-screen.html).

* To remove a project only from the list on the Welcome Screen, right-click the target project and select Remove Selected from Welcome Screen.

## Merge project windows (macOS)

Procedure:

On macOS, you can merge all opened project windows into one, turning them into tabs.

1. Make sure that there are several CLion projects opened in separate windows.

2. In the main menu, go to `Window | Merge All Project Windows`.

Drag a project's tab to work with the project in a separate window again.

With default macOS settings, tabs will be lost after you restart the IDE, and projects will open in separate windows. If you would like the IDE to reopen projects in tabs, [configure your macOS to always use tabs](https://support.apple.com/guide/mac-help/use-tabs-in-windows-mchla4695cce/mac) when opening documents.

## Navigate projects on the Welcome screen

If you work with multiple projects, it's likely that you have a long list of recent projects on the Welcome screen. CLion provides several options that can help navigate this list in a more convenient way.

![Welcome screen](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_wlcm_projects.png)

You can use the search bar to search for projects, [join](#group-projects) several recent projects in a group, or set a [custom icon](#change-project-icon) for each project.

### Group projects

Groups make navigation simpler and help you logically organize your recent projects.

Procedure:

1. On the Welcome screen, right-click any project and select New Project Group.

2. In the Create New Project Group dialog, name the new group and click OK.

3. Right-click the project that you want to move to the new group, select Move to Group, and click the target group's name.

After that, hover over the group and use the ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.settings.svg) icon to show the menu from which you can open all projects in the group at once by clicking All Projects in Group. You can also ungroup the projects, move them to another group, and remove them from the list of recent projects at once.

### Change the project icon

For each project, you can configure a custom icon so that you can quickly find the necessary project on the Welcome screen. Your custom icon should have the SVG format.

Procedure:

1. On the Welcome screen, right-click the project for which you want to change an image and select Set Custom Project Icon.

2. In the dialog that opens, click Choose SVG file and specify the path to the necessary SVG icon.

3. Click OK to apply the changes.

To remove the custom icon, click ![Delete](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.gc.svg) in the Set Custom Project Icon dialog.

## Switch between projects

If you have several opened projects at the same time, you can switch between them using the following options:

* Switch to the next project window: `Ctrl+Alt+]` (Windows), `⌘ ⌥ `` (macOS), `⌘ ⌥ ]` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ `` (macOS System Shortcuts), `Ctrl+Alt+]` (XWin), `Ctrl+Alt+]` (GNOME), `Ctrl+Alt+]` (KDE), `Ctrl+X, Ctrl+O` (Emacs), `Ctrl+Alt+]` (Sublime Text), `⌘ ⌥ `` (Sublime Text (macOS)), `Ctrl+Alt+]` (Xcode), `Ctrl+Alt+]` (Visual Studio), `⌘ ⌥ `` (Visual Studio (macOS)), `Ctrl+Alt+]` (ReSharper), `⌘ ⌥ `` (ReSharper (macOS)), `Ctrl+Alt+]` (QtCreator), `⌘ ⌥ `` (QtCreator (macOS)), `Ctrl+Alt+]` (NetBeans), `Ctrl+Alt+]` (Eclipse), `⌘ ⌥ `` (Eclipse (macOS)) (`Window | Next Project Window`)

* Switch to the previous project window: `Ctrl+Alt+[` (Windows), `⌘ ⌥ ⇧ `` (macOS), `⌘ ⌥ [` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ `` (macOS System Shortcuts), `Ctrl+Alt+[` (XWin), `Ctrl+Alt+[` (GNOME), `Ctrl+Alt+[` (KDE), `Ctrl+Alt+[` (Emacs), `Ctrl+Alt+[` (Sublime Text), `⌘ ⌥ ⇧ `` (Sublime Text (macOS)), `Ctrl+Alt+[` (Xcode), `Ctrl+Alt+[` (Visual Studio), `⌘ ⌥ ⇧ `` (Visual Studio (macOS)), `Ctrl+Alt+[` (ReSharper), `⌘ ⌥ ⇧ `` (ReSharper (macOS)), `Ctrl+Alt+[` (QtCreator), `⌘ ⌥ ⇧ `` (QtCreator (macOS)), `Ctrl+Alt+[` (NetBeans), `Ctrl+Alt+[` (Eclipse), `⌘ ⌥ ⇧ `` (Eclipse (macOS)) (`Window | Previous Project Window`)

Alternatively, open the `Window` menu and select the project to which you want to switch.

## Change project location

Procedure: Move a project to another location

1. In the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `⌘ 1` (Xcode), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (ReSharper), `⌘ 1` (ReSharper (macOS)), `Alt+X` (QtCreator), `⌃ X` (QtCreator (macOS)), `Ctrl+1` (NetBeans), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) , right-click the project directory and select `Refactor | Move directory` (`F6` (Windows), `F6` (macOS), `F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ I` (macOS System Shortcuts), `F6` (XWin), `F6` (GNOME), `F6` (KDE), `F6` (Emacs), `F6` (Sublime Text), `F6` (Sublime Text (macOS)), `⌥ F6` (Xcode), `Ctrl+R, O` (Visual Studio), `⌘ R, O` (Visual Studio (macOS)), `F6` (ReSharper), `F6` (ReSharper (macOS)), `F6` (QtCreator), `F6` (QtCreator (macOS)), `Ctrl+M` (NetBeans), `Alt+Shift+V` (Eclipse), `⌘ ⌥ V` (Eclipse (macOS))).

2. In the dialog that opens, specify a new location for the project and click Refactor.

Procedure: Change the default location for projects

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), select `Appearance & Behavior | System Settings`.

2. In the Default project directory field, specify the path to the directory in which you want to store your projects.

This directory is also opened when you select `File | Open` from the main menu.

3. Apply the changes and close the dialog.

## Closing projects

If you need to close only one project, you can either close the project window or select `File | Close Project` from the main menu.

If you work with multiple projects, use the following actions to close many projects at once:

Procedure: Close all projects

* In the main menu, go to `File | Close All Projects`.

This action closes all projects that are currently opened in CLion.

Procedure: Close all but the current project

* In the main menu, go to `File | Close Other Projects`.

This action closes all opened projects except the current one.

## See also

### Concepts

[Projects](project.html)

### Reference

[Project tool window](project-tool-window.html)

