ユーザ用ツール

サイト用ツール


linux

Linux

終了・再起動

  • poweroff 停止して電源オフ
  • halt 停止のみ
  • reboot 再起動
  • shutdown
    • -H, –halt 停止のみ
    • -h, -P –poweroff 停止して電源オフ
    • -r, –reboot 再起動

これらコマンドはsystemd採用のLinuxでは systemctl へのリンクとなっており、poweroffは以下のコマンドに相当する

systemctl poweroff 

これはさらに以下に相当する

systemctl start poweroff.target --job-mode=replace-irreversibly --no-block

haltは停止するだけで電源を落とさない。よってVirtualBox上などで仮想アプライアンスとして起動している場合、Linuxが終了してもVMは終了しないので使用しない方がいいかもしれない

man

コマンドがよくわからない時はman(manual)

man ls

最近作られたコマンドはmanがなく -h などのオプションでヘルプを表示するものも多いが、基本的なコマンドならばmanがある。

sudo

sudoerファイルの編集

# visudo
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Windowsファイル共有をマウント

# mount -t cifs -o username=usr,password=pwd,iocharset=utf8,codepage=utf8 //192.168.1.5/shared ~/samba

ドメイン使ってる場合は知らん

システムクロック

今の設定を見る

$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
kvm-clock

使用可能なやつを見る

$ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
kvm-clock tsc acpi_pm
linux.txt · 最終更新: 2024/04/26 02:19 by nullpon