Linux terminal development environment Configuration
Linux programs developed on a terminal are generally connected to Linux with an SSH server installed through SSH (Ubuntu 11.04). There are many SSH clients, such as securecrt. Generally, VIM is used as a development tool, the following describes how to build a development environment:
Start the Ubuntu 11.10 system and enter the terminal by default.
The specific steps are as follows:
Vim/etc/default/GRUB
Modify grub_cmdline_linux_default = "quiet Splash" to grub_cmdline_linux_default = "text"
Then run the update-grub2 command to update the grub configuration.
Windows Remote login to Ubuntu with SSH2
SSH is not installed in Ubuntu by default. You can search for SSH, Mark and install it in the new profit software installer, or run the following command:
Apt-Get install OpenSSH-Server
/Etc/init. d/ssh restart
Use securecrt in windows and select SSH to log on to Ubuntu
PS: You cannot select default for connection encoding. You should select UTF-8. Now you can use the command line to log on to Ubuntu.
Vim syntax highlighting in securecrt
Modify securecrt attributes: Options-> sessionoptions-> emulation, change the terminal type to xterm, and click the ANSI color check box.
Add: export term = xterm-color to/etc/profile. If you cannot modify the files on the server, you can create a new. profile file in your user directory.
Configuration. vimrc file: Add syntax on.
Vim Configuration
In ubuntu, the vim configuration file is stored in the/etc/Vim directory, and the configuration file name is vimrc. If you cannot modify the files on the server, you can copy the template to the user directory for modification.
CP/usr/share/Vim/vim72/vimrc_example.vim ~ /. Vimrc
- Set nocompatible "removes VI consistency mode to avoid bugs and limitations in earlier versions
- Set Nu! "Display row number
- Set guifont = Luxi/MONO/9 "Set Font, font name, and font size
- Filetype on "check file type
- Set history = 1000 "records the number of historical rows
- Set background = Dark "background black
- Syntax on "syntax High Brightness Display
- Set autoindent "Vim uses automatic alignment, that is, apply the alignment format of the current row to the next line (Auto indent)
- Set cindent "cindent is especially designed for automatic indentation of C language syntax
- Set smartindent "intelligently selects Alignment Based on the alignment format above, which is useful for programming similar to the C Language
- Set tabstop = 4 "set the tab key to 4 spaces,
- Set shiftwidth = 4 "set to use four spaces when lines are staggered
- Set Ai! "Set automatic indent
- Set showmatch "sets the matching mode, similar to that when you enter a left brace, it will match the corresponding right brace.
- Set guioptions-= T "Remove toolbar from Vim's Gui version
- Set VB t_vb = "When Vim is edited, an alarm is triggered if the command is incorrect. This setting removes the alarm.
- Set ruler "shows the status line at the cursor position in the lower right corner during editing
- Set nohls "by default, search for matching is a high-Brightness Display, which closes the highlighted display
- Set incsearch "queries a word in a program and automatically matches the position of the word. For example, if you query a desk word, when you enter/d, the word starting with D is automatically found, when you enter/de, the first word starting with DS is automatically found, and so on. When you find the word to match, do not forget to press Enter.
- Set backspace = 2 "set backspace key available
- After a file is modified, it is automatically backed up. The backup file name is added with "~" to the original file name. Suffix
If has ("VMS ")
Set nobackup
Else
Set backup
Endif
- If the setting is complete and the function does not work, check whether the vim-enhanced package is installed in the system. The query command is rpm-Q vim-enhanced.
NOTE: If Vim does not take any action after the preceding settings are configured, upgrade Vim to the latest version. Generally, you only need to enter the following command on the terminal: apt-Get install vim.
Articles you may be interested in
Ubuntu 11.10 gedit Chinese garbled Solution
How to set the host name in ubuntu11.10
Activate the root account under ubuntu11.10
Vmware7.1.5 use the share folders shared directory to install Ubuntu 11.10 on a virtual machine
Ubuntu11.10 kernel Compilation: Make xconfig Error
Ubuntu11.10 install busybox: Fatal error: Curses. H: No file or directory