Learn how to use the 2vim editor in Linux

Source: Internet
Author: User
Learn how to use the Linux-2vim editor. 1. install the software in Linux using the vim editor in two ways: dpkg package management tool and apt package management. 1.1dpkg software package management tool dpkg (DebianPackage) management tool, Ubuntu related software... learn how to use Linux -- 2 vim editor 1. install software in Linux using the vim editor in either of the following ways: dpkg software package management tool and apt software package management. 1.1 dpkg Package management tool dpkg (Debian Package) management tool. Ubuntu-related Package files use the. deb suffix because Ubuntu is closely related to the Debian GNU/Linux release. To install. the deb file can open a terminal and enter :. 1 install vim editor note installation sequence: Step 1: vim-runtime_7.2.330-1ubuntu4_all Step 2: vim_7.2.330-1ubuntu4_i386 1.2 apt package management APT (Advanced Packaging Tool) is a powerful package management system, those graphical programs, such as adding/deleting applications, are built on the basis of the application. With dpkg, Debian developed apt again, which can automatically process dependent files and maintain existing configuration files, which is fast, practical, and efficient. If your current network is good, we recommend that you use apt. 2. vim editor compiles java 2.1 to install jdk ① switch to the root user (recommended) switch su-root to root user sudo-I without requiring a password to directly switch to root ② enter the usr Directory (jdk is recommended to be installed in the usr directory for convenient management) cd/usr ③ create a java installation directory in the usr directory mkdir java ④ copy the jdk-6u24-linux-i586.bin to the java directory cp/mnt/hgfs/Linux/jdk-6u24-linux-i586.bin/usr/java ⑤ install jdk cd/ usr/java. /jdk-6u24-linux-i586.bin 6 build a link for him to save the directory length ln-s/usr/java/jdk1.6.0 _ 24 // usr/jdk 7 edit the configuration file, after vim/etc/profile is configured, add the following content: JAVA_HOME =/usr/ Jdk CLASSPATH =.: $ JAVA_HOME/lib/PATH = $ PATH: $ JAVA_HOME/bin export PATH JAVA_HOME CLASSPATH restart machine sudo shutdown-r now restart Check installation status java-version check printing, installation successful: java version "1.6.0 _ 24" Java (TM) SE Runtime Environment (build 1.6.0 _ 24-b07) Java HotSpot (TM) Client VM (build 19.1-b02, mixed mode, sharing) 2.2 vim compile java. 2. use vim to compile the java vim compiler: ① vi Hello. java ② enter I, enter insert mode ③ enter the Esc key, enter command mode ④ enter the colon: [wq indicates exit save, q! Exit without saving] compile javac Hello. java and run java Hello result Hello java from Linux
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.