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

王林
Release: 2020-05-18 16:23:05
Original
3881 people have browsed it

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

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

vim profile
Copy after login

然后在最后一行加上:

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

保存之后执行:

source /etc/profile
Copy after login

推荐教程: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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template