If after the installation of Ubuntu, but found that the terminal prompt after the name is too long or uncomfortable, such as [email protected], this name is not pleasant, want to change how to do?
1, need to modify two files: Vim/etc/hosts the name of the inside to Ubuntu;
Vim/etc/hostsname changed the name of the inside to Ubuntu.
Restart Ubuntu and open the terminal again to see that the changes were successful and changed to [email protected]:
2, now, I want to [email protected] This prompt shiny, need to modify the Vim ~/.BASHRC, the inside of the force_color_prompt=yes in front of the note ' # ' removed
Turn the terminal back on and you'll see the prompt glow.
2.1 Here also describes how to modify the color of the cue symbol
On the command line, enter:gedit ~/.BASHRC
Find the content below
# should is on the output of commands, not on the Promptforce_color_prompt=yesif [-n "$force _color_prompt"]; Then if [-x/usr/bin/tput] && tput setaf 1 >&/dev/null; then# We had color support; assume it ' s comp Liant with ecma-48# (iso/iec-6429). (Lack of such support are extremely rare, and such# a case would tend to support setf rather than SETAF.) Color_prompt=yes elsecolor_prompt= fifiif ["$color _prompt" = yes]; then ps1= ' ${debian_chroot:+ ($debian _chroot)}\[\033[01;31m\]\[email protected]\[\033[00;33m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' Else ps1= ' ${debian_chroot:+ ($debian _chroot)}\[email protected]\h:\w\$ ' Fiunset color_prompt force_color_prompt
The following changes are displayed:
@ Front is red, yellow after @: white; ~ Blue; ¥ white, command line character is white
Ps1= ' ${debian_chroot:+ ($debian _chroot)}\[\033[01;31m\]\[email protected]\[\033[00;33m\]\h \[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
The above statement is my modified, according to the color corresponding
[01;31m\] corresponding parameter, semicolon interval, M end
The possible colors are as follows:
Style
XX--Normal (no color, no bold)
01–bold
Text color
--Black
--Red
--Green
--Yellow
--Blue
--Magenta
--Cyan
Panax Notoginseng--White
Background color
--Black
Double-Red
A--Green
--Yellow
--Blue
--Magenta
--Cyan
47–white
3. Serial port software Installation and configuration
1. Download: sudo apt-get install minicom
2, insert the USB to serial cable, terminal input: DMESG | grep usb
...............
[7415.893942] Usbserial:usb Serial Driver Core
[7415.931116] USB 3-1: ark3116 Converter now attached to ttyUSB0
[7415.931141] usbcore:registered new Interface driver ark3116
[7430.248072] USB 3-1: USB Disconnect, Address 2
[7434.588044] USB 3-1: New full speed USB device using UHCI_HCD and address 3
...............
3. Setting: Minicom-s
Serial Port Setup-->serial device:/dev/ttyusb0
Hardware data flow, software data flow control is set to No
4. Save and exit
5. Command Window run: minicom
----------------------------------------------------------------------------------------------------
Note: By default, Ubuntu has a USB to serial port driver (pl2303) installed. Mine is ark3116 and is also the default installation
1, # Lsmod | grep usbserial
If there is usbserial, the system supports USB to serial port.
[Email protected]:~/minicom$ lsmod | grep usbserial
Usbserial 36264 3 ark3116
2, plug in the USB to the serial port, in the terminal input command #dmesg | grep ttyUSB0, if a connection success message appears, the Ubuntu system has identified the device.
----------------------------------------------------
The use of a key combination is to press CTRL + A key, then release the two keys, and then press the Z key. There are also some common key combinations.
(1) S key: Send the file to the target system;
(2) W key: Automatic roll screen. When the displayed content is more than one line, the following content is automatically wrapped. This feature is useful when viewing boot information for a kernel.
(3) C key: Clear the display content of the screen;
(4) B key: Browse the historical display of minicom;
(5) X key: Exit minicom, you will be prompted to confirm the exit.
Ubuntu Personalized Environment Configuration