1832286 Members
2729 Online
110041 Solutions
New Discussion

Type hostname unknow

 
O'lnes
Regular Advisor

Type hostname unknow

When I login into the console, it always pop up 'Type hostname unknown', is it the TERM setting problem ? what is the best TERM setting in the console? Thank.
Andy
3 REPLIES 3
Ollie R
Respected Contributor

Re: Type hostname unknow

Hi,

Looks like you have a problem with your ".profile" or ".kshrc".

Are you setting your "PS1" prompt within one of these files to include the hostname of your system?

Ollie.
To err is human but to not award points is unforgivable
Allan Pincus
Frequent Advisor

Re: Type hostname unknow

I'm not so sure that is a TERM problem. If TERM is being set, you should be able to

echo $TERM

and see what it is set to. If it is set to nothing, you will get nothing back.

If it is a problem with your hostname, running the command "hostname" should echo back your machine name, if it does not, at least that is a starting point.

Good luck!!

- Allan
ASO CENTRAL
Advisor

Re: Type hostname unknow

Somewhere in your /etc/profile, .profile, amybe .kshrc, TERM= has been specified incorrectly. You should let ttytype identify your terminal automatically. If you just type this command:

ttytype -s

You'll see what the ttytype program thinks your terminal might be. It can only be a guess and I can't recommend the correct value since there are dozens of possible console terminals. If you have an HP terminal, there are still several answers depending on what model of computer you have (graphics display, HP terminal set to vt100 mode, HP terminal set to HP mode, A,N,L class computer with GSP forced to vt100 mode, etc).

Some details on your console will be useful. Meanwhile, set the TERM value automatically by looking at how it is done in the default /etc/profile (/etc/newconfig/etc/profile). Now if your /etec/profile is the same as the default, the ttytype -s -a option may be causing the error. -a is assigning TERM=unknown automatically. That is a failure to identify the terminal so we'll need more info about that terminal.