우분투 bash: xxx: command not found

1 문제상황[ | ]

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

2 command-not-found 설치[ | ]

root@ubuntu1:~# apt install command-not-found
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  command-not-found-data distro-info-data file iso-codes libapt-inst2.0
  libexpat1 libgdbm5 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib
  libpython3.6-minimal libpython3.6-stdlib libreadline7 lsb-release
  mime-support python-apt-common python3 python3-apt
  python3-commandnotfound python3-gdbm python3-minimal python3.6
  python3.6-minimal readline-common xz-utils
Suggested packages:
  snapd isoquery gdbm-l10n lsb python3-doc python3-tk python3-venv
  python3-apt-dbg python-apt-doc python3-gdbm-dbg python3.6-venv
  python3.6-doc binutils binfmt-support readline-doc
The following NEW packages will be installed:
  command-not-found command-not-found-data distro-info-data file iso-codes
  libapt-inst2.0 libexpat1 libgdbm5 libmagic-mgc libmagic1 libmpdec2
  libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7
  lsb-release mime-support python-apt-common python3 python3-apt
  python3-commandnotfound python3-gdbm python3-minimal python3.6
  python3.6-minimal readline-common xz-utils
0 upgraded, 27 newly installed, 0 to remove and 5 not upgraded.
Need to get 8713 kB of archives.
After this operation, 52.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.7-1~18.04 [531 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.7-1~18.04 [1604 kB]
...
Setting up python3-commandnotfound (18.04.5) ...######################...] 
Setting up command-not-found (18.04.5) ...#############################..] 
Processing triggers for libc-bin (2.27-3ubuntu1) ...####################.]

3 확인[ | ]

root@ubuntu1:~# source /etc/bash.bashrc 
root@ubuntu1:~# netstat

Command 'netstat' not found, but can be installed with:

apt install net-tools
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}