You are not logged in.
Pages: 1
from:
section 1.1 installation
https://wiki.archlinux.org/index.php/Co … stallation
It's a generalized scheme for all users, so you should start renaming your ~/.bashrc file and then copy the /etc/bash.bashrc file to /etc/bash.bashrc.back and create a /etc/DIR_COLORS file (~/.bashrc and /etc/bash.bashrc can also cohabitate). Here is our possible version of this scheme for Arch (originally this scheme was created for Gentoo, but here are some important additions).
1. It says start by renaming my ~/.bashrc ....but what do i rename it to.
2. also my bashrc, where and how do i add:
# Pacman alias examples
alias pacupg='sudo pacman -Syu' # Synchronize with repositories and then upgrade packages that are out of date on the local system.
alias pacin='sudo pacman -S' # Install specific package(s) from the repositories
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias pacrem='sudo pacman -Rns # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias pacrep='pacman -Si' # Display information about a given package in the repositories
alias pacreps='pacman -Ss' # Search for package(s) in the repositories
alias pacloc='pacman -Qi' # Display information about a given package in the local database
alias paclocs='pacman -Qs' # Search for package(s) in the local database
alias paclo="pacman -Qdt" # List all packages which are orphaned
alias pacc="sudo pacman -Scc" # Clean cache - delete all not currently installed package files
alias paclf="pacman -Ql" # List all files installed by a given package
alias pacexpl="pacman -D --asexp" # Mark one or more installed packages as explicitly installed
alias pacimpl="pacman -D --asdep" # Mark one or more installed packages as non explicitly installedMy .bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ 'Thanks!
Last edited by rexineffect (2014-02-20 01:16:09)
Offline
When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode
like thisIt makes the code more readable and - in case of longer listings - more convenient to scroll through.
Add aliases to your bashrc by editing your ~/.bashrc and copy-pasting the examples. You can group them any way you like or just add them at the end.
Offline
Please use code tags: https://wiki.archlinux.org/index.php/Fo … s_and_Code
1. Rename it whatever you like; just make sure it doesn't clash with another necessary file (renaming it .xinitrc, for example, would be a poor choice).
2. Put the aliases after the text you already have in place. If you don't know how to do that, you really should consider another distro...
Offline
See my problem was when i added to .bashrc at then end just like that it gave me errors on source ~/.bashrc so i figured i did it wrong. I'll write it out for u guys in a second. and so with the renaming thing... so if im using the global etc/bash.bashrc does that make the ~/.bashrc not get used? is that why i am renaming it? using global just gets rid of the use of that file all together? cant i have global bashrc settings and then also some for each user? I dont understand why i have to rename that file.
here it is
my bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
# Pacman alias examples
alias pacupg='sudo pacman -Syu' # Synchronize with repositories and then upgrade packages that are out of date on the local system.
alias pacin='sudo pacman -S' # Install specific package(s) from the repositories
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias pacrem='sudo pacman -Rns # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias pacrep='pacman -Si' # Display information about a given package in the repositories
alias pacreps='pacman -Ss' # Search for package(s) in the repositories
alias pacloc='pacman -Qi' # Display information about a given package in the local database
alias paclocs='pacman -Qs' # Search for package(s) in the local database
alias paclo="pacman -Qdt" # List all packages which are orphaned
alias pacc="sudo pacman -Scc" # Clean cache - delete all not currently installed package files
alias paclf="pacman -Ql" # List all files installed by a given package
alias pacexpl="pacman -D --asexp" # Mark one or more installed packages as explicitly installed
alias pacimpl="pacman -D --asdep" # Mark one or more installed packages as non explicitly installedand the source ~/.bashrc code:
[rex@localhost ~]$ source ~/.bashrc
bash: /home/rex/.bashrc: line 21: unexpected EOF while looking for matching `''
bash: /home/rex/.bashrc: line 27: syntax error: unexpected end of filethanks again
Offline
So bash is helpfully printing out exactly what the errors are: it even includes line numbers. Fix the missing quote mark.
The wiki page on this really is a mess. Make changes to your ~/.bashrc, because then--when you screw it up--you can always login as another user and fix it. Just ignore all that stuff about /etc/bashrc until you know what you are doing.
Offline
ok sry for being kind retarded about the quote mark but i was using nano -c ~/.bashrc and looking for the line it said, it was way off on the line number im not sure why, im sure ill learn that some time.... it was really on line 17 and said 21 whatever i should have looked better
but what about the renaming crap i really dont get it
thanks for advice on just using /.bashrc it seems almost more appropriate to use that to begin with i dont know why the wiki says to make it a global thing...the colored bash, it seems like a user thing to begin with.
Offline
That wiki page is in dire need of a rewrite; the advice to use the /etc/ file is bad: see the talk page for my objections.
Offline
Ok so sounds like you guys want me to use ~/.bashrc for all this, and for the /etc/DIR_COLORS ill just use it in ~/DIR_COLORS right?
Also it looks like i will ahve to go through all the DIR_Colors and change all the references to /etc/bash.bashrc to be ~/.bashrc
That should cover all my bases right guys?
also it talks about the environment variables to get all my apps to use the color code right...is there anything I need to be aware about that part of it?
Thanks again!
Also, since I have an admin talking with me on this forum, I would love to get involved with you guys writting the wikis. it sounds like you guys need some more help, how can I be the one to do this? can i get involved and help plaese?
Im new but im learning, i wouldn't do anything i couldn't!
Thanks!
Last edited by rexineffect (2014-02-18 08:23:48)
Offline
Ok so sounds like you guys want me to use ~/.bashrc for all this, and for the /etc/DIR_COLORS ill just use it in ~/DIR_COLORS right?
No: ~/.dir_colors
Also it looks like i will ahve to go through all the DIR_Colors and change all the references to /etc/bash.bashrc to be ~/.bashrc
That should cover all my bases right guys?
There should only be three or four references to bash files in your dir_colors file.
also it talks about the environment variables to get all my apps to use the color code right...is there anything I need to be aware about that part of it?
Please copy relevant sections from the wiki you are referring to: "it talks about the..." is pretty vague.
I would love to get involved with you guys writting the wikis. it sounds like you guys need some more help, how can I be the one to do this? can i get involved and help plaese?
Im new but im learning, i wouldn't do anything i couldn't!
Sign up and read the various guides and help pages; then start fixing things.
Offline
I've made a quick edit of the page and will clean it up properly in a week.
Offline
the environment variables part is in the same section we have been talking about, bash colors
https://wiki.archlinux.org/index.php/Co … stallation
Environment variables
There are also other programs which, to be colorized, require the setting of some environment variables. This is the case of man, for example:
it says to add those, which i have no idea how to do yet right in between adding to the bashrc and the dir_colors
Offline
It's more well intentioned, but slightly misleading advice. Set your environment variables in .bash_profile or .profile (depending on which you use).
See http://unix.stackexchange.com/questions … ogin-shell
Offline
There actually isn't any references to bash file in dir_colors.
so this is what i have so far.
everything it says to put into bash.bashrc i am putting into ~/.bashrc
everything in /etc/DIR_COLORS i am leaving there in that file
im not changing anything but the location of etc/bash.bashrc
Tested and works perfect
where do i put the environment variables, bashrc, right? and that is just to color the manual pages correct?
so last questions please someone explain why in the wiki it says to rename ~/.bashrc and dosn't say what to rename it to or why. Thanks!
Last edited by rexineffect (2014-02-18 12:48:47)
Offline
color the manual pages
I use in ~/.bashrc:
export MANPAGER=mostBecause the most program uses colour.
Offline
where do i put the environment variables, bashrc, right? and that is just to color the manual pages correct?
so last questions please someone explain why in the wiki it says to rename ~/.bashrc and dosn't say what to rename it to or why.
Have you read anything that I have posted? I have answered both those questions. Please make some effort, and don't be a help vampire.
Offline
Your right I missed your post on env var.
what im trying to figure out now is why the first step is to rename .bashrc to, as you stated, anything besides what it is. what if i still had local alias set in that file? there must be something im missing cause i read you can set local changes in .bashrc and all global settings you want for all user into /etc/bash.bashrc
Offline
what im trying to figure out now is why the first step is to rename .bashrc to, as you stated, anything besides what it is. what if i still had local alias set in that file? there must be something im missing cause i read you can set local changes in .bashrc and all global settings you want for all user into /etc/bash.bashrc
If you don't understand it, then maybe you aren't ready yet to make those changes. I suggest you first learn how bash uses the various files for it's configuration before changing global settings.
Offline
Your right I missed your post on env var.
what im trying to figure out now is why the first step is to rename .bashrc to, as you stated, anything besides what it is. what if i still had local alias set in that file? there must be something im missing cause i read you can set local changes in .bashrc and all global settings you want for all user into /etc/bash.bashrc
Ok. Let me solve your problem once and for all.
If you are talking about this line
It's a generalized scheme for all users, so you should start renaming your ~/.bashrc file and then copy the /etc/bash.bashrc file to /etc/bash.bashrc.back and create a.....
It makes perfect sense in the context. The sub-topic is telling you to have a system wide bash coloring scheme. If you have your own ~/.bashrc, it will override your /etc/bash.bashrc file because ~/.bashrc is sourced after /etc/bash.bashrc and you won't see the changes you made in the /etc/bash.bashrc file. Therefore, you must rename your local ~/.bashrc to something else or you can even delete it, if you don't have any custom settings for your username.
Now you might ask, why does it say that it can cohabitate which is mentioned in
....create a /etc/DIR_COLORS file (~/.bashrc and /etc/bash.bashrc can also cohabitate).
Yes they can, but if you have similar settings in both, your ~/.bashrc will take precedence as it is sourced later.
So as long as you don't override any settings in ~/.bashrc, you can have both (for the purpose of this sub-topic). If you do have overriding settings, your ~/.bashrc will take precedence.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
As a side note, please quote the line verbatim so people know what you are talking about. Better yet, point it out explicitly.
I had to go to the wiki page and look for the line to see what you were talking about. Context matters. If someone told me to rename ~/.bashrc, I would be like why -- but in the context of the paragraph explaining how you could have system wide settings, it makes perfect sense.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
If you have your own ~/.bashrc, it will override your /etc/bash.bashrc file because ~/.bashrc is sourced after /etc/bash.bashrc and you won't see the changes you made in the /etc/bash.bashrc file.
Thanks that's what I was looking for, appreciate it.
Offline
Pages: 1