Description of problem: A login shell within containers does not set $HOSTNAME which is bad because e.g. $PS1 requires this variable. This is caused by | HOSTNAME=`/usr/bin/hostnamectl --transient 2>/dev/null` in /etc/profile. 'hostnamectl' might not be installed in containers and when, it is not working there | $ /usr/bin/hostnamectl --transient | System has not been booted with systemd as init system (PID 1). Can't operate. | Failed to connect to bus: Host is down or | Failed to create bus connection: No such file or directory Previous fedora versions used 'HOSTNAME=/bin/hostname' which is better. But due to missing 'hostname' package in default containers it is not working there either. Non-login shells are working fine because they do not execute /etc/profile at all and keep $HOSTNAME untouched (it is set by bash internally). I suggest: - remove HOSTNAME setting completely when the shell is bash - use 'uname -n' instead of hostname or hostnamectl, or check the return value and set HOSTNAME only on success | if i=`/bin/hostname 2>/dev/null`; then | HOSTNAME=$i | fi Version-Release number of selected component (if applicable): setup-2.13.7-2.fc33.noarch How reproducible: 100% Steps to Reproduce: 1. podman run -it fedora:33 sh -l -c 'echo $HOSTNAME' 2. podman run -it centos:8 sh -l -c 'echo $HOSTNAME' Actual results: 1. empty output (bad) 2. hostname (container id)