본문 바로가기
Security/Kali Linux로 리눅스 기초 배우기

리눅스에서 소프트웨어 추가 삭제

by 계영수 2023. 7. 24.
728x90

데비안(우분투,칼리리눅스)에서 소프트웨어 관리자는 APT(Advanced Packaging Tool)이다. apt-get을 사용하여 새로운 소프트웨어 패키지를 다운로드하고 설치할 수 있을 뿐만 아니라 이를 이용하여 소프트웨어를 업데이트하고 업그레이드 할 수 있다.

▶ 패키지 검색

소프트웨어 패키지를 다운로드하기 전에 운영체제가 정보를 저장하는 레포지터리에서 필요한 패키지를 가지고 있는지 확인할 수 있다.

┌──(kali㉿kali)-[~]
└─$ apt-cache search snort
ippl - IP protocols logger
fwsnort - Snort-to-iptables rule translator
golang-github-jasonish-go-idsrules-dev - Go IDS rule parser
libdaq-dev - Data Acquisition library for packet I/O - development files
libdaq2 - Data Acquisition library for packet I/O - shared library
oinkmaster - Snort rules manager
psad - Port Scan Attack Detector
sagan - Real-time System & Event Log Monitoring System
sagan-rules - Real-time System & Event Log Monitoring System [rules]
snort - flexible Network Intrusion Detection System
snort-common - flexible Network Intrusion Detection System - common files
snort-common-libraries - flexible Network Intrusion Detection System - libraries
snort-doc - flexible Network Intrusion Detection System - documentation
snort-rules-default - flexible Network Intrusion Detection System - ruleset
                                                                                                                                                             
┌──(kali㉿kali)-[~]
└─$

▶ 소프트웨어 설치

┌──(kali㉿kali)-[~]
└─$ sudo apt-get install snort
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libdaq2 libestr0 libfastjson4 liblognorm5 oinkmaster rsyslog snort-common snort-common-libraries snort-rules-default
Suggested packages:
  rsyslog-mysql | rsyslog-pgsql rsyslog-mongodb rsyslog-doc rsyslog-openssl | rsyslog-gnutls rsyslog-gssapi rsyslog-relp snort-doc
The following NEW packages will be installed:
  libdaq2 libestr0 libfastjson4 liblognorm5 oinkmaster rsyslog snort snort-common snort-common-libraries snort-rules-default
0 upgraded, 10 newly installed, 0 to remove and 745 not upgraded.
Need to get 0 B/2,244 kB of archives.
After this operation, 9,614 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package snort-common-libraries.
(Reading database ... 398326 files and directories currently installed.)
Preparing to unpack .../0-snort-common-libraries_2.9.7.0-5build1_amd64.deb ...
Unpacking snort-common-libraries (2.9.7.0-5build1) ...
~~~
~~~
~~~

 

소프트웨어 제거

┌──(kali㉿kali)-[~]
└─$ sudo apt-get remove snort                         
[sudo] password for kali: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdaq2 libestr0 libfastjson4 liblognorm5 oinkmaster rsyslog snort-common snort-common-libraries snort-rules-default
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  snort
0 upgraded, 0 newly installed, 1 to remove and 745 not upgraded.
After this operation, 1,987 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 398574 files and directories currently installed.)
Removing snort (2.9.7.0-5build1) ...
Stopping snort (via systemctl): snort.service.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for kali-menu (2023.2.3) ...
                                                                                                                                                             
┌──(kali㉿kali)-[~]
└─$

패키지와 동시에 구성파일을 제거하는 경우

┌──(kali㉿kali)-[~]
└─$ sudo apt-get purge snort 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdaq2 libestr0 libfastjson4 liblognorm5 oinkmaster rsyslog snort-common snort-common-libraries snort-rules-default
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  snort*
0 upgraded, 0 newly installed, 1 to remove and 745 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 398550 files and directories currently installed.)
Purging configuration files for snort (2.9.7.0-5build1) ...
                                                                                                                                                             
┌──(kali㉿kali)-[~]
└─$

▶라이브러리 또는 Indenpendent File 제거

┌──(kali㉿kali)-[~]
└─$ sudo apt autoremove snort
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'snort' is not installed, so not removed
The following packages will be REMOVED:
  libdaq2 libestr0 libfastjson4 liblognorm5 oinkmaster rsyslog snort-common snort-common-libraries snort-rules-default
0 upgraded, 0 newly installed, 9 to remove and 745 not upgraded.
After this operation, 7,628 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 398544 files and directories currently installed.)
Removing libdaq2 (2.0.7-5) ...
Removing rsyslog (8.2306.0-1) ...
Removing liblognorm5:amd64 (2.0.6-4) ...
Removing libestr0:amd64 (0.1.11-1) ...
Removing libfastjson4:amd64 (1.2304.0-1) ...
Removing oinkmaster (2.0-4.2) ...
Removing snort-common (2.9.7.0-5build1) ...
Removing snort-common-libraries (2.9.7.0-5build1) ...
Removing snort-rules-default (2.9.7.0-5build1) ...
Processing triggers for libc-bin (2.36-9) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for kali-menu (2023.2.3) ...
                                                                                                                                                             
┌──(kali㉿kali)-[~]
└─$

▶패키지 업데이트

소프트웨어 레포지터리는 주기적으로 새 소프트웨어 또는 기존 소프트웨어의 새 버전으로 업데이트된다. 이러한 업데이트는 자동으로 사용자에게 전달되지 않으므로 이러한 업데이트를 자신의 시스템에 적용하려면 업데이트를 해야 한다. 

┌──(kali㉿kali)-[~]
└─$ sudo apt-get update       
Get:1 http://mirror.anigil.com/kali kali-rolling InRelease [41.2 kB]                                              
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                                                           
Get:3 http://mirror.anigil.com/kali kali-rolling/main amd64 Packages [19.5 MB] 
Hit:4 http://archive.canonical.com/ubuntu focal InRelease                     
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]       
Get:6 http://mirror.anigil.com/kali kali-rolling/main amd64 Contents (deb) [46.1 MB]
Get:7 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]                        
Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                        
Get:9 http://mirror.anigil.com/kali kali-rolling/contrib amd64 Packages [114 kB]
Get:10 http://mirror.anigil.com/kali kali-rolling/contrib amd64 Contents (deb) [219 kB]
Get:11 http://mirror.anigil.com/kali kali-rolling/non-free amd64 Packages [218 kB]
Get:12 http://mirror.anigil.com/kali kali-rolling/non-free amd64 Contents (deb) [916 kB]
Fetched 67.4 MB in 7s (9,226 kB/s)                                                                                                                          
Reading package lists... Done
~~~
~~~
~~~
728x90

'Security > Kali Linux로 리눅스 기초 배우기' 카테고리의 다른 글

Kali Linux - 네트워크  (0) 2023.07.25
Kali Linux Text Editor(02)  (0) 2023.07.25
Kali Linux - Text Editor(01)  (0) 2023.07.24
kali Linux에 Ubuntu 레포지터리 추가  (0) 2023.07.22
Kali Linux 설치  (0) 2023.07.20