[SOLVED] apt and/or apt-get?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] apt and/or apt-get?
Hello,
I always use apt-get to install software on Ubuntu and I have been using it on Linux Mint.
Last day, I read the Mint User Manual. It mentioned apt instead of apt-get.
Are they different commands or just the same ones? If they are different, in what way?
Thank you
I always use apt-get to install software on Ubuntu and I have been using it on Linux Mint.
Last day, I read the Mint User Manual. It mentioned apt instead of apt-get.
Are they different commands or just the same ones? If they are different, in what way?
Thank you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: apt and/or apt-get?
it's the same ... there's also apt-cache and a couple of other commands in the apt family, too, probably that's why Mint manual talks about apt
Re: apt and/or apt-get?
Yup, to me it's like a shortcut. Instead of typing sudo apt-get install, I type apt install, apt remove...
Re: apt and/or apt-get?
apt is a mint's specific python wrapper for several debian package management tools (APT, aptitude, dpkg).
it's easier (for example you don't need to type sudo apt-get install a simple apt install will ask for your p/w and carry on the task) and in a way it's more powerful (because picks the "best" commands from the several package management tools)
it's easier (for example you don't need to type sudo apt-get install a simple apt install will ask for your p/w and carry on the task) and in a way it's more powerful (because picks the "best" commands from the several package management tools)
Code: Select all
which apt
Code: Select all
cat /usr/local/bin/apt
Code: Select all
if argcommand in ["install", "remove", "update", "upgrade", "dist-upgrade", "clean", "dselect-upgrade", "build-dep", "check", "autoremove", "autoclean"]:
aptcommand = "apt-get"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["source", "moo"]:
aptcommand = "apt-get"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["search", "show", "changelog"]:
aptcommand = "aptitude"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["reinstall"]:
aptcommand = "aptitude"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["stats", "depends", "rdepends", "policy"]:
aptcommand = "apt-cache"
command = aptcommand + " " + argcommand + argoptions
elif argcommand == "sources":
command = sudo + " nano /etc/apt/sources.list"
elif argcommand == "held":
command = "dpkg --get-selections | grep hold"
elif argcommand == "contains":
command = "dpkg -S" + argoptions
elif argcommand == "content":
command = "dpkg -L" + argoptions
elif argcommand == "hold":
command = "echo " + argoptions + " hold | sudo dpkg --set-selections"
elif argcommand == "unhold":
command = "echo " + argoptions + " install | sudo dpkg --set-selections"
elif argcommand == "version":
command = "/usr/lib/linuxmint/common/version.py" + argoptions
elif argcommand == "purge":
command = sudo + " apt-get remove --purge" + argoptions
elif argcommand == "build":
command = sudo + " dpkg-buildpackage" + argoptions
elif argcommand == "deb":
command = sudo + " dpkg -i" + argoptions
elif argcommand == "download":
command = "apt-cache depends " + argoptions + " |grep -v \"Conflicts:\|Replaces:\"|awk '{print $NF}'|sed -e 's/[<>]//g'|xargs aptitude download -r"
else:
Re: apt and/or apt-get?
It even implements moo Try it:zerozero wrote:Code: Select all
elif argcommand in ["source", "moo"]: aptcommand = "apt-get" command = aptcommand + " " + argcommand + argoptions
Code: Select all
apt moo
Re: apt and/or apt-get?
Code: Select all
zerozero@deb-kde ~ $ apt moo
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
...."Have you mooed today?"...
zerozero@deb-kde ~ $
Re: apt and/or apt-get?
Thanks a lot ZeroZero !
I use apt everyday on my LMDE but... I wasn't aware it was Mint specific ! Thanks a lot
I use apt everyday on my LMDE but... I wasn't aware it was Mint specific ! Thanks a lot
Re: apt and/or apt-get?
you're welcome killer (btw i have to reboot and test those new UP6 updates )
Vincent,
there's one for you handy hey
Vincent,
there's one for you
Code: Select all
apt sources