LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 10-14-2005, 11:03 AM   #1
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Rep: Reputation: 30
Autocomplete my username...


Is there anyway to autocomplete typing in your username......on my debian box, my username is the same as on this forum, fatrandy13....when typing commands like 'ps -u fatrandy13' i would like to be able to just type fat and hit tab, like i would for a program or cd-ing into another directory....

~fatrandy13
 
Old 10-14-2005, 11:43 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,185

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
You could always just assign it to a variable as follows:

u=fatrandy13;export u

From then on any time you want to reference "fatandy" you type "$u" instead.

On your initial login you'd need to type in fatrandy because you haven't defined a shell environment yet but once you were logged in you could use it. You could make it globally available (for bash, sh and ksh) by adding the above to /etc/profile. Then all logins with those shells would inherit that environment variable.
 
Old 10-14-2005, 02:58 PM   #3
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Original Poster
Rep: Reputation: 30
thanks, i'll give it a try
 
Old 10-14-2005, 04:02 PM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,183

Rep: Reputation: 98
not a lot shorter, but everywhere you need your username you could use
Code:
`whoami`
for example
Code:
ps -u `whoami`
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd: invalid username username$ engyeow Fedora 5 12-05-2004 04:35 AM
Mozilla Autocomplete pdohman Linux - Software 5 10-02-2003 08:51 PM
emacs-autocomplete skibud2 Programming 6 09-22-2003 08:27 AM
autocomplete figadiablo Linux - General 6 03-13-2002 04:19 PM
autocomplete marksstroud Linux - Newbie 1 11-11-2001 01:02 PM


All times are GMT -5. The time now is 03:10 AM.

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