Start Project 8080 port is occupied, however, did not play the old long-Linux, the command forgotten, kill the process do not remember. Decided to organize a wave of it .......
Linux:
sudo enforcement, not root user use .
top is equivalent to windows task manager. space browser \ q quit
View user login :
whoami view the current user's login name
Who
(User name, TTY number, time and date, host address.)
Switch User :
SU [ User] handover user, without switching environment variables
SU - [User ] handover and the user environment variables -> recommendations
View running services occupied by the process :
ps -ef | grip node / java ...
UID PID PPID C STIME TTY TIME CMD
zzw 14124 13991 0 00:38 pts/0 00:00:00 grep --color=auto dae
UID : The program is UID owned
PID : is this program ID
PPIDs : the higher is its parent program ID
C : the CPU resource use Percentage
STIME : system startup time
TTY : terminal's location Login
The TIME : use out of CPU time.
CMD : The command issued what
Kill the process
-9 pid the kill (process ID)
See all the information about the network (port, routing tables ....) Netstat
Parameters: -a All / -t TCP / -u UDP / -n not show aliases (Digital Display) / -l displaying only listening
Find out the port designated to run the program :
-APN netstat | grep the Node / the Java .... (mac is protocol)
Run the program to find the specified port
netstat -an | grep ':22'
View some of the information system :
Check the size of the hard disk usage partition mount point
df -h
View memory
as Free (only abbreviated description of command)
Environment variables :
Printing all environment variables :
env
single:
echo $PATH
Environment variables in / etc / profile stood
- Other base
LS / CAT / cd / vi / vim / Touch / mkdir / SSH / cp / scp will not say
cp scp -r parameter is recursive sense, i.e. copy folder.
What used later increase it ......