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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
n00b to Linux here & it's starting to piss me off. I've set up my first linux machine using Slackware 10.1 and I'm trying to create some aliases so that I don't always have to type out commands. I'm aware of the tab autocomplete feature but would like to rename some of the more inane commands. Doing some research I found I have to edit the .bashrc file, but I couldn't find it. I was told I can just create it so I did so as well as making a .bash_profile (I did find a .bash_history in the root folder so that's where I placed the two created files). Still nothing. I got to the point where I get a "-bash: source~/.bashrc: No such filer or directory" error upon first log in, but that's as far as I've gotten. What am I doing wrong.
Also I would like to reduce the amount of time spent waiting for Linux to boot up. The timeout is set to two minutes & I can't seem to change that either. I thought it was in the lilo.conf, but editing that did nothing. Any help there would also be appreciated.
I got to the point where I get a "-bash: source~/.bashrc: No such filer or directory" error upon first log in, but that's as far as I've gotten. What am I doing wrong.
You're missing a space:
source ~/.bashrc
bash reads /etc/profile upon login and then .bashrc for the subsequent (i.e. non-login shells). If you want the .bashrc to get read on login also (which in this case is what you want), add the above line to the end of /etc/profile. You don't need .bash_profile file under your home directory. For more information see the manpage of bash (man bash).
Quote:
Also I would like to reduce the amount of time spent waiting for Linux to boot up. The timeout is set to two minutes & I can't seem to change that either. I thought it was in the lilo.conf, but editing that did nothing. Any help there would also be appreciated.
This is done in /etc/lilo.conf. There is variable called TIMEOUT. You can reduce the value of this variable to shorten the waitingtime (50 would wait 5 seconds). After editing lilo.conf you will need to run lilo (be root and enter command 'lilo' on the commandline).
--edit--
You can also add aliases to /etc/profile, but then they won't work in xterms and such...
if exists, Slack uses them, ie ~/.bashrc and ~/bash_profile
Here's enclosed next, my (I'm al, user al) ~/.bashrc and ~/bash_profile
al@p3srv:~$ cat .bashrc
# 3-10-2005 user al bash settings
# System wide aliases and functions /etc/bashrc (/etc/profile.d).
# Personal startup programs should go into ~/.bash_profile.
# Personal aliases and functions and environment
# variables should go into ~/.bashrc
# next 2 lines - if file exist then source the file
[ -f /home/al/.term_aliases ] && . /home/al/.term_aliases
[ -f /etc/profile ] && . /etc/profile
export PATH=$PATH:/home/al/bin
biff n
alias cdr='sudo /home/al/bin/cdrecordeasy'
alias cmx='chmod u+x'
alias cups='sudo /usr/local/bin/cups.sh'
alias diskck='du -s -k -c * | sort -rn'
alias ethrl='sudo /usr/bin/ethereal'
alias firew='sudo /usr/local/bin/firehol'
alias hi='history'
# <snipped more aliases and a function>
al@p3srv:~$ cat .bash_profile
# 3-10-2005 user al bash settings
# System wide aliases and functions /etc/bashrc (/etc/profile.d).
# Personal startup programs should go into ~/.bash_profile.
# Personal aliases and functions and environment
# variables should go into ~/.bashrc
# next 2 lines - if file exists then source the file
[ -f /etc/profile ] && . /etc/profile
But system does read ~/.bash_profile so it's usual to put the command to source ~/.bashrc there.
thank you friends, for that info
but i am confused
1.if slack check for .profile file why we are creating a new one .bashrc
2.if so which one if preferred, ie if both .bashrc and .profile is present which one bash will choose?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.