Score:-2

Packages and meaning of gcc-8

us flag

ls -la commands below brings file information gcc-8 that looks strange for me. I suppose it is not link. I know there are different GCC packages with different GCC versions and it looks like I have package with GCC version 8.

How to know gcc-8 is package and not link? Where this package is located? Why other binaries does not show its packages?

ls -la /usr/bin/gcc

brings

lrwxrwxrwx 1 root root 5 Apr 22  2021 /usr/bin/gcc -> gcc-8
muru avatar
us flag
Why do you suppose it's not a link? Do you know [what the first column of `ls -l` is for](https://askubuntu.com/questions/517229/what-does-ls-la-do)?
Score:0

How to know gcc-8 is package and not link?

gcc-8 can refer both to a package and a file or link. And most likely if you have package gcc-8, it will provide a file named gcc-8 (perhaps more than one). For instance, check with

$ dpkg -l | grep gcc-8

That will tell you whether package gcc-8 is installed in your system (ar use simply gcc instead of gcc-8 for other versions). Assuming you see package gcc-8 is present in your system, you can list all files provided by that package with

$ dpkg -L gcc-8

In the case you describe, /usr/bin/gcc is clearly a link to /usr/bin/gcc-8. If you want to know whether /usr/bin/gcc-8 is a file or link, simply use

$ ls -la /usr/bin/gcc-8

same as you did.

Where this package is located?

Packages have no location. They are installed, providing many files across the filesystem.

Why other binaries does not show its packages?

If you provide an example, the community might help clarifying this for you.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.