Centosshell command line show only-bash-4.1 # do not show the user and path Solution

Source: Internet
Author: User

Centosshell command line show only-bash-4.1 # do not show the user and path Solution
Zookeeper accidentally called the home Directory deletion command today. Although it was not deleted for various reasons, many files and directories in the home directory were deleted, the command line does not display the current user and path.
Next, you need to set two files for resetting :~ /. Bashrc and ~ /. Bash_profile

1. Create a. bashrc file in the current directory: # touch ~ /. Bashrc # vim ~ /. Bashrc
Enter the following data
#. Bashrc
# Source global definitionsif [-f/etc/bashrc]; then./etc/bashrcfi # User specific aliases and functions
# Source ~ /. Bashrc

2. Create a. bash_profile file in the current directory: # touch ~ /. Bash_profile # vim ~ /. Bash_profile
Enter the following data #. bash_profile # Get the aliases and functionsif [-f ~ /. Bashrc]; then .~ /. Bashrcfi
# Source ~ /. Bash_profile
You can see that the current user and path are successfully displayed.
============ Gorgeous split line ============== if you have these two directories, -bash-4.1 # is displayed. You can refer to the following solution (this solution is taken from the Internet for verification)
The procedure is as follows:
Vim ~ /. Bash_profile (do not worry about the number of. bash_profile files. You can create one by yourself)
Add expZ limit at the end? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> vcnQgUFMxPQ =" [\ u @ \ h \ W] \ $'
Then execute source ~ /. Bash_profile
In this way, the shell can display the path.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.