Backbox Linux
  • Backbox Indonesia
  • Get's Started
    • System Requirements
    • Download Images
    • Installation
    • 5 Things To Do Right After Installing BackBox
  • Basic Linux
    • Mengenal GNU/Linux
    • Kenapa Linux?
    • Linux Desktop vs Linux Server
    • Distro Linux
    • Struktur Direktori GNU/Linux
    • Linux File System
  • Basic Command
    • Introduction
      • Terminal
      • Accessing Linux
      • Network Command
      • Important to remember of Linux
      • Change Password
    • Fundamental
      • File System Navigation Commands
      • TAB Completion and Up Arrow
      • Linux Types File
      • Linux Command Syntax
      • Help Commands
      • Creating Files & Directories
      • Files and Directories Permission
      • Files Ownership
      • Access Control List
      • Soft and Hard Links
      • Find Files and Directories
      • Files Maintenance
      • Wildcards
      • File Display Commands
      • Adding Text to Files
      • Pipeline (|)
      • Standard Output to a File (tee)
      • Filters / Text Processors Commands
      • Compare Files
      • Compress and Uncompress File
      • Truncate File Size
      • Combining and Splitting Files
      • Linux vs Windows Commands
    • System Administration
      • Linux File Editor (vi)
      • sed - Command
      • User Account Management
      • Switch Users and Sudo Access
      • Monitor Users
      • Talking to Users
      • System Utility Commands
      • Process and Jobs
      • Addtional cronjobs
      • Process Management
      • System Monitoring Commands
      • System Logs Monitor
      • System Maintenance Commands
      • Changing System Hostname
      • Finding System Information
      • Finding System Architecture
      • Terminal Commands
      • Terminal Control Keys
      • Recover Root Password
      • SOS Report
  • Bash Scripting
    • Environment Variables
    • Apa itu Shell?
    • Basic Shell Scripting
    • Input/Output
    • Percabangan (If)
    • Perulangan (For)
    • Perulangan (While)
    • Percabangan (Case)
    • Fungsi
    • Alias
    • Shell History
  • Networking
    • Untitled
  • Disk Management
    • Untitled
Powered by GitBook
On this page
  • shutdown - Command
  • halt / poweroff / reboot - Commands
  • init - Command

Was this helpful?

  1. Basic Command
  2. System Administration

System Maintenance Commands

Kali ini kita akan mempelajari cara mematikan atau me-restart komputer melalui terminal.

shutdown - Command

Dengan perintah shutdown kita bisa mematikan atau me-restart komputer bahkan secara terjadwal.

Anda dapat menentukan string waktu menggunakan now untuk saat ini atau HH:MM untuk jam/menit.

Berikut adalah contoh penggunaan perintah shutdown:

shutdown # mematikan komputer pada 1 menit kedepan
shutdown now # mematikan komputer pada saat itu
shutdown 13:20  # mematikan komputer pada jam 13:20
shutdown -p now	# mematikan kompter
shutdown -H now	# mematikan komputer secara paksa
shutdown -r 09:35	# reboot komputer pada jam 09:35

Jika argument waktu digunakan, 5 menit sebelum sistem dimatikan file /run /nologin akan dibuat untuk tidak mengizinkan aktivitas login yang baru.

halt / poweroff / reboot - Commands

Perintah halt, poweroff dan reboot adalah perintah yang sama dengan shutdown, hanya saja penulisannya yang berbeda.

halt # mematikan komputer secara paksa (seperti menekan lama tombol power)
halt -p # mematikan komputer (poweroff/biasa)
halt --reboot # reboot
poweroff # mematikan komputer (biasa)
poweroff --halt # mematikan komputer secara paksa
poweroff --reboot # reboot
reboot  # reboot
reboot --halt # mematikan komputer secara paksa
reboot -p # mematikan komputer (biasa)

init - Command

Terdapat 7 nilai init yang bisa digunakan, nilai ini dimulai dari 0 hingga 6. Berikut adalah penjelasan singkat tentang setiap nilai init:

init 0-6
init 0  :  Shutdown (goes thru the /etc/rc0.d/* scripts then halts)
init 1  :  Single user mode or emergency mode means no network no multitasking is present in this mode only root has access in this runlevel
init 2  :  No network but multitasking support is present .
init 3  :  Network is present multitasking is present but with out GUI .
init 4  :  It is similar to runlevel 3; It is reserved for other purposes in research.
init 5  :  Network is present multitasking and GUI is present with sound etc.
init 6  :  This runlevel is defined to system restart.
init 1 # mematikan komputer
init 6 # reboot
PreviousSystem Logs MonitorNextChanging System Hostname

Last updated 4 years ago

Was this helpful?

Perintah init sebenarnya sudah diganti oleh perintah systemd (Anda bisa baca ). Tetapi Anda bisa mematikan atau me-restart kompuer menggunakan perintah init.

Anda bisa membaca penjelasan tentang init lebih lanjut .

di sini
di sini