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

kali linuxでrootユーザーなのにlocaleコマンドを打つとFailed to issue method call: Access deniedと表示されてしまう。

Last updated at Posted at 2025-04-15

概要

記事通り進めてたら詰まった。
キーボードを日本語仕様にしたいのに....

┌──(root㉿kali)-[~]
└─# localectl set-locale "LANG=ja_JP.UTF-8"
Failed to issue method call: Access denied

と表示されてしまう。

解決策

直接手動で変更する。

1.日本語スケールが利用可能か確認

locale -a

2.可能でない場合

apt-get update
apt-get install -y locales

3./etc/locale.genを直接編集

nano /etc/locale.gen

このときファイル内で「# ja_JP.UTF-8 UTF-8」の行を探し、行頭の「#」を削除して保存
それ以外は絶対#をつけてコメントアウトしてください。

4.ロケールを生成

locale-gen

5.直接システム設定ファイルを編集する

echo 'LANG=ja_JP.UTF-8' > /etc/default/locale

6.変更を確認したい。

cat /etc/default/locale

7.システム再起動

ログアウトでもいいかもしれないけど、念の為再起動しましょう。

実際のキーボード自体の変更はこの記事を参考にしてください。

参考文献(参照日2025年4月15日)

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