A few questions about ubunutu and app installation

ex4722

Member
Joined
Oct 14, 2020
Messages
42
Reaction score
16
Credits
344
So after my first week and a day with linux i am started to get confused about the commands regarding installing applications. So from my experience apt-get is no longer used because its kinda old or something like that. The command used is usually apt install or any thing like that. The thing is im confused on my both commands work and they do display different things. Another question is about installation of apps in general for linux. I know that the linux depository has a large amount of files to use but what about those not in the depository. Are those jsut not install able? I wanted to download a key remapper for my mouse but i cant seem to download it. The last question is about the wget and the dpkg command. I saw that you use these command to install google chrome but I'm wondering why we have to use these and cant we just use apt install.

Thanks in advance!
 


I use "Synaptic Package Manager" to install and remove software.




If the software you are wanting is not available in the repository than go to the software manufacturer and see if they offer a deb file for Linux to download.
 
Last edited by a moderator:
Legendary find, Andy, I will bookmark it. :)

@ex4722 -I can answer your questions, I believe, but I have to sign off now for my evening in Australia.

Later

Wiz

BTW I use apt-get, it has not been deprecated (made obsolete/redundant) yet.
 
The apt command combines and encapsulates the functionality of apt-get and apt-cache. AFAICT, apt-get and apt-cache are still used under the hood and are no way deprecated.

Instead of using apt-get for installing/uninstalling and apt-cache for searching for packages, or displaying information about them, you can simply use apt and apt will run the appropriate tool, based on the command you’ve given it.

So the apt command just makes using the apt tools a little more intuitive. Whether you choose to use apt, or apt-get and apt-cache is entirely up to you.

apt-file is still a separate module though. Its functionality hasn’t been encapsulated in the apt command.

apt-file is an optional, extra apt tool which allows you to find which package contains a particular file, or depends on a particular file. So it’s like a reverse lookup.
 
And regarding dpkg - dpkg was the original Debian package manager. It’s still used under the hood by apt to install/remove packages.
It can still be used to manually install/uninstall packages too.

The only problem with dpkg is that it has no dependency resolution capabilities.
So before you could cleanly install a particular package and run it, you’d have to download and install all packages it depends on. And before you could install those, there could be the packages that they depended on. And so on.
So for some packages, you could have rather long dependency chains to resolve before you could install the one package you actually wanted.

Apt does all of this automatically. If you want to install a package, it looks at the entire dependency chain and works out which packages you have and which ones you need, before downloading and installing each of them.
 
Another question about files in general, when searching for a file or running a fule and you are entering the name of the file and its has multiple words do you use - or _ to show the space bar.
 
If you know the name of the package, then use CLI with sudo apt install <package-name>. If you don't, but have some idea of what the package does, then use the GUI tools such as Synaptic or Muon. As a very last resort you can use Discover with Ubuntu. In any case, all these tools will identify and install required dependencies and install them. In my opinion, Discover is not "all that"; it's gotten better over time, but still ...

Yes apt is better, but apt-get still works. In my opinion apt is easy to understand, but apt does use apt-get (and other apt- commands) "under the hood". If you are interested, you can look at the man pages for each of the "apt".

And there is an interactive CLI named aptitude, that does all this stuff too.
 
wait guys im confused now. Using apt install you install a app that has files in a depository. The wget command takes the file from a url that you enter following the command. The dpkg -i command installs a file that that you already downloaded, but the apt command does the same thing but dpkg does not install the extra files needed to run. is this correct? I read a few articles and they kinda confused me.
 
wait guys im confused now. Using apt install you install a app that has files in a depository. The wget command takes the file from a url that you enter following the command. The dpkg -i command installs a file that that you already downloaded, but the apt command does the same thing but dpkg does not install the extra files needed to run. is this correct? I read a few articles and they kinda confused me.

Basically, yes- more or less.
Apt-get will resolve even the most complex dependency chains, but it still uses dpkg under the hood to actually install the packages.

And apt is a wrapper around apt-get and apt-cache.

Another question about files in general, when searching for a file or running a fule and you are entering the name of the file and its has multiple words do you use - or _ to show the space bar.
Generally in Debian based distros, the package names do not contain spaces at all. Most often a hyphen - is used.

But if you are searching through all information in the listings and you want to use multiple search terms you will use something like grep to filter the results.

e.g.
if you wanted to find geany plugins:
Code:
apt-cache search geany | grep plugin
Or using apt:
Code:
apt search geany | grep plugin

or if you wanted to search for a package with several words that might be together in the description. E.g. text editor - you could use quotes like this:
Code:
apt-cache search "text editor"
or again, using apt:
Code:
apt search "text editor"

And in more general terms - if a file name has spaces in it, you either need to escape the spaces with a backslash character, or quote the entire path/filename using double quotes.

As an example of escaping spaces in a file name - we’ll create a file called “my little text file.txt” using the touch command - and we’ll escape the spaces:
Code:
touch my\ little\ text\ file.txt
if you run the ls command - you should see the new file listed.

Now we’ll remove it using the rm command, but this time we’ll use double quotes around the file-name:
Code:
rm "./my little text file.txt"

Those are two ways of dealing with spaces in a filename in the terminal.
 
Last edited:
well lets talk about package management

how far to you want to go back. Lets throw in you get a source file, unpack it and
run

./configure
make
make install
(like a log time ago)
then you might have software installed, which works. The problem is that doing it this way , your system has a problem tracking it ,which causes a problem when there are deps , then you update the deps , but the system isn't tracking so it gets messy.

A specific library some where holding packages deemed to tailor fit a distro is a "repositiory". You can use a gui synaptic or command . The essence is your sytem knows whats installed and also installed deps it knows.

Now you can manually get a pkg and use dpkg to install it; the point is using this still lets ypur system know whats going on.

wget allow s you to download .iso files and anything else. Its not tied to package management
 
Basically, yes- more or less.
Apt-get will resolve even the most complex dependency chains, but it still uses dpkg under the hood to actually install the packages.

And apt is a wrapper around apt-get and apt-cache.


Generally in Debian based distros, the package names do not contain spaces at all. Most often a hyphen - is used.

But if you are searching through all information in the listings and you want to use multiple search terms you will use something like grep to filter the results.

e.g.
if you wanted to find geany plugins:
Code:
apt-cache search geany | grep plugin
Or using apt:
Code:
apt search geany | grep plugin

or if you wanted to search for a package with several words that might be together in the description. E.g. text editor - you could use quotes like this:
Code:
apt-cache search "text editor"
or again, using apt:
Code:
apt search "text editor"

And in more general terms - if a file name has spaces in it, you either need to escape the spaces with a backslash character, or quote the entire path/filename using double quotes.

As an example of escaping spaces in a file name - we’ll create a file called “my little text file.txt” using the touch command - and we’ll escape the spaces:
Code:
touch my\ little\ text\ file.txt
if you run the ls command - you should see the new file listed.

Now we’ll remove it using the rm command, but this time we’ll use double quotes around the file-name:
Code:
rm "./my little text file.txt"

Those are two ways of dealing with spaces in a filename in the terminal.
pleased to see someone else knows about geany- thought i was the only one using it?
 
wget allow s you to download .iso files and anything else. Its not tied to package management
So that means with wget allows for you to install anything even it its not a application but dpkg can only install deb files that are physically downloaded.
 
Not quite.

wget allows you to download anything, but not to install it.

Wizard
 
pleased to see someone else knows about geany- thought i was the only one using it?

I don’t use geany, I’m a vim user. But I know that geany is pretty good and it has a lot of useful plugins to extend its functionality. It can be extended and used as a lightweight IDE etc.

I was just using geany as an example. There was nothing more to it than that!
 
@ex4722 , wget, with many Distros, allows the option to drag and drop from Browser to Terminal.

As an example, last night I was looking to download and try Trisquel, which I saw at distrowatch.com had a new version, so I went to the page where I could download it from, made my Browser a window (usually run it fullscreen) and opened Terminal beside it, then dragged the hyperlink to Terminal and dropped it, and it appeared.

Then Home to the start of the line, type in wget followed by a space, End to the end of the line and Enter, and away we go. I can then shut down Browser and leave Terminal open, and the results are as below

Code:
chris@KubuntuFocal-SSD:~$ wget https://ftp.caliu.cat/pub/distribucions/trisquel/
iso//trisquel_9.0_amd64.iso  
--2020-10-25 18:53:53--  https://ftp.caliu.cat/pub/distribucions/trisquel/iso//t
risquel_9.0_amd64.iso
Resolving ftp.caliu.cat (ftp.caliu.cat)... 147.83.91.172
Connecting to ftp.caliu.cat (ftp.caliu.cat)|147.83.91.172|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2715254784 (2.5G) [application/octet-stream]
Saving to: 'trisquel_9.0_amd64.iso’

trisquel_9.0_amd64. 100%[===================>]   2.53G  2.09MB/s    in 32m 56s  

2020-10-25 19:26:53 (1.31 MB/s) - 'trisquel_9.0_amd64.iso’ saved [2715254784/271
5254784]

As usual with Linux commands, you can get more information with

man wget

(it's a long manual)

HTH

Wizard
 

Members online


Latest posts

Top