Author Topic: alias command not working  (Read 12850 times)


  • Member
  • *
  • Posts: 86
Re: alias command not working
« Reply #15 on: September 17, 2007, 08:12:33 am »
The .bashrc is a log-in rc
 AFAIK > If not 'sourced' or another  bash command not used (which runs new concurrent CLI environment

The only other way to use NEW aiiased commands - exit session  & log in again

The whitespaces in CLI & if whether single or double quotes acceptable -
depends on shell used for log in vs distro specific running shell after bootup
(Ash, csh etal)

Legacy - Most shells are backwards compliant  - but we do hit occasional oddities
In essence all suggestions were accurate -but dependent on user's environment
Ain't technology great - never black vs white -just umpteen shades of gray to confuddle us (me)_



  • Member
  • *
  • Posts: 52
Re: alias command not working
« Reply #16 on: September 18, 2007, 08:37:55 am »
Success at last !

Edited the /root/.bashrc file as follows:

#aliases for net connection
alias pon='/usr/sbin/pppoe-start'
alias poff='/usr/sbin/pppoe-stop'

and it works fine.

And added the line:

echo "source ~/.bashrc" >> ~/.bash_profile

Now it works fine.
Thanks to all of you.