2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Amazon linux 2でsystemctlコマンドが見つからないとき

Posted at

いつもと違うインスタンス内でsystemctlコマンドを使ってcrondの再起動をしようと思ったら
以下のエラーメッセージが出ました

エラーメッセージ

$ sudo systemctl restart crond
sudo: systemctl: コマンドが見つかりません

解決方法

systemctlコマンドが使えなかったのでserviceコマンドを使用しました

$ sudo service crond restart
Stopping crond:                                            [  OK  ]
Starting crond:                                            [  OK  ]

serviceコマンドを使用することでcrondの再起動を行うことができました。

よく使うコマンド

sudo service nginx status

sudo service nginx restart

sudo service nginx stop

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?