LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-16-2003, 03:48 PM   #1
intruptz
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Rep: Reputation: 0
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
 
Old 09-16-2003, 03:52 PM   #2
fragglehorn
Member
 
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
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.
 
Old 09-16-2003, 04:01 PM   #3
gbell72
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: FreeBSD
Posts: 78

Rep: Reputation: 15
I don't think you need to logout all the time after adding an alias, 'source .bashrc' or source /etc/profile should work.
 
Old 09-16-2003, 04:06 PM   #4
intruptz
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 09-16-2003, 04:11 PM   #5
intruptz
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 09-17-2003, 04:32 AM   #6
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
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)

Last edited by yapp; 09-17-2003 at 04:33 AM.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 12:40 AM
Alias ChimpFace9000 Linux - General 9 01-14-2004 04:01 AM
ip alias mindcry Linux - Networking 0 10-16-2003 07:41 PM
alias booyah Slackware 3 05-06-2003 03:17 PM
alias nobu Slackware 5 01-11-2003 01:09 PM


All times are GMT -5. The time now is 02:10 PM.

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