LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-23-2004, 08:34 PM   #1
palmmjsg23
LQ Newbie
 
Registered: Jan 2004
Location: us
Posts: 8

Rep: Reputation: 0
Noob question about an alias


Hey, if you guys have know how to help me with this, that would be great.
I'm trying to create an alias, named "bye" that when entered logs the current user off. I know very little but i'm trying to mess around with linux so any help would be wonderful.

palmmjsg23
 
Old 01-23-2004, 08:41 PM   #2
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
alias bye="logout"
Type that at the console or terminal if in X windows -- You need to be logged in as that user as I think aliases are user specific.

--You need those qoutes.. there not thier for looks!


Last edited by Zero-0-Effect; 01-23-2004 at 08:44 PM.
 
Old 01-23-2004, 08:55 PM   #3
palmmjsg23
LQ Newbie
 
Registered: Jan 2004
Location: us
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Zero-0-Effect
alias bye="logout"
Type that at the console or terminal if in X windows -- You need to be logged in as that user as I think aliases are user specific.

--You need those qoutes.. there not thier for looks!
Okay I did that and then i got this message:

bash: logout: not login shell: use 'exit'

so is it just telling me to type in alias bye="exit" ?
 
Old 01-23-2004, 09:00 PM   #4
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Yea if you want to use it in a terminal running in X you would do alias bye="exit"
The one I said before is if you want to logout from console...
 
Old 01-23-2004, 09:09 PM   #5
palmmjsg23
LQ Newbie
 
Registered: Jan 2004
Location: us
Posts: 8

Original Poster
Rep: Reputation: 0
This is why i'm a noob lol. Yes i do want it to logout, but like i said it doesn't logout when i had it the first way, alias bye="logout". Am i doing something wrong or am is just an idiot? lol Thanks
 
Old 01-23-2004, 09:31 PM   #6
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Are you wanting to log out of your current x session from a terminal?

alias bye="exit" -use bye to logout of or close a terminal depending on whether you su'ed to another accout (x windows terminal - graphical enviroment)
alias bye="logout" -use bye to logout of your current user in console (black and white screen)

Agian you must type these commands in the account you want to use them for, other accouts will not uses the aliases untill you put them in thier as well.
 
  


Reply



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
very newbie alias question ffang Linux - Newbie 4 09-04-2003 07:46 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 12:03 AM
Alias definition question Dark_Helmet Linux - General 5 02-04-2003 02:48 PM
alias question tied2 Linux - General 4 08-23-2002 10:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration