frequently used linux commands

find out the pid that occupies certain port

ps aux | grep <port>
netstat -anp | grep <port>

find out the run file location

which <cmd>

e.g. which python

symbolic link

sudo ln -s <source/path> <target/path>

git

remove files in the versioned list, not the file system.

git rm --cache <file>

set remote url to ssh

git remote set-url origin [email protected]:<user/repo>.git

你可能感兴趣的:(tricks)