Linux
Command
Library
Basics
Tips
Commands
System control
Lock screen
$
gnome-screensaver-command
-l
$
dbus-send
--type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock
Unlock screen
$
gnome-screensaver-command
-a
$
dbus-send
--type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive boolean:false
Reboot the system
$
reboot
$
shutdown
-r
$
systemctl
reboot
Shutdown the system
$
poweroff
$
shutdown
-h now
$
reboot
-p
$
systemctl
poweroff
$
halt
Shutdown the system at a specific time
$
shutdown
-h 18:45 "Server is going down for maintenance"
Stop Bluetooth service
$
service
bluetooth stop
$
systemctl
stop bluetooth
Start Bluetooth service
$
service
bluetooth start
$
systemctl
start bluetooth
Stop wifi service
$
nmcli
nm wifi off
Start wifi service
$
nmcli
nm wifi on
Turn off monitor
$
xset
dpms force off
Suspend the system
$
systemctl
suspend
$
pm-suspend
Hibernate the system
$
systemctl
hibernate
List running services
$
systemctl
list-units --type=service
$
service
--status-all
Start a service
$
systemctl
start [serviceName]
$
service
[serviceName] start
Stop a service
$
systemctl
stop [serviceName]
$
service
[serviceName] stop
Enable service at boot
$
systemctl
enable [serviceName]
View service logs
$
journalctl
-u [serviceName]
> TERMINAL_GEAR
Curated for the Linux community
Copied to clipboard
> TERMINAL_GEAR
Curated for the Linux community