Linux Tips

Leave a Comment

Under construction

Linux port usage:

Update: netstat has replaced by 'ip -s' or ss in newer system.

netstat - a command-line tool that displays network connections,
 routing tables, and a number of network interface statistics.

fuser - a command line tool to identify processes using files or sockets.

lsof - a command line tool to list open files under Linux / UNIX to report
 a list of all open files and the processes that opened them.

/proc/$pid/ file system - Under Linux /proc includes a directory for
 each running process (including kernel processes) at /proc/PID, 
containing information about that process, notably including 
the processes name that opened port.

eg:

sudo lsof -i
sudo netstat -lptu
sudo netstat -tulpn

ld Path

export LD_LIBRARY_PATH=
ld -L DIRECTORY, --library-path DIRECTORY

eg:

ld: cannot find -lc
install glibc-static or add glibc.a location to LD_LIBRARY_PATH

0 comments:

Post a Comment