bash windows

WSL Bashで".bashrc 許可がありません"の対処

Windowsを再起動してからBashを開くと、.bashrcが実行されないことがある。WSL Linux Bashコマンドラインで".bashrc 許可がありません"のエラーが起こる場合の対処について紹介します。権限を確認してみると…

Shou Arisaka
1 分で読める
2018年10月13日

Windowsを再起動してからBashを開くと、.bashrcが実行されないことがある。 WSL Linux Bashコマンドラインで”.bashrc: 許可がありません”のエラーが起こる場合の対処について紹介します。

$ ls -al ~
合計 124
drwxr-xr-x 1 yuis yuis  4096  8月 12 07:50 .
drwxr-xr-x 1 root root  4096  9月 30  2017 ..
drwx------ 1 yuis yuis  4096  3月  6 00:39 .aptitude
-rw-rw-rw- 1 yuis yuis 28823  7月 12 22:45 .babel.json
-rw------- 1 yuis yuis 13920  8月 12 15:03 .bash_history
-rw-r--r-- 1 yuis yuis   220  9月 30  2017 .bash_logout
---------- 1 yuis yuis  5272  8月 12 04:32 .bashrc
-rwxr-xr-x 1 yuis yuis  5272  8月 12 07:50 .bashrc.bak

権限を確認してみると、やはりなぜか権限が消えている。何故だ…。

cd ~ && sudo chmod 755 .bashrc && sudo chmod 755 .env && bash

これで権限を変えて、新しく開いて.bashrcが読み込まれることを確認できればokです。

この記事をシェア

Shou Arisaka 2018年10月13日

🔗 リンクをコピー