0
0

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 1 year has passed since last update.

centOSの計算機にyumでhtopをインストールした方法

Posted at

centOSの計算機にyumでhtopをインストールした。
topよりも視認性が良くて使いやすいと思っている。

以下のことについて記そうと思う。

  • userをrootに追加
  • yumでhtopをインストール

下準備(userをrootに追加)

まずはyumがあるかの確認。

$ yum --version
4.4.2

ところで自分のアカウントがどうやらsudoersに入っていないらしい。
sudoができないということ。
まずはrootに移る。

$ su - root
パスワード:

ここでのパスワードはrootのパスワードである(もちろんだがこれを知っている前提である)。
そして以下の通り入力。

# visudo

表示されたファイルの中から以下の部分を見つける。

## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

私はviユーザではないが、iで書き込みモード、escでコマンドモードになるらしい。
この直後のところに以下を追加。

<user名>    ALL=(ALL)       ALL

コマンドモードに戻して:wqで上書き保存。
rootを抜ける。

# exit

参考にしたサイトはこちら

htopのインストール

まずは以下を入力。

$ sudo yum install epel-release

次に以下を入力。

$ sudo yum install htop -y

これで無事htopがインストールされた。
立ち上げ方は次の通り。

$ htop

終わらせるときはqを入力すれば良い。
参考にしたサイトはこちら

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?