Command to check program/applications open in Linux

I wanted to know the command which will output
Applications/Programs let say chrome, firefox or any editor open in linux
Durga Charan OjhaSr. System AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnsoneSenior Oracle DBACommented:
ps will tell you running commands.  grep will search the output.

One example would be:

ps -ef | grep -i -e chrome -e firefox -e vi

Add as many more as you want to that.
Durga Charan OjhaSr. System AdministratorAuthor Commented:
yes that is ok but how would I guess what else is running
johnsoneSenior Oracle DBACommented:
You have to know what you are looking for.  There isn't a magic mind reading program in Linux that you can say give me what I'm thinking.

There is nothing that would prevent a user from creating a script or program called chrome or firefox or vi or emacs or ex or ed.  There would be no way to distinguish between those and the the "real" programs.

Also, probably want to add the -w switch to grep.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

johnsoneSenior Oracle DBACommented:
Also, the opposite is true.  There is nothing that stops someone from rename chrome to www.  How would you find that?
Then just use ps -ef ... This will provide every process running as well as the user it's running as (under) along with PID and date information

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Clarify what you mean by "yes that is ok but how would I guess what else is running" as...

ps -ef shows 100% of all processes running.
Gerwin Jansen, EE MVETopic Advisor Commented:
Here's an alternative: use the "top" command, when it is running type "u" and then type the username (case sensitive) for which you want to see the running programs.

When you're done type "q" to exit top.

(all commands without typing the quotes)
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Accepted two comments with same answer.

Poster has stopped posting.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.