Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Modify Linux terminal prompt path length     - Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)

- Installation Elementary OS Freya 20 things to do (Linux)

- FileZilla FTP && TLS connection settings of (Linux)

- 2016, the new Node project Precautions (Programming)

- Java-based data source database access (Programming)

- Compression decompression command under Linux (Linux)

- Linux System Getting Started Learning: complete installation on Debian or Ubuntu kernel source (Linux)

- Boot automatically remove Linux operating history records (Linux)

- Linux Getting Started tutorial: Experience VirtualBox Virtual Machine chapter (Linux)

- Dockerfile use to build a mirror-based CentOS 7 (Linux)

- Why learn Java EE (Programming)

- Linux program analysis tool: ldd and nm (Linux)

- Java 8 stream parsed into SQL (Programming)

- The most simple drive to write and test procedures under linux (Programming)

- These days have been tossing in the Linux under the ASP.NET 5, on the next in the other operating systems in the ASP.NET 5 or. NET applications, in order to complete the MS VM (CoreCLR) run is not far Reach, the effect of the application.


- iptraf: A Practical TCP / UDP network monitoring tools (Linux)

- Android Application Development: Genymotion can not start solving (Linux)

- OpenDJ installed on RHEL6 (Linux)

- ORA-04091 and Compound Trigger (Oracle 11g) (Database)

- To share Linux script automatically change passwords (Linux)

  Modify Linux terminal prompt path length
  Add Date : 2018-11-21      
  Linux system default path prompt for the full path, this line is very long, it may total width, looking very unhappy! Like this below

abctest @ Ubuntu: ~ / trunk-new / build_dir / target-mips_34kc_uClibc- / linux-ar71xx_generic / linux-3.10.17 / net / netfilter / commercials $

Basic occupy 80% of the width of the terminal, if they can be changed to display only the last name of a folder just fine!

Modification method:

vim ~ / .bashrc

Search PS1

56 if [ "$ color_prompt" = yes]; then
57 PS1 = '$ {debian_chroot: + ($ debian_chroot)} \ [\ 033 [01; 32m \] \ u @ \ h \ [\ 033 [00m \]: \ [\ 033 [01; 34m \] \ W \ [\ 033 [00m \] \ $ '
58 else
59 PS1 = '$ {debian_chroot: + ($ debian_chroot)} \ u @ \ h: \ W \ $'
60 fi

Find the text above, note the value of the PS1 environment variable, \ u is the current user, \ h is the host name, \ w is displays the full path, \ W is to show a simple path into the w W it!

As to if or else take effect, you can have a try, my else is in force.

Run after modification

$ Source ~ / .bashrc

You can be applied! The following results

abctest @ ubuntu: commercials $

It is not very simple.
- To compile and install MySQL 5.7.7 RC under CentOS 7.1 (Database)
- Depth understanding of the TCP protocol (Database)
- LAMP and LNMP automated installation scripts (Server)
- Python programmers most often committed ten errors (Programming)
- Ubuntu install Liferea news subscription software (Linux)
- SUSE Firewall Configuration (Linux)
- PHP file upload methods exist in the database (Programming)
- APF firewall installation and configuration under Linux (Linux)
- Android Studio quick overview of Gradle (Programming)
- Configure the ASM process on Red Hat Linux 6.5 (Database)
- CentOS 6.5 system installation Oracle11.2.0.4 basic steps (Database)
- Linux keyboard recording script (Linux)
- How to download apk file from the Google Play store on Linux (Linux)
- CentOS 6.5 platform offline compile and install PHP5.6.6 (Server)
- CentOS 6.5_x64 install Oracle 11g R2 (Database)
- Nginx request processing (Server)
- Ubuntu and derivative system users how to install Pinta 1.5 (Linux)
- Close and limit unused ports computer server security protection (Linux)
- KVM virtualization nested configuration (Server)
- Deploy the project to the server from GitHub (Server)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.