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.