3
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 5 years have passed since last update.

ssh キーボードの挙動修正

Last updated at Posted at 2016-05-24

BeagleBoneBlack(BBB)にUbutuを入れて数日が経ちました。これまで、Ubuntuを起動し、BBBに接続したキーボードで操作を行ってきました。しかし、今日Macからsshで接続し操作したらキーボードの挙動がおかしい。なぜかと思い調べてみるとログインシェルがおかしい模様。挙動がおかしい理由としてはuseraddなどでユーザを追加する際、-sオプション(shell)を指定せずに追加した場合などログインシェルが/bin/shになるようですね。

$ echo $SHELL
/bin/sh

以上のようにログインシェルが設定されているので /bin/bash に設定する。
設定は chsh コマンドを用いて行っていきます。デフォルトでは/bin/bashが使われるようになっているので、そのままEnterでいきます

$ chsh
Changing the login shell for ユーザ名
Enter the new value, or press ENTER for the default
	Login Shell [/bin/bash]:

しかし、ログインシェルは変わりませんでした。そのため、別の方法を試します。

/etc/passwdを修正します。
シェルを変更したいユーザの最後にシェルを指定してあげます。ほにゃららのところは皆さんの設定次第ですので、 重要なのは最後にシェルを指定することです。

ほ:にゃ:ら:ら::ら:ら:/bin/bash

これでシェルが変わっているはずです。

3
3
1

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
3
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?