Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-22-2003, 09:50 PM
|
#1
|
LQ Newbie
Registered: Dec 2003
Location: Minneapolis, MN
Distribution: Suse 10.2
Posts: 6
Rep:
|
one-line kill command using process name
What's a one-liner that will kill a process by giving the name, instead of the PID?
I know I can get the pid and then kill that, but I want to do it in one line.
Thanks.
|
|
|
12-22-2003, 09:51 PM
|
#2
|
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552
Rep:
|
You could use:
pkill procname
|
|
|
12-22-2003, 10:03 PM
|
#3
|
LQ Newbie
Registered: Dec 2003
Location: Minneapolis, MN
Distribution: Suse 10.2
Posts: 6
Original Poster
Rep:
|
I knew it would be that easy, and that I would embarrass myself
Thanks.
|
|
|
12-22-2003, 10:14 PM
|
#4
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Another option might be:
killall processname
Cool
|
|
|
12-22-2003, 11:28 PM
|
#5
|
LQ Newbie
Registered: Dec 2003
Location: Minneapolis, MN
Distribution: Suse 10.2
Posts: 6
Original Poster
Rep:
|
Yes. Actually I just figured that one out because I realized I would need to kill multiple instances.
Cheers.
|
|
|
12-22-2003, 11:37 PM
|
#6
|
LQ Newbie
Registered: Dec 2003
Location: Minneapolis, MN
Distribution: Suse 10.2
Posts: 6
Original Poster
Rep:
|
OK,
Here's another one for you ...
How do I stop repeat instances of the same command line from filling up bash's history?
Back in my DOS days I used 4DOS, which was smart that way. Can I do this in Linux/bash?
j.
|
|
|
12-23-2003, 12:33 AM
|
#7
|
LQ Newbie
Registered: Dec 2003
Location: Minneapolis, MN
Distribution: Suse 10.2
Posts: 6
Original Poster
Rep:
|
never mind: it's HISTCONTROL=ignoredups
|
|
|
All times are GMT -5. The time now is 08:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|