Groups
Groups
Sign in
Groups
Groups
Shanghai Linux User Group
Conversations
Labels
About
Send feedback
Help
[请教][ubuntu]缩短命令提示前缀
27 views
Skip to first unread message
adream
unread,
May 13, 2012, 3:12:50 AM
5/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shlug
举例说明:
当我深入到某一目录时,比如进入 Ubuntu One/work 目录,此时命令提示行的前最变成 abc@abc-VirtualBox:~/Ubuntu One/work
我希望命令提示行的前缀始终保持为 abc@abc-VirtualBox
谢谢
AleiPhoenix (A.K.A Areverie)
unread,
May 13, 2012, 3:35:40 AM
5/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sh...@googlegroups.com
echo $PS1
设置PS1就行了。
比如不想要路径的话,把\w去掉。(\W是当前文件夹名,\w是完整路径)
profile里处理比较多
在自己.bashrc里写一个PS1
举例:
export PS1="\u@\h \$"
2012/5/13 adream
<
adre...@gmail.com
>
--
Silence is gold.
twitter: @areverie
wikipedia: AleiPhoenix
blog:
weblog.areverie.org
wiki:
wiki.areverie.org
adream
unread,
May 13, 2012, 4:42:11 AM
5/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sh...@googlegroups.com
谢谢
Reply all
Reply to author
Forward
0 new messages