Soft Link
Soft link is also called symbolic link, this file contains the path name of another file. It can be any file or directory, and files of different file systems can be linked. Similar to the shortcut under win.
--Create a soft connection in the /usr/bin directory to point to /usr/local/java/jdk1.8/bin/java
ln -s /usr/local/java/jdk1.8/bin/java /usr/bin
Hard Link
To put it plainly, a hard link is a pointer to a file index node, and the system does not reallocate an inode for it.
--Create a hard link in the /usr/bin directory to point to /usr/local/java/jdk1.8/bin/java
ln /usr/local/java/jdk1.8/bin/java /usr/bin