# Opening files

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/llms.txt).

You can now open and work with individual files in GoLand without creating a full project. This mode is ideal for quick edits, code reviews, and experimenting with small code snippets.

GoLand provides several ways to open a single file.

Procedure: Open a file by dragging it into the IDE

1. From your file browser (Finder, Explorer, or another file manager), drag the file to the Welcome  screen.

2. GoLand opens the file in a new tab without creating a project.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_open_file_by_drag.mp4)

Procedure: Open a file from the command line

You can open a file directly from the terminal using the `goland` command.

1. In the terminal, run the following command:

Windows:

You can find the executable for running GoLand in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this executable as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

Syntax
: ```PLAINTEXT
: goland64.exe [--line <number>] [--column <number>] <path>
: ```

Examples
: Open a project:
:
:
:
:
:
:
: ```SHELL
: goland64.exe C:\MyProject
: ```
:
:
:
:
:
: Open a specific file on line number 42:
:
:
:
:
:
:
:
:
:
:
: ```SHELL
: goland64.exe --line 42 C:\MyProject\main.go
: ```

macOS:

By default, GoLand does not provide a command-line launcher. For more information about creating a launcher script for GoLand, refer to [Command-line interface](working-with-the-ide-features-from-command-line.html).

Syntax
: ```PLAINTEXT
: goland [--line <number>] [--column <number>] <path>
: ```

Examples
: Open a project:
:
:
:
:
:
:
: ```SHELL
: goland ~/MyProject
: ```
:
:
:
:
:
: Open a specific file on line number 42:
:
:
:
:
:
:
:
:
:
:
: ```SHELL
: goland --line 42 ~/MyProject/main.go
: ```

Linux:

You can find the script for running GoLand in the [installation directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html) under `bin`. To use this script as the command-line launcher, add it to your system `PATH` as described in [Command-line interface](working-with-the-ide-features-from-command-line.html).

Syntax
: ```PLAINTEXT
: goland.sh [--line <number>] [--column <number>] <number> <path>
: ```

Examples
: Open a project:
:
:
:
:
:
:
: ```SHELL
: goland.sh ~/MyProject
: ```
:
:
:
:
:
: Open a specific file on line number 42:
:
:
:
:
:
:
:
:
:
:
: ```SHELL
: goland.sh --line 42 ~/MyProject/main.go
: ```

2. The specified file will open in GoLand without creating a new project.

> **Note:**
> On macOS, the `goland` command is automatically available after installation. For other operating systems, refer to the [GoLand documentation](https://www.jetbrains.com/help/go/opening-files-from-command-line.html) for setup details.

Procedure: Open a file by double-clicking it

1. In your file browser, double-click the file you want to open.

2. If GoLand is set as the default editor for the file type, the file will open automatically in GoLand.

Procedure: Open a file using the main menu

1. Select `File | Open` from the main menu.

2. In the dialog that opens, navigate to the file you want to open and click Open.

![Open file dialog in GoLand](https://resources.jetbrains.com/help/img/idea/2026.3/go_open_file_dialog.png)

Procedure: Open a file from the Welcome screen

1. On the Welcome screen, click Open.

2. In the dialog that opens, select the file you want to open and click Open.

![Open file from the Welcome screen](https://resources.jetbrains.com/help/img/idea/2026.3/go_open_file_from_welcome_screen.png)

