using alias
Hi,
everytime I use 'alias' it only works in the konsole window I've got open. How do i make an alias; a)global - or global for a specific user (does that make sense?) b)permanent. cheers |
It depends on your distro. On my Debian system a quick edit in ~/.bashrc does the trick. Other systems use /etc/profile. Note that you'll have to logout and back in for the change to occur.
|
I don't think you need to logout all the time after adding an alias, 'source .bashrc' or source /etc/profile should work.
|
cheers. .bashrc did the trick. At the moment I'm trying out different WMs so I start linux in text mode (i know you can set up WM options with a GUI logon but I've haven't mastered that yet!). Could you do the same for Console or does this only work for bash etc.
Also, am i using Console in the right context - I mean the equivalent of starting in DOS |
Ahh *!?#** Just realised that using alias doesn't work with fbrun in fluxbox. Any ideas how I can do this. LIke I can type 'Mozilla' in to either Konsole or fbrun and Mozilla starts uop fine. where are these setiings stored?
thanks again for you help |
If your shell is a login shell, /etc/profile is executed. (usually something like konsole --ls, or bash -l, or "su -") .bashrc is executed by bash (your shell) when it starts. There might also be a /etc/bashrc for all users.
The slackware version of /etc/profile contains something interesting: it also runs all /etc/profile.d/*.sh files, if they are executable. (use chmod +x <file name> for that) If your distro has something like that, this might be a nice way to make the settings permanent, and global for all users. (just add another script there) I've been experimenting with .bashrc, to execute /etc/profile automatically if it hasn't been done, but it's kind of tricky, because you don't want this to happen if you're using sftp (works over ssh) |
All times are GMT -5. The time now is 07:16 AM. |