🔄 Restart

A comprehensive collection of system restart commands across 50+ programming languages.

⚠️ SECURITY WARNING: Direct OS commands cannot be run from a browser for security reasons. These buttons send AJAX requests to a server-side endpoint which would then execute the command on the server. Never deploy a server that allows unauthenticated restart commands!
Total Languages: 50 | View on GitHub

🖥️ System Languages & Shells

Shell

Bash (Linux/macOS)

sudo reboot
Shell

PowerShell (Windows)

Restart-Computer -Force
Shell

Command Prompt (Windows)

shutdown /r /t 0
Shell

Zsh (Unix/Linux)

sudo systemctl reboot
Shell

Fish Shell

sudo reboot
Shell

C Shell (csh)

sudo /sbin/reboot

🚀 Popular Programming Languages

Runtime

JavaScript (Node.js)

require('child_process').exec('shutdown /r /t 0');
Interpreted

Python

import os; os.system('sudo reboot')
Compiled

Java

Runtime.getRuntime().exec("shutdown /r /t 0");
Compiled

C#

Process.Start("shutdown", "/r /t 0");
Compiled

C++

system("shutdown /r /t 0");
Compiled

C

system("sudo reboot");

🌐 Web Technologies

Server-side

PHP

exec('sudo reboot');
Compiled

TypeScript

import { exec } from 'child_process'; exec('shutdown /r /t 0');
Runtime

Node.js (ES6)

import { exec } from 'child_process'; exec('reboot');
Runtime

Deno

await Deno.run({cmd: ["sudo", "reboot"]}).status();

📜 Scripting Languages

Interpreted

Ruby

system('sudo reboot')
Interpreted

Perl

system("sudo reboot");
Interpreted

Lua

os.execute("sudo reboot")
Interpreted

Tcl

exec sudo reboot
Text Processing

AWK

BEGIN { system("sudo reboot") }
Stream Editor

Sed

echo "reboot" | sed 's/^/sudo /' | bash

⚙️ Systems Programming

Systems

Rust

std::process::Command::new("sudo").arg("reboot").output();
Systems

Go

exec.Command("sudo", "reboot").Run()
Systems

Zig

const result = std.ChildProcess.exec(.{.argv = &[_][]const u8{"sudo", "reboot"}});
Systems

Nim

discard execShellCmd("sudo reboot")
Systems

D

import std.process; executeShell("sudo reboot");
Systems

Crystal

Process.run("sudo", ["reboot"])

🔬 Functional Languages

Functional

Haskell

import System.Process; callCommand "sudo reboot"
Functional

Common Lisp

(uiop:run-program "sudo reboot")
Functional

Scheme

(system "sudo reboot")
Functional

Clojure

(clojure.java.shell/sh "sudo" "reboot")
Functional

Erlang

os:cmd("sudo reboot").
Functional

Elixir

System.cmd("sudo", ["reboot"])

☕ JVM Languages

JVM

Scala

import scala.sys.process._; "sudo reboot".!
JVM

Kotlin

Runtime.getRuntime().exec("sudo reboot")
JVM

Groovy

"sudo reboot".execute()
JVM

Jython

import os; os.system('sudo reboot')

📊 Data Science & ML

Statistical

R

system("sudo reboot")
Numerical

MATLAB

system('sudo reboot')
Numerical

GNU Octave

system("sudo reboot")
Scientific

Julia

run(`sudo reboot`)

🎯 Specialized Languages

Apple

Swift

import Foundation; Process.launchedProcess(launchPath: "/usr/bin/sudo", arguments: ["reboot"])
Apple

Objective-C

system("sudo reboot");
Google

Dart

await Process.run('sudo', ['reboot']);
Scientific

Fortran

CALL SYSTEM('sudo reboot')
Legacy

COBOL

CALL "SYSTEM" USING "sudo reboot"
Educational

Pascal

program restart; uses SysUtils; begin ExecuteProcess('sudo', 'reboot'); end.

🌟 Emerging Languages

Systems

V

import os; os.system('sudo reboot')
Google

Carbon

// Carbon syntax (experimental)
Run.Command("sudo reboot");
Systems

Odin

import "core:os"; os.system("sudo reboot")
Reactive

Red

call/shell "sudo reboot"

🔧 Assembly & Low-level

Low-level

Assembly (x86-64)

; System call to execute reboot
mov rax, 59        ; sys_execve
mov rdi, cmd       ; command
syscall
Assembler

NASM

section .text
global _start
_start:
    mov eax, 11     ; sys_execve
    int 0x80        ; system call