Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-14-2006, 10:38 AM   #1
LQ Newbie
Registered: May 2006
Posts: 21

Rep: Reputation: 15
Bash me over the head...

Got slackware 10.2 installed.

If i call alias..

I get .

d dir
dir /bin/ls $LS_OPTIONS --format=vertical
ls /bin/ls $LS_OPTIONS
mc source /usr/share/mc/bin/mc-wrapper.csh
v vdir
vdir /bin/ls $LS_OPTIONS --format=long

now. if I then type

alias listall='ls -all'
alias lsl='ls -all'

then nothing happens, it does not get added to those already there.. Strange.

If I do this when logged in as root(not su root but looged in) then it works but only for that session so it dont save anything.

I googled this and iv since made.


in my home drive with the above alias in it to test. and this is not doing anything at all.

Iv tried looking for the above "mc source /user/...." to try and find the file that these default slackware aliases are stored but i cant even find those.

ELP.. pls.
Old 05-14-2006, 11:57 AM   #2
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
Did you logout and then log back in after creating the .bashrc file? bash reads that file and loads your aliases only on login AFAIK.

Old 05-14-2006, 12:56 PM   #3
LQ Newbie
Registered: May 2006
Posts: 21

Original Poster
Rep: Reputation: 15
well yeah, iv logged in and out loads of times sice .. iv bee playing with it all morning.

What I dont understand is why i cant find the file thats holding those default alias's..

cos if i find that i can just add my own to it.
Old 05-14-2006, 03:37 PM   #4
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
Here's what the bash man page says:
When  bash is invoked as an interactive login shell, or as a non-interactive shell 
with the --login option, it first reads and executes  commands  from  the file
/etc/profile, if that file exists.  After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in  that order, and reads 
and executes commands from the first one that exists and is readable.
On my slack 10.2 system the default /etc/profile does not have any aliases. All are in my /home/username/.bashrc file. All I can say is make sure that .bashrc is in the right directory and make sure it is readable. It should be very straightforward to add aliases. Is bash your login shell? Check with

set | grep SHELL


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash: Print usage statement & exit; otherwise continue using Bash shorthand operators stefanlasiewski Programming 9 02-07-2006 06:20 PM
Multi-monitor Issues on RH9, Geforce 4 Ti Dual Head + TNT2 Single Head the letter b Linux - Newbie 3 12-05-2004 12:23 AM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM
DirectColor,16bits, Wall, Head, Bash PhilShaw Linux - Hardware 0 11-11-2003 05:48 AM
x86 Solaris 9 XSun and Matrox G550 dual-head... one head down, one to go. finegan Solaris / OpenSolaris 4 03-11-2003 01:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration