从Ubuntu命令行按进程名称杀死进程

There are a number of ways to kill a process if you know the name of the process. Here’s a couple different ways you can accomplish this. We are going to assume that the process we are trying to kill is named irssi

如果您知道进程的名称,则有多种方法可以杀死该进程。 您可以通过以下两种不同的方法来完成此操作。 我们将假设我们要杀死的进程名为irssi

kill $(pgrep irssi)

杀死$(pgrep irssi)

killall -v irssi

Killall -v irssi

pkill irssi

菲尔·伊尔西

kill `ps -ef | grep irssi | grep -v grep | awk ‘{print $2}’`

杀死`ps -ef | grep irssi | grep -v grep | awk'{print $ 2}'`

These techniques can be useful in shell scripts, where you wouldn’t know the process ID and would need to restart or kill a process.

这些技术在Shell脚本中非常有用,因为您不知道进程ID,因此需要重新启动或终止进程。

翻译自: https://www.howtogeek.com/howto/ubuntu/kill-a-process-by-process-name-from-ubuntu-command-line/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/278160.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

18 南京 D

裸的最小球覆盖。 坐标范围大一些所以我们把初始的温度也设置的大一些。 1 #include <bits/stdc.h>2 using namespace std;3 typedef long long ll;4 typedef double db;5 const db INF 1e100;6 const db delta 0.98;7 const db eps 1e-8;8 struct p3{9 db x,y,z;…

如何在iPhone或iPad的控制中心中控制智能家居设备

Apple’s Home app offers quick controls for controlling smart lights, doorbells, thermostats, and other smart home devices—right in your iPhone or iPad’s Control Center. Here’s how to set it up and use it. Apple的Home应用程序可在iPhone或iPad的控制中心内…

亚信安全与安徽电信共创“云网融合”安全新局面

全面提升公共安全能力 联合推“天翼U盾”保障移动政务安全 在近日举办的安徽“互联网”产业合作峰会上&#xff0c;亚信安全宣布与中国电信安徽公司达成战略合作&#xff0c;双方将在“云网融合”的生态基础上打造特色安全服务、促进政企协同安全监管、共创网络安全平安城市等…

idea中开启Run Dashboard

若没有 下一步 ok 转载于:https://www.cnblogs.com/aijiajia1314/p/10551007.html

电台复活节_如何玩Android 11的隐藏复活节彩蛋游戏

电台复活节Justin Duino贾斯汀杜伊诺(Justin Duino)Google includes a hidden “Easter Egg” with each new Android version. Android 11 has one of the more elaborate Easter Eggs as it’s actually a game you can play. We’ll show you how to find it and play. Goog…

AQS源码阅读笔记(一)

AQS源码阅读笔记 先看下这个类张非常重要的一个静态内部类Node。如下&#xff1a; static final class Node {//表示当前节点以共享模式等待锁static final Node SHARED new Node();//表示当前模式以独占模式等待锁static final Node EXCLUSIVE null;//表示当前线程等待锁的动…

python之实现从ftp下载文件到本地

#!/usr/bin/python # codingutf-8 import os from ftplib import FTP # 引入ftp模块class MyFtp:ftp FTP()def __init__(self,host,port21):self.ftp.connect(host,port)def login(self,username,pwd):self.ftp.set_debuglevel(2) # 打开调试级别2&#xff0c;显示详细信息s…

如何在Instagram上过滤冒犯性评论

Shubham AgarwalShubham AgarwalIf you have a public Instagram profile, chances are you’ve been a victim of inappropriate comments from strangers. Given the social network’s vast size, it’s practically impossible to escape such bad actors. Thankfully, Ins…

复杂性思维中文第二版 附录 A、算法分析

附录 A、算法分析 原文&#xff1a;Appendix A Analysis of algorithms 译者&#xff1a;飞龙 协议&#xff1a;CC BY-NC-SA 4.0 自豪地采用谷歌翻译 部分参考了《Think Python 2e 中译本 第二十一章&#xff1a;算法分析》 算法分析 (Analysis of algorithms) 是计算机科学的一…

如何在Windows 8.1中获取Windows 10样式的开始菜单

On January 21, Microsoft officially announced the new features that would be included in Windows 10. While you’ll have to wait for the release to enjoy most of the new features, you can take advantage of the new Windows 10 Start menu today. 1月21日&#x…

Android工程中javax annotation Nullable找不到的替代方案

我们在某些Android开源库中会遇到下面的引用找不到的问题&#xff1a;import javax.annotation.Nonnull;import javax.annotation.Nullable; 其实Android实现了javax的类似注解&#xff0c;可以使用下面的引用替换&#xff1a;import android.support.annotation.NonNull;impor…

HDU1561:The more, The Better——题解

http://acm.hdu.edu.cn/showproblem.php?pid1561 ACboy很喜欢玩一种战略游戏&#xff0c;在一个地图上&#xff0c;有N座城堡&#xff0c;每座城堡都有一定的宝物&#xff0c;在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因&#xff0c;有些城堡不能直…

ubuntu列出所有磁盘_列出Ubuntu上的磁盘空间使用情况

ubuntu列出所有磁盘Simply open a new Terminal window and type in this command 只需打开一个新的终端窗口并输入此命令 df -Th f翻译自: https://www.howtogeek.com/howto/ubuntu/list-disk-space-usage-on-ubuntu/ubuntu列出所有磁盘

python基础之字符编码

阅读目录 一 了解字符编码的知识储备二 字符编码介绍三 字符编码应用之文件编辑器3.1 文本编辑器之nodpad3.2 文本编辑器之pycharm3.3 文本编辑器之python解释器3.4 总结四 字符编码应用之python4.1 执行python程序的三个阶段4.2 python2与python3字符串类型的区别一 了解字符编…

C# WinForm开发系列 - DataGridView

1.DataGridView实现课程表 testcontrol.rar 2.DataGridView二维表头及单元格合并 DataGridView单元格合并和二维表头.rar myMultiColHeaderDgv.rar 3.DataGridView单元格显示GIF图片 gifanimationindatagrid.rar 4.自定义显示DataGridView列(行头显示行号与图标,同一单元格显示…

ruby语法_Ruby函数(方法)语法

ruby语法The Ruby language makes it easy to create functions. Ruby语言使创建函数变得容易。 Function Syntax 功能语法 def functionname(variable) return <value>end def functionname(variable)return <值>结束Examples 例子 Your function can compute …

011-git-将tag推送到远端

1、将tag推送到远端 在使用TortoiseGit过程中&#xff0c;push推送过程中&#xff0c;选择include tag&#xff0c;远端就有次分支。

pageadmin CMS网站建设教程:站点添加自定义字段

首先看看pagedmin默认的站点设置都有什么&#xff0c;如下图&#xff1a; 这里只有一些最基本的参数设置&#xff0c;用过3.0版本或用过其他公司开发的cms的用户应该有这种体验&#xff0c;在站点设置中可以设置logo图片&#xff0c;备案号&#xff0c;底部内容等等。 那么为什…

如何将世界时钟和时区小部件添加到您的iPhone

When you work remotely or have friends and family who live in another country, it’s important to know what time it is across time zones. A world clock (or time zone) widget on your iPhone’s Home screen makes this much easier. 当您远程工作或有家人和朋友居…

Python网络爬虫之三种数据解析方式

引入 回顾requests实现数据爬取的流程 指定url基于requests模块发起请求获取响应对象中的数据进行持久化存储其实&#xff0c;在上述流程中还需要较为重要的一步&#xff0c;就是在持久化存储之前需要进行指定数据解析。因为大多数情况下的需求&#xff0c;我们都会指定去使用聚…