View Full Version : [xubuntu] help with setting perminant alias commands
bendoggy
May 7th, 2008, 04:28 AM
I've tried adding to my .bashrc, .profile, and even tried making a .bash_aliases program. I relatively new to linux. A week or so fresh and am using the new Hardy Heron.
Every time, I add something to the .bashrc and reboot. I doesn't set it. It reads, bash: alias: command not found
Any suggestions?:confused:
Any help would be appreciated. :)
kerry_s
May 7th, 2008, 04:32 AM
what are you putting exactly?
they go in ~/.bashrc
you don't have to reboot. they take effect immediately.
here's what mine looks like.
jerrallan
May 19th, 2008, 02:16 AM
Ben Doggy is right. The alias disappears after reboot. Ubuntu here.
$ alias bak='cp file1 file2'
p_quarles
May 19th, 2008, 02:21 AM
Ben Doggy is right. The alias disappears after reboot. Ubuntu here.
$ alias bak='cp file1 file2'
Running "alias" from the shell will only set an alias for the current session. To make it permanent, you need to set it in the shell's rc file. So, you would edit ~/.bashrc and add a line that reads just like the example command in your post. That way it will be set whenever you load the shell.
jerrallan
May 27th, 2008, 04:43 AM
Running "alias" from the shell will only set an alias for the current session. To make it permanent, you need to set it in the shell's rc file. So, you would edit ~/.bashrc and add a line that reads just like the example command in your post. That way it will be set whenever you load the shell.
You are correct!. Just discovered that. And if they are put in ~/.bashrc, they should "stick"
cdtech
May 27th, 2008, 04:45 AM
My bash aliases are in my ~/.bash_aliases file
I had to comment out:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
within the .bashrc file. This makes it much easier to manage long list of aliases
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.