This repository contains "Hello, World!" programs in a large variety of programming languages. The table below lists each language, its corresponding file, and common commands to run or compile the program.
Note: You will need to have the appropriate compiler, interpreter, or runtime environment installed for each language to execute these commands. The commands are examples and may vary based on your system setup.
| Language | File | Compilation / Run Command |
|---|---|---|
| Ada | hello.adb |
gnatmake hello.adb; ./hello |
| Assembly (FASM/Win32) | hello.asm |
fasm hello.asm; ./hello.exe |
| AWK | hello.awk |
awk -f hello.awk |
| BASIC | hello.bas |
(Requires a BASIC interpreter, e.g., QB64) |
| Batch (Windows) | hello.bat |
.\hello.bat |
| Brainfuck | hello.bf |
(Requires a Brainfuck interpreter) |
| C | hello.c |
gcc hello.c -o hello_c.exe; .\hello_c.exe |
| C++ | hello.cpp |
g++ hello.cpp -o hello_cpp.exe; .\hello_cpp.exe |
| C# | hello.cs |
csc hello.cs; .\hello.exe |
| Chef | hello.chef |
(Requires a Chef interpreter) |
| Clojure | hello.clj |
clj hello.clj |
| COBOL | hello.cob |
cobc -x -o hello.exe hello.cob; .\hello.exe |
| CoffeeScript | hello.coffee |
coffee hello.coffee |
| Crystal | hello.cr |
crystal run hello.cr |
| D | hello.d |
dmd hello.d; .\hello.exe |
| Dart | hello.dart |
dart hello.dart |
| Elixir | hello.exs |
elixir hello.exs |
| Elm | hello.elm |
elm make hello.elm |
| Erlang | hello.erl |
erlc hello.erl; erl -noshell -s hello start -s init stop |
| F# | hello.fs |
fsc hello.fs; .\hello.exe |
| Forth | hello.fth |
gforth hello.fth |
| Fortran | hello.f90 |
gfortran hello.f90 -o hello_f90.exe; .\hello_f90.exe |
| Go | hello.go |
go run hello.go |
| Groovy | hello.groovy |
groovy hello.groovy |
| Hack | hello.hack |
hhvm hello.hack |
| Haskell | hello.hs |
runghc hello.hs |
| HTML | hello.html |
(Open in a web browser) |
| Idris | hello.idr |
idris hello.idr -o hello_idr; ./hello_idr |
| INTERCAL | hello.i |
(Requires an INTERCAL compiler) |
| Java | hello.java |
javac hello.java; java Hello (Note: class name is Hello) |
| JavaScript | hello.js |
node hello.js |
| Julia | hello.jl |
julia hello.jl |
| Kotlin | Hello.kt |
kotlinc Hello.kt -include-runtime -d hello.jar; java -jar hello.jar |
| Lisp (Common Lisp) | hello.lisp |
sbcl --script hello.lisp |
| LOLCODE | hello.lol |
lci hello.lol |
| Lua | hello.lua |
lua hello.lua |
| MATLAB | hello_matlab.m |
(Run in MATLAB environment) |
| Nim | hello.nim |
nim compile --run hello.nim |
| OCaml | hello.ml |
ocaml hello.ml |
| Objective-C | hello.m |
gcc -o hello_objc.exe hello.m -lobjc -lgnustep-base (using GNUStep) |
| Pascal | hello.pas |
fpc hello.pas -ohello_pas.exe; .\hello_pas.exe |
| Perl | hello.pl |
perl hello.pl |
| PHP | hello.php |
php hello.php |
| PowerShell | hello.ps1 |
pwsh -File .\hello.ps1 |
| Prolog | hello.pro |
swipl -s hello.pro -g main -t halt. |
| Python | hello.py |
python hello.py |
| R | hello.R |
Rscript hello.R |
| Racket | hello.rkt |
racket hello.rkt |
| Ruby | hello.rb |
ruby hello.rb |
| Rust | hello.rs |
rustc hello.rs; .\hello.exe |
| Scala | hello.scala |
scalac hello.scala; scala HelloWorld |
| Scheme | hello.scm |
(Requires a Scheme interpreter, e.g., Guile, Chicken) |
| Shell (Bash) | hello.sh |
bash hello.sh |
| Smalltalk | hello.st |
(Requires a Smalltalk environment, e.g., Gnu Smalltalk, Pharo) |
| SQL | hello.sql |
(Run in any SQL client, e.g., sqlite3, psql) |
| Swift | hello.swift |
swift hello.swift |
| Tcl | hello.tcl |
tclsh hello.tcl |
| TypeScript | hello.ts |
tsc hello.ts; node hello.js |
| Vala | hello.vala |
valac hello.vala; .\hello.exe |
| VB.NET | hello.vb |
vbc hello.vb; .\hello.exe |
| VBScript | hello.vbs |
cscript hello.vbs |
| Whitespace | hello.ws |
(Requires a Whitespace interpreter) |
| XSLT | hello.xslt |
(Requires an XSLT processor like xsltproc) |
| Zig | hello.zig |
zig run hello.zig |