Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 567612235AF for <~alpine/users@lists.alpinelinux.org>; Sat, 25 May 2024 23:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=citron; t=1716678430; x=1717345096; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: author:from:subject:date:to:cc:resent-date:resent-from:resent-to: resent-cc:in-reply-to:references:mime-version:content-type: content-transfer-encoding:message-id:mail-followup-to:openpgp: blahblahblah; bh=SzxMECUVhirYLbs0lhkJnTXaMsVjx7It3WgTLxh1r4s=; b=lwLpdsDzEqrmo1RigFuuBSpPZ48rq6Ijf7Zh4sKrkSXdtaaahECaVpiXuWelo3F7siCbiEBq GZfD0NWZ6oDqPdlugvYBh5hB2HJ+JjpnroqCg16RBN5IGQuR5Em6Tm6IyMNQG8NgMPRkOtCbNv kEH4JsszXfYJakMfLaKMCfBndqX9dnFnHDukg49caBXQUMqsvf+pQmx/0es87mHPLMh95YSN4D gPtquui9qTK8BH4CP0AzP5fZfWrI5DFqGN5bJEWZ48VDZih22VmQkD/7MWCuhqQYcfRrOEgscl e77NPxCv9p0U7rGbOdoJmAI+n3Djerf+90MwNsi5yv9VkffQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=orange; t=1716678430; x=1717345096; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: author:from:subject:date:to:cc:resent-date:resent-from:resent-to: resent-cc:in-reply-to:references:mime-version:content-type: content-transfer-encoding:message-id:mail-followup-to:openpgp: blahblahblah; bh=SzxMECUVhirYLbs0lhkJnTXaMsVjx7It3WgTLxh1r4s=; b=Y5wu2RsW61la6kGtsOiZ3/JjUvsadOKF2FSwtFH+ujcq5O0Lqu3OUTkB7wDPpo8ldOnLJcHf ilKiD1gx3//rBQ== Date: Sun, 26 May 2024 01:07:08 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Tobias Leupold Cc: ~alpine/users@lists.alpinelinux.org Subject: Re: ash and su/su - Message-ID: <20240525230708.4BKNEgwF@steffen%sdaoden.eu> In-Reply-To: <1926392.IobQ9Gjlxr@ginuog> References: <1926392.IobQ9Gjlxr@ginuog> Mail-Followup-To: Tobias Leupold , ~alpine/users@lists.alpinelinux.org User-Agent: s-nail v14.9.24-621-g0d1e55f367 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Tobias Leupold wrote in <1926392.IobQ9Gjlxr@ginuog>: |I'm new to Alpine Linux. I replaced Devuan with Alpine for my Raspberry Pi |yesterday, and now I stumbled upon one thing that may be due to the \ |Busybox |ash shell: | |I wanted to keep the nice minimalism Alpine brings and keep using ash \ |(on all |my other machines, I have, like most of us, bash). I learned I could add |~/.profile to add a nice PS1, aliases and such stuff there. I did that for |both my normal user and root. | |However, I noticed that when I run su to become root, this file is \ |not sourced |and I get the default prompt I had before, without my aliases. When \ |I do su -, |I see the shell as if I e.g. connected directly to root via ssh, but \ |e.g. the |current directory is changed to /root. | |This is different from what I know from my other machines. On my Gentoo, |Artix, Devuan and Ubuntu machines, I (apparently) see no difference to the |shell, no matter if I login directly to root, or do an su. | |So what's the background? What is the difference of "su" and "su -"? \ |And can I |make ~/.profile being sourced when I do a simple "su"? One is a full login, the other only starts an interactive shell i would think. Look at the content of $- and source your profile if you really want to. (Or create a file to source with all the things you really always want, and put in .profile only things really needed for login sessions etc.) |Thanks for all clarification and help! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)