Home  >  Article  >  Operation and Maintenance  >  What should I do if Linux does not display the current path by default?

What should I do if Linux does not display the current path by default?

王林
王林Original
2020-05-18 16:23:053857browse

What should I do if Linux does not display the current path by default?

首先进入到etc目录,编辑profile文件

vim profile

然后在最后一行加上:

export PS1='[\u@\h $PWD]\$'

保存之后执行:

source /etc/profile

推荐教程:linux教程

The above is the detailed content of What should I do if Linux does not display the current path by default?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn