"Bash: netstat: command not found"의 두 판 사이의 차이

9번째 줄: 9번째 줄:
==해결방법==
==해결방법==
* netstat 대신 [[리눅스 ss -lnp]]를 사용하는 방법도 있다...
* netstat 대신 [[리눅스 ss -lnp]]를 사용하는 방법도 있다...
* 여기서는 netstat( net-tools )를 설치한다.
<source lang='bash'>
<source lang='bash'>
apt install net-tools
apt install net-tools

2020년 8월 19일 (수) 02:10 판

1 문제상황

root@debian:~# netstat -tnlp
bash: netstat: command not found

2 해결방법

  • netstat 대신 리눅스 ss -lnp를 사용하는 방법도 있다...
  • 여기서는 netstat( net-tools )를 설치한다.
apt install net-tools
root@debian:~# apt install net-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 194 kB of archives.
After this operation, 803 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 net-tools amd64 1.60+git20161116.90da8a0-1ubuntu1 [194 kB]
Fetched 194 kB in 2s (106 kB/s)                      
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package net-tools.
(Reading database ... 9703 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20161116.90da8a0-1ubuntu1_amd64.deb ...
Unpacking net-tools (1.60+git20161116.90da8a0-1ubuntu1) .................] 
Setting up net-tools (1.60+git20161116.90da8a0-1ubuntu1) ................]
root@debian:~# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1190/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      1190/sshd

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}