Linux software installation directory is also pay attention to, understand this point, in the system management is beneficial

/usr: indicates the system-level directory, which can be interpreted as C:/Windows/, and /usr/lib as C:/Windows/System32. /usr/local: indicates the user-level program directory, which can be expressed as C:/Progrem Files/. Software compiled by users is installed in this directory by default. /opt: user-level program directory, D:/Software, opt can be used to place large third-party Software (or games), when you do not need it, just rm -rf. If the hard disk capacity is insufficient, you can mount /opt to another hard disk.

Where is the source code? /usr/src: system-level source directory. /usr/local/src: user-level source directory.

— — — — — — — — — — — — — — — — — — — — — — – — — — — — — — — — — — — —

/opt Here’s where optional stuff is put. Trying out the latest Firefox beta? Install it to /opt where you can delete it without affecting other settings. Programs in here usually live inside a single folder whick contains all of their data, libraries, etc. This is where the optional programs are stored. Would you like to try the latest Firefox beta? Install it in the /opt directory so that when you’re done deleting Firefox, you can delete it without affecting any other Settings on your system. A program installed in /opt keeps all its data, library files, and so on in the same directory. The /opt/firefox_beta directory contains all the files, libraries, and data needed to run Firefox. To delete Firefox, simply delete the /opt/firefox_beta directory.

/usr/local This is where most manually installed(ie. outside of your package manager) software goes. It has the same structure as /usr. It is a good idea to leave /usr to your package manager and put any custom scripts and things into /usr/local, since nothing important normally lives in /usr/local. This is where software is installed manually, that is, not through Synaptic or apT-get. It has a similar directory structure to the /usr directory. I think it would be a good idea to let the package manager manage the /usr directory and put the custom scripts under /usr/local.