Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2011, 10:56 AM   #1
LQ Newbie
Registered: Jun 2009
Distribution: linuxslackware
Posts: 28

Rep: Reputation: 3
Is there any way to link terminal sessions?

I was doing some rather lengthy procedures using a terminal. Then I wrote script using Kate, and input it into that terminal, and then realized that I was logged in as a normal user in that terminal as opposed to a superuser, which is how I was logged in at the other terminal. I've never noticed this before because I've never done anything that takes this long.

Is there any way to link all terminal sessions in such a way that they all show me logged in as the same user? I don't even know if this is even important, but I don't want to risk losing any things that I had done.
Old 06-07-2011, 10:58 AM   #2
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
you could edit your shells path to show you the current user name. If you're using bash you can edit .bashrc look for the PS1= line.

the "\u@" option shows username
Old 06-07-2011, 03:31 PM   #3
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Originally Posted by ncsuapex View Post
the "\u@" option shows username
That's extremely unhelpful if FormatC doesn't understand the syntax for PS1 and typical conventions used in prompts.

Bash expands "\u" to the username. Here's how many prompts look like:

The "@" between the username and hostname is what ncuapex is talking about. It's not necessary and is totally irrelevant if you choose to format your prompt differently.

Here is a great guide on customizing your bash prompt:


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you kill off other sessions (gui and terminal) Thaidog Linux - General 2 03-30-2008 03:51 PM
Is there a way to log terminal sessions? bostonantifan Ubuntu 2 10-26-2007 04:30 PM
Logging out and starting new sessions through command terminal Cinematography Linux - General 2 09-26-2007 05:52 PM
multiple sessions on a dumb terminal rsbecker007 Linux - Hardware 3 06-26-2002 08:00 PM
Terminal Sessions Lcurrah Linux - General 2 09-13-2001 03:17 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:06 AM.

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