TIDE
Languages

D

Installing the D Programming Language on Ubuntu in TIDE

D Programming Language

D is a general-purpose programming language with static typing, systems-level access, and C-like syntax, designed for high productivity and performance.

Installation

You can install D on Ubuntu using either the LLVM D Compiler (ldc) and package manager (dub) via apt, or using the official installation script for dmd.

Run the following commands in TIDE's terminal:

sudo apt update
sudo apt install -y ldc dub

Option 2: Using the Official DMD Installer

To install the reference compiler (dmd):

curl -fsSL https://dlang.org/install.sh | bash -s dmd
source ~/dlang/dmd-*/activate

Verification

Check the compiler version:

ldc2 --version

Writing and Running Code

Create a file named hello.d:

hello.d
import std.stdio;

void main() {
    writeln("Hello, World from D!");
}

Run the script directly using rdmd or compile it with ldc2:

rdmd hello.d

Or compile into an executable:

ldc2 hello.d -of=hello
./hello

Official Resources

On this page