Linux Learning 1: linux Learning

Source: Internet
Author: User
Tags ssh port

Linux Learning 1: linux Learning
View ip: ifconfig
Nic startup: ifup eth0
View rpm package installation: rpm-qa | grep ssh
Ssh service start: service sshd start or/etc/init. d/sshd start
Ssh service restart: service sshd restart
View ssh Port: grep Port/etc/ssh/sshd_config
Disable Firewall service iptables stop
View port usage: netstat-apn where to view java: whereis java

View the java execution path: which java

View jdk location: echo $ JAVA_HOME

View PATH: echo $ PATH


2. Configure the linux environment variables as follows: (remember source. bash_profile)
. Modify the/etc/profile file (Global Users)


Vi this file/etc/profile
Add the following content to the end of the profile file:
Export JAVA_HOME =/usr/share/jdk1.6.0 _ 20
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
. Modify the. bash_profile file (a user can use these environment variables)
Add the following content to the end of the. bash_profile file:


Export JAVA_HOME =/usr/share/jdk1.6.0 _ 20
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
. Shell terminal to execute the following command: (for temporary use)
Export JAVA_HOME =/usr/share/jdk1.6.0 _ 14
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar


3. Uninstall jdk
· Find the _ uninst subdirectory of the jdk installation directory.
· Run the command./uninstall. sh on the shell terminal to uninstall jdk.

Rm: mandatory to delete a directory or file-f

Pwd View Current Directory

Linux completion tab


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.