LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 10: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, 11:01 AM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Post the content of ~/.bashrc and the output of:
Code:
echo $PS1
echo $PROMPT_COMMAND
 
Old 04-14-2015, 11:06 AM   #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, 11:13 AM   #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 11:17 AM.
 
Old 04-14-2015, 01: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, 02:44 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
In shell what does hostname command return just for grins?
 
Old 04-14-2015, 09: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



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 08:25 PM
[SOLVED] call awk from bash script behaves differently to awk from CLI = missing newlines titanium_geek Programming 4 05-26-2011 09:06 PM
[SOLVED] cli php missing modules as regular user but not as root jraidan Slackware 7 09-10-2010 07:18 AM
nameserver resolves unqualified hostname in nslookup, ping (at CLI) doesn't-- why? lumix Linux - Networking 1 02-29-2008 07:23 PM
Missing CLI text editors in Slack 10.0? X_ArchAngel Slackware 9 08-02-2004 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:06 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