LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-14-2015, 11:54 AM   #1
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Rep: Reputation: Disabled
hostname missing in CLI


Bare with the noob here

For some reason, when I open terminal, the prompt has changed from the usual user@localhost to user@xx-xx-xx-xx-xx-xx where the xx are numbers/letters, I am assuming hexadecimals?

Why?

The title bar of the terminal window still shows user@localhost:~ , HOSTNAME is still localhost.localdomain, so whats with the gibberish at the prompt?
 
Old 04-14-2015, 12:01 PM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
Post the content of ~/.bashrc and the output of:
Code:
echo $PS1
echo $PROMPT_COMMAND
 
Old 04-14-2015, 12:06 PM   #3
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
~/.bashrc

Quote:
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
echo $PS1
Quote:
PS1
echo $PROMPT_COMMAND
Quote:
__vte_prompt_command
 
Old 04-14-2015, 12:13 PM   #4
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
Well, I managed to get it back going to Settings>System>Details and changing the gibberish under Device Name to the old one. Still no idea why that happened... and why $HOSTNAME was showing localhost.localdomain, but under Device Name was that gibberish.

Last edited by doctore; 04-14-2015 at 12:17 PM.
 
Old 04-14-2015, 02:28 PM   #5
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Quote:
Originally Posted by doctore View Post
~/.bashrc



echo $PS1


echo $PROMPT_COMMAND

Im going to assume that the reason for this was the PS1 output you posted. That should show some formatting information along with an escape \h i belive it is to display the host

something like
Code:
PS1="\u@\h"
 
Old 04-14-2015, 03:44 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,668

Rep: Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259Reputation: 2259
In shell what does hostname command return just for grins?
 
Old 04-14-2015, 10:57 PM   #7
doctore
LQ Newbie
 
Registered: Apr 2015
Distribution: CentOS 7
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
In shell what does hostname command return just for grins?
Now it returns the hostname, but that's after I entered it in the GUI.

$PS1 also shows "proper" output now.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOSTNAME = hostname -> HOSTNAME: command not found ? thomas2004ch Linux - Software 2 08-26-2013 09:25 PM
[SOLVED] call awk from bash script behaves differently to awk from CLI = missing newlines titanium_geek Programming 4 05-26-2011 10:06 PM
[SOLVED] cli php missing modules as regular user but not as root jraidan Slackware 7 09-10-2010 08:18 AM
nameserver resolves unqualified hostname in nslookup, ping (at CLI) doesn't-- why? lumix Linux - Networking 1 02-29-2008 08:23 PM
Missing CLI text editors in Slack 10.0? X_ArchAngel Slackware 9 08-02-2004 10:10 PM


All times are GMT -5. The time now is 05:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration