I tried to add a variable=value in /etc/environment and restarted the rpi but then doing echo $variable still gives blank until I source /etc/environment. I have to source in every session, which should not be the case. is it due to dropbear being used instead of openssh? I have a different server running ubuntu server and there it works fine. so a bit confused here.
It would be helpful if you could fill thy troubleshooting template. Somehow you removed it.
Required
- DietPi version |
cat /boot/dietpi/.version
- Distro version |
echo $G_DISTRO_NAME $G_RASPBIAN
- Kernel version |
uname -a
- Architecture |
dpkg --print-architecture
- SBC model |
echo $G_HW_MODEL_NAME
or (EG: RPi3)
As well, can you describe what like to archive? Maybe better to use export
functionality and add this to ~/.profile
- DietPi version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=25
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
-
Distro version |
echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 0
-
Kernel version |
uname -a
Linux amaterasu 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64
GNU/Linux
- Architecture |
dpkg --print-architecture
arm64
- SBC model |
echo $G_HW_MODEL_NAME
or (EG: RPi3)
RPi 4 Model B (aarch64)
I can use profile but I want it to persist across all users . now sure why it is failing in the first case. since it works fine in both the other servers, running ubuntu.
probably a difference between Ubuntu and Debian? As well it could be a difference in the shell used. We use bash.
This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.