You are not logged in.
Pages: 1
Since a couple of years I'm using Archlinux. Last installation after 6 years is gone with old laptop. Did already a new one and got an issue. Trying to configure .bashrc and for user account, everything is ok. Root account did via wiki with coping both files from /etc/skel to /root and when I'm trying to edit /root/.bashrc and safe after that make no changes. Can anyone explain what I did wrong? Don't know why that work for user, but not for a root...
/root/.bashrc file
#
# /root/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
#Display ISO version and distribution information in short
alias version="sed -n 1p /etc/os-release && sed -n 11p /etc/os-release && sed -n 12p /etc/os-releas>
#Pacman Shortcuts
alias sync="sudo pacman -Syyy"
alias install="sudo pacman -S"
alias update="sudo pacman -Syyu"
alias search="sudo pacman -Ss"
alias search-local="sudo pacman -Qs"
alias pkg-info="sudo pacman -Qi"
alias local-install="sudo pacman -U"
alias clr-cache="sudo pacman -Scc"
alias unlock="sudo rm /var/lib/pacman/db.lck"
alias remove="sudo pacman -R"
alias autoremove="sudo pacman -Rns"echo SNAFU
root@jacek-hp /home/jacek # echo SNAFU
SNAFU/root/.bashrc permission
root@jacek-hp ~ # ls -l /root/.bashrc
-rwxrwxrwx 1 root root 702 03-29 05:31 /root/.bashrcLast edited by poliocertes (2024-03-29 16:20:32)
Offline
Post the bashrc, add something obvious like "echo SNAFU" to the top and (as root) run "bash", does that print "SNAFU"?
If yes, please elaborate on the problem (unless it's maybe obvious from the bashrc) - what changes to you expect, what do you get and what's the context (how do you login as root, is bash the roots default shell etc)
Also what are the permissions on /root/.bashrc?
Offline
All I want is to have as root my own prompt. Formerly I did it in /root/.bashrc same as for user only with another font color. Now make no difference.
Last edited by poliocertes (2024-03-29 14:44:41)
Offline
I did it! Default shell for root account was zsh. After chsh -s /bin/bash root everything is ok. TOPIC can be closed.
Last edited by poliocertes (2024-03-29 15:00:10)
Offline
You should remove this alias:
alias sync="sudo pacman -Syyy"
https://wiki.archlinux.org/title/system … nsupported
And passing -y twice for upgrades just hits the servers unnecessarily.
Jin, Jîyan, Azadî
Offline
Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Fwwi
-rwxrwxrwx 1 root root 702 03-29 05:31 /root/.bashrcbad - make it "600", not 777
Offline
Pages: 1