使用Putty登录Solaris 10后无“$”或“#”符号

使用Putty登录Solaris 10后无“$”或“#”符号

这是我的环境:

Solaris 版本 10; Sun OS 版本 5.10 Oracle 版本:11g Enterprise x64 版。

当我通过 putty 登录时,它给出了以下输出:

login as: ora Using keyboard-interactive authentication.
Password:
Last login: Sun Nov 2 10:24:21 2014 from abc

它没有显示“ $”符号或任何东西。我无法在上面写字,但无法执行 Linux 命令或从中获取任何输出。我什至用 root 密码登录过,但还是一样。我可以向我描述一下这一点并指导这件事吗?

我的基于 Oracle 的数据库正在其上运行,但我不想重新启动我的服务器。那么我该如何修复它并得到$or #

答案1

系统告诉您磁盘(或控制器/电缆/其他)有故障:

Nov 2 12:04:21 hooradb2 scsi: Requested Block: 1632 Error Block: 1632 Nov 2 12:04:21 hooradb2 scsi: Vendor: SEAGATE Serial Number: 071891XA2J 
Nov 2 12:04:21 hooradb2 scsi: Vendor: SEAGATE Serial Number: 071891XA2J Nov 2 12:04:21 hooradb2 scsi: Sense Key: Aborted Command Nov 2 12:04:21 hooradb2 scsi: ASC: 0x8 (LUN communication time-out), ASCQ: 0x1, FRU: 0x81

当系统挂起时,调查 shell 提示符问题是没有意义的。在备用媒体(例如 Live CD)上启动并从此处调查/修复该问题。 fsck 可能就足够了,但更换磁盘并从备份恢复可能是恢复服务器的唯一方法。

答案2

我已经解决了这个问题。

由于硬件故障,服务器处于挂起状态。我让它保持登录状态 30 多分钟,它得到了终端。

不过还是谢谢各位的建议!!

答案3

检查变量PS1

root@debian:/home/mohsen# echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
root@debian:/home/mohsen# 

检查您的初始化文件是否有修改。

如果您使用 bash,则可以对 PS1 变量使用以下转义码:

      \a     an ASCII bell character (07)
      \d     the date  in  "Weekday  Month  Date"  format
             (e.g., "Tue May 26")
      \e     an ASCII escape character (033)
      \h     the hostname up to the first `.'
      \H     the hostname
      \j     the  number of jobs currently managed by the
             shell
      \l     the basename of the shell's terminal  device
             name
      \n     newline
      \r     carriage return
      \s     the  name  of  the shell, the basename of $0
             (the portion following the final slash)
      \t     the current time in 24-hour HH:MM:SS format
      \T     the current time in 12-hour HH:MM:SS format
      \@     the current time in 12-hour am/pm format
      \u     the username of the current user
      \v     the version of bash (e.g., 2.00)
      \V     the release of bash,  version  +  patchlevel
             (e.g., 2.00.0)
      \w     the current working directory
      \W     the  basename  of the current working direc­
             tory
      \!     the history number of this command
      \#     the command number of this command
      \$     if the effective UID is 0, a #, otherwise  a
             $
      \nnn   the  character  corresponding  to  the octal
             number nnn
      \\     a backslash
      \[     begin a sequence of non-printing characters,
             which could be used to embed a terminal con­
             trol sequence into the prompt
      \]     end a sequence of non-printing characters

相关内容