# .bashrc ignored after update to 10

**URL:** <https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043>\
**Category:** Troubleshooting\
**Created:** [17 March 2026 08:12 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043 "2026-03-17T08:12:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![adude00](https://dietpi.com/forum/user_avatar/dietpi.com/adude00/32/8182_2.png) [@adude00](https://dietpi.com/forum/u/adude00)\
**Post date:** [17 March 2026 08:12 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/1 "2026-03-17T08:12:30Z")

</div>

Hello.

After updating to DietPI version 10 it seems that **.bashrc** is not loaded at login anymore as the ouput of _ls_ is not colorized:

 ![RMDP8t](https://dietpi.com/forum/uploads/default/original/2X/1/1b4e345632b2a75e72ab08f2633210c82141f4f8.png)  
I can fix it by typing “bash” then it works

![3vL1uf](https://dietpi.com/forum/uploads/default/original/2X/3/3504fe66461bfb403d8f407af31d120143bbca8d.png)  
but I’d like to fix it forever.

I have a very simple .bashrc

`export LS_OPTIONS=‘–color=auto’`  
`eval “$(dircolors)”`  
`alias ls=‘ls $LS_OPTIONS’`  
`alias ll=‘ls $LS_OPTIONS -l’`  
`alias l=‘ls $LS_OPTIONS -lA’`

### Creating a bug report/issue

I have searched the existing open and closed issues

#### Required Information

- DietPi version | `10.1.2`
- Distro version | bookworm 0
- Kernel version | Linux pi5 6.12.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.62-1+rpt1~bookworm (2026-01-19) aarch64 GNU/Linux
- Architecture | arm64
- SBC model | RPi 5 Model B (aarch64) or (EG: RPi3)
- Power supply used | Original Raspberry PI 5 power supply
- SD card used | Lexar NM610 PRO NVME SSD

#### Additional Information (if applicable)

- Software title | bash
- Was the software title installed freshly or updated/migrated? updated to 10
- Can this issue be replicated on a fresh installation of DietPi? unaware  
← If you sent a “dietpi-bugreport”, please paste the ID here →
- Bug report ID | dacad5af-2f1d-4436-b31f-bfc833750c27

#### Steps to reproduce

1. login via ssh
2. type _ls_ to see that bashrc is indeed ignored as the output is not colorized

#### Expected behaviour

- bashrc should be loaded therefore _ls_ should be colorized

#### Actual behaviour

- login via ssh
- type bash
- everything works

#### Extra details

- I’ve noticed that the default shell after login via ssh is “-bash”, with a leading dash:  
`root@pi5:~# echo $0`  
`-bash`
- after typing “bash” the leading dash goes away and it becomes a full working shell  
`root@pi5:~# echo $0`  
`bash`

I understand this is a trivial and possibly quite easy issue to fix so is definetly low priority yet I’d appreciate any help sent this way.

Cheers!

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [17 March 2026 12:06 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/2 "2026-03-17T12:06:23Z")

</div>

`-bash` means it’s the login shell, which does not automatically load `.bashrc`.

But you should have a `.profile` which cares about loading `.bashrc`:

```auto
# ~/.profile: executed by Bourne-compatible login shells.

if ["$BASH"]; then
  if [-f ~/.bashrc]; then
    . ~/.bashrc
  fi
fi

mesg n 2> /dev/null || true

```

I also did not encounter this issue when updating to v10.  
Did you change something manually?

---

<div class="post-metadata">

**Author:** ![adude00](https://dietpi.com/forum/user_avatar/dietpi.com/adude00/32/8182_2.png) [@adude00](https://dietpi.com/forum/u/adude00)\
**Post date:** [17 March 2026 12:45 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/3 "2026-03-17T12:45:11Z")

</div>

My `.profile` is the same as yours, yet `.bashrc` it’s not loaded.

I tried adding a simple`. ~/.bashrc` at the beginning of the file, skipping the two `if` altogether, yet nothing changed. I guess `.profile` is also not loaded?

While normally I might be the one to mess around I actually took great care NOT to mess with this system at all: this raspberry is _only_ used to host docker containers, it has basically no package installed, and its kept constantly (monthly?) updated. I did skip 10.0.0 but I made the jump to 10 at the first minor release.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [17 March 2026 16:07 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/4 "2026-03-17T16:07:36Z")

</div>

Alright, let’s check some things

```auto
echo $HOME
ls -la $HOME
ls -la ~ | grep bash_profile
echo $-
grep $(whoami) /etc/passwd

```

I assume you use the same app to connect via SSH as before the update?

---

<div class="post-metadata">

**Author:** ![adude00](https://dietpi.com/forum/user_avatar/dietpi.com/adude00/32/8182_2.png) [@adude00](https://dietpi.com/forum/u/adude00)\
**Post date:** [18 March 2026 08:25 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/5 "2026-03-18T08:25:51Z")

</div>

First of all, thank you for your help.

Yes, same app.

```auto
root@pi5:\~# echo $HOME
/root
root@pi5:\~# ls -la $HOME
total 120
drwx------ 7 root root 4096 Mar 17 16:02 .
drwxr-xr-x 18 root root 4096 Feb 22 00:56 ..
-rw------- 1 root root 6554 Mar 17 16:02 .bash_history
-rw-r–r-- 1 root root 637 Aug 9 2025 .bashrc
drwx------ 4 root root 4096 Jun 7 2025 .config
-rw------- 1 root root 68 Mar 17 15:27 .git-credentials
-rw-r–r-- 1 root root 242 Aug 8 2025 .gitconfig
drwxr-xr-x 2 root root 4096 Jun 5 2025 .inxi
-rw------- 1 root root 166 Mar 17 13:39 .lesshst
drwxr-xr-x 3 root root 4096 Nov 26 14:02 .local
-rw-r–r-- 1 root root 161 Mar 17 13:35 .profile
-rw-r–r-- 1 root root 75 Jun 28 2025 .selected_editor
drwx------ 2 root root 4096 Jul 15 2025 .ssh
drwxr-xr-x 2 root root 4096 Mar 3 12:41 .vim
-rw------- 1 root root 36508 Mar 17 13:35 .viminfo
-rw-r–r-- 1 root root 10 Jun 5 2025 .vimrc
-rw-r–r-- 1 root root 347 Dec 1 16:49 .wget-hsts
lrwxrwxrwx 1 root root 31 Aug 8 2025 Events.log → /opt/docker/openhab5/Events.log
lrwxrwxrwx 1 root root 32 Aug 8 2025 Openhab.log → /opt/docker/openhab5/Openhab.log
-rwxr-xr-x 1 root root 24 Dec 1 10:31 bash.sh
lrwxrwxrwx 1 root root 33 Dec 16 15:05 campanello.sh → /opt/docker/rsyslog/campanello.sh
lrwxrwxrwx 1 root root 25 Jun 5 2025 config.txt → /boot/firmware/config.txt
lrwxrwxrwx 1 root root 43 Jun 12 2025 docker-compose@.service → /etc/systemd/system/docker-compose@.service
-rw-r–r-- 1 root root 22 Jul 12 2025 log.sh
lrwxrwxrwx 1 root root 34 Aug 8 2025 openhab_conf → /opt/docker/openhab5/openhab_conf/
lrwxrwxrwx 1 root root 25 Dec 2 09:50 rsyslog → /opt/docker/rsyslog/data/
-rwxr-xr-x 1 root root 22 Jun 5 2025 sh.sh
-rw-r–r-- 1 root root 235 Jun 5 2025 stress.sh
root@pi5:\~# ls -la \~ | grep bash_profile
root@pi5:\~# echo $-
himBHs
root@pi5:\~# grep $(whoami) /etc/passwd
root:x:0:0:root:/root:/bin/bash
root@pi5:\~#

```

I don’t see anything weird, do you?

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [18 March 2026 17:59 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/6 "2026-03-18T17:59:27Z")

</div>

Yes, looks fine to me too: No .bash\_profile which could interfere, also session started in interactive mode. ALso right shell and user, I have no idea why it’s failing 😃

@MichaIng do you have any idea?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [18 March 2026 18:39 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/7 "2026-03-18T18:39:29Z")

</div>

What is also weird is that your first `ls` output lists one file per line, but without the mode/owner/size stuff `ls -l` would list. So that shell seems to have some alias already.

Which SSH server and which SSH client do you use? Do you face the same when logging in at local console?

Also, do SSH logins show the DietPi banner? That would at least indicate `/etc/bash.bashrc` is loaded.

These commands should give some clarification:

```sh
env
alias

```

You could also set a test variable in `~/.profile` to see whether it is loaded or not. Ah, and a more explicit test, whether it is a login shell:

```auto
shopt -q login_shell && echo 'login shell' || echo 'no login shell'

```

However, this affects `/etc/profile` and `~/.profile` loading only. In an interactive non-login shell, `/etc/bash.bashrc` and `~/.bashrc` would be loaded regardless.

---

<div class="post-metadata">

**Author:** ![adude00](https://dietpi.com/forum/user_avatar/dietpi.com/adude00/32/8182_2.png) [@adude00](https://dietpi.com/forum/u/adude00)\
**Post date:** [31 March 2026 12:29 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/8 "2026-03-31T12:29:43Z")

</div>

I apologize for the delay in my reply. The banner IS displayed and the behaviour is client-agnostic: it’s the same from basic cli ssh in my mac as with putty on windows or even normal ssh from another linux machine.

I just get weird one-line black and white ls even if env and aliases are loaded. Until typing “bash”, then all is fine.

As requested:

`env`

```auto
root@pi5:\~# env
SHELL=/bin/bash
PWD=/root
LOGNAME=root
LS_OPTIONS=–color=auto
HOME=/root
LANG=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*\~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
SSH_PUBKEYINFO=masked-for-privacy
SSH_CONNECTION=172.27.72.130 51342 172.27.72.11 22
TERM=xterm
USER=root
SHLVL=1
SSH_CLIENT=172.27.72.130 51342 22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SSH_TTY=/dev/pts/0
\_=/usr/bin/env
root@pi5:\~#

```

`alias`

```auto
root@pi5:\~# alias
alias 1337=‘echo “Indeed, you are =)”’
alias cpu=‘/boot/dietpi/dietpi-cpuinfo’
alias dietpi-autostart=‘/boot/dietpi/dietpi-autostart’
alias dietpi-backup=‘/boot/dietpi/dietpi-backup’
alias dietpi-banner=‘/boot/dietpi/func/dietpi-banner’
alias dietpi-benchmark=‘/boot/dietpi/dietpi-benchmark’
alias dietpi-bugreport=‘/boot/dietpi/dietpi-bugreport’
alias dietpi-cleaner=‘/boot/dietpi/dietpi-cleaner’
alias dietpi-cloudshell=‘/boot/dietpi/dietpi-cloudshell’
alias dietpi-config=‘/boot/dietpi/dietpi-config’
alias dietpi-cron=‘/boot/dietpi/dietpi-cron’
alias dietpi-ddns=‘/boot/dietpi/dietpi-ddns’
alias dietpi-display=‘/boot/dietpi/dietpi-display’
alias dietpi-drive_manager=‘/boot/dietpi/dietpi-drive_manager’
alias dietpi-explorer=‘/boot/dietpi/dietpi-explorer’
alias dietpi-justboom=‘/boot/dietpi/misc/dietpi-justboom’
alias dietpi-launcher=‘/boot/dietpi/dietpi-launcher’
alias dietpi-led_control=‘/boot/dietpi/dietpi-led_control’
alias dietpi-letsencrypt=‘/boot/dietpi/dietpi-letsencrypt’
alias dietpi-logclear=‘/boot/dietpi/func/dietpi-logclear’
alias dietpi-morsecode=‘/boot/dietpi/dietpi-morsecode’
alias dietpi-optimal_mtu=‘/boot/dietpi/func/dietpi-optimal_mtu’
alias dietpi-services=‘/boot/dietpi/dietpi-services’
alias dietpi-software=‘/boot/dietpi/dietpi-software’
alias dietpi-survey=‘/boot/dietpi/dietpi-survey’
alias dietpi-sync=‘/boot/dietpi/dietpi-sync’
alias dietpi-update=‘/boot/dietpi/dietpi-update’
alias dietpi-vpn=‘/boot/dietpi/dietpi-vpn’
alias dietpi-wifidb=‘/boot/dietpi/func/dietpi-wifidb’
alias l=‘ls $LS_OPTIONS -lA’
alias ll=‘ls $LS_OPTIONS -l’
alias ls=‘ls $LS_OPTIONS’
alias openhab-cli=‘docker exec -it openhab5 /openhab/runtime/bin/client’
alias sudo='sudo ’
root@pi5:\~#

```

It also appears to be a login shell

```auto
root@pi5:\~# shopt -q login_shell && echo ‘login shell’ || echo ‘no login shell’
login shell
root@pi5:\~#

```

Also, I’ve just updated to the latest v10.2.3

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [3 April 2026 16:27 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/9 "2026-04-03T16:27:26Z")

</div>

So that was before running `bash`? So everything is defined as expected, `ls` color option, the colors themselves, no single file per line in any `ls` alias, which would be the `ls -1` option (“one”, not “L”).

So the environment looks all as expected, the `.bashrc` is not the issue. But can you compare the output of the commands after running `bash`? It should not be a login shell anymore and have `SHLVL=2`, but otherwise should be pretty much the same.

However, aside of the environment, also the terminal and shell can be configured. So comparing these might also give a hint:

```sh
set -o
shopt

```

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [29 September 2026 04:27 UTC](https://dietpi.com/forum/t/bashrc-ignored-after-update-to-10/25043/10 "2026-09-29T04:27:53Z")

</div>

Closed on 29 September 2026 04:27 UTC

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.
