How to open a .erl file
Quick, free ways to open Erlang on any system.
A .erl file is a Erlang Source File. If double-clicking does nothing, your computer simply does not have an app that reads Erlang yet. Here is how to fix that on each operating system, using free software wherever possible.
Open a .erl file step by step
- Confirm the file really is a .erl. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
- On Windows, open it with VS Code (Erlang LS) or any text editor.
- On Mac, use VS Code (Erlang LS) or any text editor.
- On Linux, try VS Code (Erlang LS) or Emacs (erlang-mode).
- Still stuck? Convert the .erl to beam (bytecode), which opens more widely.
Best apps to open .erl files
Windows
- VS Code (Erlang LS)
- any text editor
macOS
- VS Code (Erlang LS)
- any text editor
Linux
- VS Code (Erlang LS)
- Emacs (erlang-mode)
- any text editor
!
Before you open it: Caution. An .erl file is program source that runs on the BEAM. Review unfamiliar code before compiling and running it.
Frequently asked questions
Why can't I open my .erl file?
Almost always because no installed app understands Erlang. Install one of the apps above, or convert the file to a format your existing software already reads.
How do I run an .erl file?
Compile it in the Erlang shell with c(module). and call its functions, or use rebar3 to build a project. The erl shell comes with the Erlang/OTP install.
What is the difference between .erl and .hrl?
An .erl file is a module with code; an .hrl file is a header holding shared record definitions and macros that modules include.