SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi all, I tried to uninstall a package using kpackage, it asked me for the root pass as normal but once i entered it, it gives me root@computername:/home/user>.
I was watching someone using bash and they changed some stuff in .bash_profile, i couldnt find the file in my home dir but added stuff to .bashrc instead. Here is my .bashrc:
Code:
PS1="\u@\h:\w> "
export PS1
eval `dircolors -b`
alias ls='ls --color=auto'
alias rm='rm -i'
alias 0ff='shutdown -h now'
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# User Specific environment and startup programs
PATH=$PATH:/usr/sbin:/sbin
export PATH
unset USERNAME
Is this what has messed up kpackage?
While on the .bashrc subject, the 0ff alias works if i su to root from my normal user but not if i just log in as root. Can anyone tell me where i am going wrong on these 2 problems?
I would recommend you to use pkgtool instead of kpackage, just to be on the safe side.
Regarding bash,
That file only applies to the user that owns it, ~ means home directory. So ~/.bashrc applies to the user that has it.
It works when you su to root because values are passed from the user to root.
If you need some global options for bash, use /etc/bashrc or put them in /etc/profile.
Thanks for the help Gonna try /etc/bashrc or /etc/profile. One thing tho, i put the same .bashrc (one with the 0ff alias) into the /root dir shouldnt that make it work for the root user?
Im logging in as root by typing root then the root pass, not using su. When i do that shouldnt the .bashrc in the root folder be working? when logging in like that i cant use the alias "0ff" which is definately in the .bashrc in /root.
Sorry to be a pain but now when i log in as root i get "-bash: .~/.bashrc: No such file or directory". Ive tried it being called .bashrc, /.bashrc, ~/.bashrc and .~/.bashrc but get the same thing. I think ~/ means the home directory but tried all the strange names anyway. Had a look at the man for bash but couldnt see anything relevant. ( )
Are the .bashrc and .bashprofile in the wrong place (/root/) ?. Does my .bashrc have something wrong with it?
Code:
# .bashrc
# prompt
PS1="\u@\h:\w>"
export PS1
#aliases & color
eval `dircolors -b`
alias ls='ls --color=auto'
alias rm='rm -i'
alias 0ff='shutdown -h now'
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# User Specific environment and startup programs
PATH=$PATH:/usr/sbin:/sbin
export PATH
unset USERNAME
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.