Home >Operation and Maintenance >Linux Operation and Maintenance >Linux does not display the current path by default

Linux does not display the current path by default

王林
王林Original
2019-11-06 10:00:073275browse

Linux does not display the current path by default

Solution:

1. Enter the etc directory and modify the profile file

Linux does not display the current path by default

2. At the end Add one line: export PS1='[\u@\h $PWD]\$'

Linux does not display the current path by default

3. After saving, execute: source /etc/profile

Linux does not display the current path by default

You can immediately see that the displayed path has changed and turned into a full path. Then every file directory you go to will display the full path. , which is much more convenient.

Linux does not display the current path by default

Recommended tutorial: linux tutorial

The above is the detailed content of 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
Previous article:how to shut down linuxNext article:how to shut down linux