본문 바로가기
개발/Shell

apt와 apt-get 차이점

by 상5c 2021. 7. 7.

명령어가 궁금할땐 man을 사용하거나 홈페이지 docs를 참고하자.

apt provides a high-level commandline interface for the package management system. 
It is intended as an end user interface and enables some options better suited for 
interactive usage by default compared to more specialized APT tools like apt-get(8) 
and apt-cache(8).

...

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
       The apt(8) commandline is designed as an end-user tool and it may change behavior between versions.
       While it tries not to break backward compatibility this is not guaranteed either if a change seems
       beneficial for interactive use.

       All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as
       well.  apt(8) just changes the default value of some options (see apt.conf(5) and specifically the
       Binary scope). So you should prefer using these commands (potentially with some additional options
       enabled) in your scripts as they keep backward compatibility as much as possible.

 

man apt의 일부 내용이다. apt와 apt-get은 기능적으로 차이는 없으나 apt는 사용자를 위해 만들어진 명령이다. 대화형 사용을 위해 만들어져서 스크립트내에서의 사용에는 적합하지 않을 수 있다는 내용이다.

사용자가 직접 사용한다면 apt를, 스크립트에서 사용한다면 apt-get을 사용하면 된다.