"C:\Program Files" in Mint 17.3

Quick to answer questions about finding your way around Linux Mint as a new user.
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.
Locked
Habitual

Re: C:\Program Files in Mint 17.3

Post by Habitual »

terminal >

Code: Select all

whereis <program>
Linux Command Line Learning Resources
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: C:\Program Files in Mint 17.3

Post by Reorx »

In a terminal >>>

Code: Select all

dpkg --get-selections > Installed_Package_List
Then open your home folder and click on Installed_Package_List
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: C:\Program Files in Mint 17.3

Post by Flemur »

Code: Select all

echo $PATH
will show the locations of all the executables you can normally run wwithout specifying a complete path to them - just the locations (directories) they're in.

This script will show you a program name given part of the name:

Code: Select all

#!/bin/bash
#
if [ $# -lt 1 ]
then
  echo Usage: `basename $0` pattern
  exit 1
fi
echo $PATH | sed 's/^/ls -A /' | sed 's/:/ |grep '$1'; ls -A /g' | sed 's/$/ |grep '$1'/' | bash | sort
exit 0

Code: Select all

$
$ W dvd
convxdvd
dvd+rw-booktype
dvd+rw-format
dvd+rw-mediainfo
dvd-ram-control
$
$ W dpkg
dpkg
dpkg-architecture
dpkg-buildflags
...lots more
When you know the name of an executable, you can do

Code: Select all

$ which dpkg-architecture
/usr/bin/dpkg-architecture
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Moem
Level 22
Level 22
Posts: 16235
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: C:\Program Files in Mint 17.3

Post by Moem »

Instigator wrote:feels like its very easy to install a program and hide it and the user never know its there?
Then again, you'd need a password with sudo rights to be able to do that. So it's not like any stranger who is near your computer can do such a thing.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Habitual

Re: C:\Program Files in Mint 17.3

Post by Habitual »

Try the C:\USER GUIDE\
in mintwelcome.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: "C:\Program Files" in Mint 17.3

Post by karlchen »

Instigator wrote:that means you need to know each of their names? what about programs not listed in the menus? - is there a command to list every installed program? like for example tor isn't listed in menus and installed.
Fine. The same challenge exists on Windows as well.
"Programs & Functions" only lists the applications which have been added there by the corresponding setup programs / installers.
Windows brings along a lot of commandline executables which most users will never know about.
These commandline executables will not appear in the Windows applications menus. Much like on Linux.

On Linux Mint you can e.g. use Synaptic to list all installed software packages, no matter whether the applications appear in the application menu or not. You can right click each of the packages, select properties and list "installed files". Will be a lot of work if you try to do so for each installed software package; but handy if you just want to check for a small number of applications.

Beware:
Applications which have been installed circumventing the software management system will not be listed by Synaptic.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
0ddity

Re: "C:\Program Files" in Mint 17.3

Post by 0ddity »

Why can't he just browse to /usr/share/applications? Coming from windows, that is what I would consider the equivalent to the C:\Program Files directory.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: "C:\Program Files" in Mint 17.3

Post by karlchen »

Hi, 0ddity.
Why can't he just browse to /usr/share/applications? Coming from windows, that is what I would consider the equivalent to the C:\Program Files directory.
You are absolutely free to set up any hypothesis in the world, even if it turns out to be pretty wrong in the end. :wink:
"Coming from Windows" is all right, but you should arrive at Linux at some point in time and let go of the Windows way of looking at things. :wink:

Oh, just in case no-one should have mentioned so in this thread before:
/usr/bin is the place where you will find representations of almost all installed applications.
Representation means:
+ Frequently the (only) executable file of an application / commandline tool is located here
+ Frequently the start script which launches an application is located here
+ Frequently a symbolic link to either of the 2 items named above is located here.

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: "C:\Program Files" in Mint 17.3

Post by Cosmo. »

0ddity wrote:Coming from windows, that is what I would consider the equivalent to the C:\Program Files directory.
Do it the other way round: Try to search in Windows for paths, that you have in Linux. You will obviously already fail at the beginning.
This means: Linux and Windows are 2 completely different OS. They have more or less only one thing in common: Running a computer with the same base concept of the hardware.
Habitual

Re: "C:\Program Files" in Mint 17.3

Post by Habitual »

The problem, or a contributing factor among new users is the tendency to associate every thing on the system as the OSs. "in Mint 17.3" for example. ", but this sometimes is the only frame of reference they have.
"How does Linux do it?" I always found a better question than "If Windows does it this way, it should follow Linux does too.". Wrong.

You need to learn the Linux FileSystem, not where the heck the non-existent equivalent to C:\PROGRAM FILES\
"is".

Open a terminal and issue:

Code: Select all

man hier
And then "surf" on over to http://tldp.org/ and search for filesystem and learn at your own pace.

Think of Windows as a set of Standard wrenches in a toolbox.
Think of Linux as a set of Metric wrenches in a toolbox.
A good mechanic doesn't spend much time on what made the differences, he just knows there is one and he has to adjust.

Don't mistake motion for effort, son.
Buy a Linux book, Hard Copy, Tree "Killing" book on Linux.
Anything published in the last 15 years (not a stretch) devotes the first 5 or 6 chapters to "introductory topics"
such as the filesystem.
Learn those 5 or 6 chapters well.

Now, Go Fish.


Who ya calling "Hannibal"?
JEB

Re: "C:\Program Files" in Mint 17.3

Post by JEB »

Perhaps, Software Manager > View > uncheck available packages. Select a category, only installed packages will be shown.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: "C:\Program Files" in Mint 17.3

Post by Hoser Rob »

The first thing you need to get away from is the idea of a C: (or whatever) drive in Linux. The file system is organized differently, and it's not based on physical drives. It's a log based system and root (/) is the closest equivalent. To the system your drives are really just folders, but the ones you're using when you log in are protected. You can't unmount them when using them.

Here's a good explanaiton of where programs are stored in your file system:

http://askubuntu.com/questions/27213/wh ... o-things-g
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
User avatar
BG405
Level 9
Level 9
Posts: 2510
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: "C:\Program Files" in Mint 17.3

Post by BG405 »

I've always seen the "C drive" as a partition but that's because since the early 2000s I've always set up separate partitions for the OS, DATA, Swap and, where appropriate, a working partition (for video editing etc.). Seems this is more the Linux way even though I didn't realize it until I changed over, therefore the Linux setup made perfect sense once I'd sort-of familiarized myself with the directory structure. :)

Unless you're actually dealing with Windows systems there's no point in thinking of things in the Windows way. It's nice and refreshing!
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
Habitual

Re: "C:\Program Files" in Mint 17.3

Post by Habitual »

For the sick and twisted out there, open a terminal and issue:

Code: Select all

DOS='C:${PWD//\//\\\}>'
PS1="\[\033[00m\]\[\033[00m\]\[\033[01;39m\]$DOS\[\033[00m\]" 
Get you some!
User avatar
Moem
Level 22
Level 22
Posts: 16235
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: "C:\Program Files" in Mint 17.3

Post by Moem »

Instigator wrote:I just want to be able to run my programs from the folders they are in not the menus
But the menu entries do exactly that. They are links to the programs in the folders where they are. Can you explain your reasoning?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Habitual

Re: "C:\Program Files" in Mint 17.3

Post by Habitual »

Instigator wrote:thanks for all the posts ill read these at work tomorrow and see what sense i can make of it all.

I just want to be able to run my programs from the folders they are in not the menus
And you can. You just don't know where they are "at". Just like DOS, you likely have a "$PATH" environment variable in your "shell".
Just like DOS' "$PATH" statement, I don't need to know where commands are at, if I have a GUI, and that's all the GUI basically is, a "collection of tools" (that you don't know where they are) organized nicely into some tidy categories on the menus.
Your "$PATH" is just a shortcut to directories you are not in, correct?

I admire your desire to "look under the 'hood". It's a rare quality.
It takes a certain grit to realize there's way more going on "under" the desktop than on it,
and going for it! So I kinda of get it.

The desktop doesn't even matter to guys like me, or you?.
I just hope you stay grounded.
Here's 3 methods to locate binaries on most Linux-based OSs.
These likely work regardless of desktop.

Method #1:
If you want to know where say tcpdump is on your system , open your terminal, (who am I talking to? or switch to a new one ;) ) and issue

Code: Select all

whereis -b tcpdump
and it shows here with

Code: Select all

whereis -b tcpdump
tcpdump: /usr/sbin/tcpdump
I used -b because I read man whereis and I know that tcpdump is a binary,
so I used it.
IDK if tcpdump is installed on your system. but pick a binary ("Application" if you will)

Method #2:

Code: Select all

find / -name tcpdump -type f | grep bin
/usr/sbin/tcpdump
and poke around.

Method #3:

Code: Select all

man locate
is your friend.
Update the locate db using this as root:

Code: Select all

updatedb
then

Code: Select all

locate tcpdump | grep bin
and poke around.
karlchen wrote:Oh, just in case no-one should have mentioned so in this thread before:
/usr/bin is the place where you will find representations of almost all installed applications.
Representation means:
+ Frequently the (only) executable file of an application / commandline tool is located here
+ Frequently the start script which launches an application is located here
+ Frequently a symbolic link to either of the 2 items named above is located here.

Cheers,
Karl
Thanks Karl. You rock.
Last edited by Habitual on Thu Jun 23, 2016 5:29 pm, edited 1 time in total.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: "C:\Program Files" in Mint 17.3

Post by Cosmo. »

Instigator wrote:I just want to be able to run my programs from the folders they are in not the menus
No problem. Open a terminal or the command-line window (alt-F2) and enter the command-name. Usually the start binaries or links to them are stored in /usr/bin (already mentioned by karlchen), so entering the name is enough (e.g. firefox).
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: "C:\Program Files" in Mint 17.3

Post by Hoser Rob »

One thing you should know to get a better understanding of why so many things are separate folders like /home for user data is that Linux is a Unix derivative. And Unix, unlike Windows, was designed from the start to be multiuser and multitasking. Whereas those things have had to be added to Windows, and often not very well. Linux has never assumed that you're the only user on the computer.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: "C:\Program Files" in Mint 17.3

Post by Cosmo. »

Hoser Rob wrote:Linux has never assumed that you're the only user on the computer.
Right, but even more importantly: Linux and (Unix, primarily used as server-OS, where you hardly find multiple user accounts) never assumed, that system (inclusive program) file and user data have to get mixed. In the days of Windows 9x you could find them partly even inside the Windows folder (brrr :x )
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1491
Joined: Tue Apr 26, 2016 3:28 pm

Re: "C:\Program Files" in Mint 17.3

Post by Arch_Enemy »

Habitual wrote:The problem, or a contributing factor among new users is the tendency to associate every thing on the system as the OSs. "in Mint 17.3" for example. ", but this sometimes is the only frame of reference they have.
"How does Linux do it?" I always found a better question than "If Windows does it this way, it should follow Linux does too.". Wrong.

You need to learn the Linux FileSystem, not where the heck the non-existent equivalent to C:\PROGRAM FILES\
"is".

Open a terminal and issue:

Code: Select all

man hier
And then "surf" on over to http://tldp.org/ and search for filesystem and learn at your own pace.

Think of Windows as a set of Standard wrenches in a toolbox.
Think of Linux as a set of Metric wrenches in a toolbox.
A good mechanic doesn't spend much time on what made the differences, he just knows there is one and he has to adjust.

Don't mistake motion for effort, son.
Buy a Linux book, Hard Copy, Tree "Killing" book on Linux.
Anything published in the last 15 years (not a stretch) devotes the first 5 or 6 chapters to "introductory topics"
such as the filesystem.
Learn those 5 or 6 chapters well.

Now, Go Fish.


Who ya calling "Hannibal"?
This helps immensely. You might also get a copy with a DVD of a new installation to try as well!

Boy, you guys sure are patient! Way back in 2002 I got into a Linux newsgroup (remember UseNet???) and asked a similar question, and I thought about half the people there were going to track me down and lynch me :shock: The other half were understanding and helped immensely. One of them used a Linux /= Windows and I said, Huh? and another replied that not knowing that meant Linux was starting to move away from programmers and finally starting to go mainstream. Ten years ago this guy would have been flamed to shame for asking a C:\ question!

To the OP: a book may seem overwhelming, and it certainly IS but it is also a great aid when starting Linux. You won't understand everything in there, you don't really need to, but if you actually DO and can master it Linux Admins make $$$$$ ;)

Here's another hint to find you program files. It works better in Arch, but has some usability in Mint as well.

Open up synaptic, click search, enter a term for the program or utility you want to find, even partial will usually work. Look at all the installed (green boxed) packages installed, click on the package name and then look at the bottom and click "Installed Files" and it will tell you where the various items of the package is installed.
I have travelled 37629424162.9 miles in my lifetime

One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
Locked

Return to “Beginner Questions”