diff --git a/published/20171216 Sysadmin 101- Troubleshooting.md b/published/20171216 Sysadmin 101- Troubleshooting.md new file mode 100644 index 0000000000..0beb6eeb67 --- /dev/null +++ b/published/20171216 Sysadmin 101- Troubleshooting.md @@ -0,0 +1,138 @@ +系统管理员入门:排除故障 +====== + +![](https://img.linux.net.cn/data/attachment/album/201908/06/100659pox8xkkr8zek888r.jpg) + +我通常会严格保持此博客的技术性,将观察、意见等内容保持在最低限度。但是,这篇和接下来的几篇文章将介绍刚进入系统管理/SRE/系统工程师/sysops/devops-ops(无论你想称自己是什么)角色的常见的基础知识。 + +请跟我来! + +> “我的网站很慢!” + +我只是随机选择了本文的问题类型,这也可以应用于任何与系统管理员相关的故障排除。我并不是要炫耀那些可以发现最多的信息的最聪明的“金句”。它也不是一个详尽的、一步步指导的、并在最后一个方框中导向“利润”一词的“流程图”。 + +我会通过一些例子展示常规的方法。 + +示例场景仅用于说明本文目的。它们有时会做一些不适用于所有情况的假设,而且肯定会有很多读者在某些时候说“哦,但我觉得你会发现……”。 + +但那可能会让我们错失重点。 + +十多年来,我一直在从事于支持工作,或在支持机构工作,有一件事让我一次又一次地感到震惊,这促使我写下了这篇文章。 + +**有许多技术人员在遇到问题时的本能反应,就是不管三七二十一去尝试可能的解决方案。** + +*“我的网站很慢,所以”,* + +* 我将尝试增大 `MaxClients`/`MaxRequestWorkers`/`worker_connections` +* 我将尝试提升 `innodb_buffer_pool_size`/`effective_cache_size` +* 我打算尝试启用 `mod_gzip`(遗憾的是,这是真实的故事) + +*“我曾经看过这个问题,它是因为某种原因造成的 —— 所以我估计还是这个原因,它应该能解决这个问题。”* + +这浪费了很多时间,并会让你在黑暗中盲目乱撞,胡乱鼓捣。 + +你的 InnoDB 的缓冲池也许达到 100% 的利用率,但这可能只是因为有人运行了一段时间的一次性大型报告导致的。如果没有排除这种情况,那你就是在浪费时间。 + +### 开始之前 + +在这里,我应该说明一下,虽然这些建议同样适用于许多角色,但我是从一般的支持系统管理员的角度来撰写的。在一个成熟的内部组织中,或与规模较大的、规范管理的或“企业级”客户合作时,你通常会对一切都进行检测、测量、绘制、整理(甚至不是文字),并发出警报。那么你的方法也往往会有所不同。让我们在这里先忽略这种情况。 + +如果你没有这种东西,那就随意了。 + +### 澄清问题 + +首先确定实际上是什么问题。“慢”可以是多种形式的。是收到第一个字节的时间吗?从糟糕的 Javascript 加载和每页加载要拉取 15 MB 的静态内容,这是一个完全不同类型的问题。是慢,还是比通常慢?这是两个非常不同的解决方案! + +在你着手做某事之前,确保你知道实际报告和遇到的问题。找到问题的根源通常很困难,但即便找不到也必须找到问题本身。 + +否则,这相当于系统管理员带着一把刀去参加枪战。 + +### 唾手可得 + +首次登录可疑服务器时,你可以查找一些常见的嫌疑对象。事实上,你应该这样做!每当我登录到服务器时,我都会发出一些命令来快速检查一些事情:我们是否发生了页交换(`free` / `vmstat`),磁盘是否繁忙(`top` / `iostat` / `iotop`),是否有丢包(`netstat` / `proc` / `net` / `dev`),是否处于连接数过多的状态(`netstat`),有什么东西占用了 CPU(`top`),谁在这个服务器上(`w` / `who`),syslog 和 `dmesg` 中是否有引人注目的消息? + +如果你从 RAID 控制器得到 2000 条抱怨直写式缓存没有生效的消息,那么继续进行是没有意义的。 + +这用不了半分钟。如果什么都没有引起你的注意 —— 那么继续。 + +### 重现问题 + +如果某处确实存在问题,并且找不到唾手可得的信息。 + +那么采取所有步骤来尝试重现问题。当你可以重现该问题时,你就可以观察它。**当你能观察到时,你就可以解决。**如果在第一步中尚未显现出或覆盖了问题所在,询问报告问题的人需要采取哪些确切步骤来重现问题。 + +对于由太阳耀斑或只能运行在 OS/2 上的客户端引起的问题,重现并不总是可行的。但你的第一个停靠港应该是至少尝试一下!在一开始,你所知道的是“某人认为他们的网站很慢”。对于那些人,他们可能还在用他们的 GPRS 手机,也可能正在安装 Windows 更新。你在这里挖掘得再深也是浪费时间。 + +尝试重现! + +### 检查日志 + +我对于有必要包括这一点感到很难过。但是我曾经看到有人在运行 `tail /var/log/...` 之后几分钟就不看了。大多数 *NIX 工具都特别喜欢记录日志。任何明显的错误都会在大多数应用程序日志中显得非常突出。检查一下。 + +### 缩小范围 + +如果没有明显的问题,但你可以重现所报告的问题,那也很棒。所以,你现在知道网站是慢的。现在你已经把范围缩小到:浏览器的渲染/错误、应用程序代码、DNS 基础设施、路由器、防火墙、网卡(所有的)、以太网电缆、负载均衡器、数据库、缓存层、会话存储、Web 服务器软件、应用程序服务器、内存、CPU、RAID 卡、磁盘等等。 + +根据设置添加一些其他可能的罪魁祸首。它们也可能是 SAN,也不要忘记硬件 WAF!以及…… 你明白我的意思。 + +如果问题是接收到第一个字节的时间,你当然会开始对 Web 服务器去应用上已知的修复程序,就是它响应缓慢,你也觉得几乎就是它,对吧?但是你错了! + +你要回去尝试重现这个问题。只是这一次,你要试图消除尽可能多的潜在问题来源。 + +你可以非常轻松地消除绝大多数可能的罪魁祸首:你能从服务器本地重现问题吗?恭喜,你刚刚节省了自己必须尝试修复 BGP 路由的时间。 + +如果不能,请尝试使用同一网络上的其他计算机。如果可以的话,至少你可以将防火墙移到你的嫌疑人名单上,(但是要注意一下那个交换机!) + +是所有的连接都很慢吗?虽然服务器是 Web 服务器,但并不意味着你不应该尝试使用其他类型的服务进行重现问题。[netcat][1] 在这些场景中非常有用(但是你的 SSH 连接可能会一直有延迟,这可以作为线索)! 如果这也很慢,你至少知道你很可能遇到了网络问题,可以忽略掉整个 Web 软件及其所有组件的问题。用这个知识(我不收 200 美元)再次从顶部开始,按你的方式由内到外地进行! + +即使你可以在本地复现 —— 仍然有很多“因素”留下。让我们排除一些变量。你能用普通文件重现它吗? 如果 `i_am_a_1kb_file.html` 很慢,你就知道它不是数据库、缓存层或 OS 以外的任何东西和 Web 服务器本身的问题。 + +你能用一个需要解释或执行的 `hello_world.(py|php|js|rb..)` 文件重现问题吗?如果可以的话,你已经大大缩小了范围,你可以专注于少数事情。如果 `hello_world` 可以马上工作,你仍然学到了很多东西!你知道了没有任何明显的资源限制、任何满的队列或在任何地方卡住的 IPC 调用,所以这是应用程序正在做的事情或它正在与之通信的事情。 + +所有页面都慢吗?或者只是从第三方加载“实时分数数据”的页面慢? + +**这可以归结为:你仍然可以重现这个问题所涉及的最少量的“因素”是什么?** + +我们的示例是一个缓慢的网站,但这同样适用于几乎所有问题。邮件投递?你能在本地投递吗?能发给自己吗?能发给<常见的服务提供者>吗?使用小的、纯文本的消息进行测试。尝试直到遇到 2MB 拥堵时。使用 STARTTLS 和不使用 STARTTLS 呢?按你的方式由内到外地进行! + +这些步骤中的每一步都只需要几秒钟,远远快于实施大多数“可能的”修复方案。 + +### 隔离观察 + +到目前为止,当你去除特定组件时无法重现问题时,你可能已经偶然发现了问题所在。 + +但如果你还没有,或者你仍然不知道**为什么**:一旦你找到了一种方法来重现问题,你和问题之间的“东西”(某个技术术语)最少,那么就该开始隔离和观察了。 + +请记住,许多服务可以在前台运行和/或启用调试。对于某些类别的问题,执行此操作通常非常有帮助。 + +这也是你的传统武器库发挥作用的地方。`strace`、`lsof`、`netstat`、`GDB`、`iotop`、`valgrind`、语言分析器(cProfile、xdebug、ruby-prof ……)那些类型的工具。 + +一旦你走到这一步,你就很少能摆脱剖析器或调试器了。 + +[strace][2] 通常是一个非常好的起点。 + +你可能会注意到应用程序停留在某个连接到端口 3306 的套接字文件描述符上的特定 `read()` 调用上。你会知道该怎么做。 + +转到 MySQL 并再次从顶部开始。显而易见:“等待某某锁”、死锁、`max_connections` ……进而:是所有查询?还是只写请求?只有某些表?还是只有某些存储引擎?等等…… + +你可能会注意到调用外部 API 资源的 `connect()` 需要五秒钟才能完成,甚至超时。你会知道该怎么做。 + +你可能会注意到,在同一对文件中有 1000 个调用 `fstat()` 和 `open()` 作为循环依赖的一部分。你会知道该怎么做。 + +它可能不是那些特别的东西,但我保证,你会发现一些东西。 + +如果你只是从这一部分学到一点,那也不错;学习使用 `strace` 吧!**真的**学习它,阅读整个手册页。甚至不要跳过历史部分。`man` 每个你还不知道它做了什么的系统调用。98% 的故障排除会话以 `strace` 而终结。 + +--------------------------------------------------------------------- + +via: http://northernmost.org/blog/troubleshooting-101/index.html + +作者:[Erik Ljungstrom][a] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://northernmost.org +[1]:http://nc110.sourceforge.net/ +[2]:https://linux.die.net/man/1/strace diff --git a/sources/talk/20190805 Is your enterprise software committing security malpractice.md b/sources/talk/20190805 Is your enterprise software committing security malpractice.md new file mode 100644 index 0000000000..7170e5a486 --- /dev/null +++ b/sources/talk/20190805 Is your enterprise software committing security malpractice.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is your enterprise software committing security malpractice?) +[#]: via: (https://www.networkworld.com/article/3429559/is-your-enterprise-software-committing-security-malpractice.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Is your enterprise software committing security malpractice? +====== +ExtraHop discovered enterprise security and analytic software are "phoning home" and quietly uploading information to servers outside of customers' networks. +![Getty Images][1] + +Back when this blog was dedicated to all things Microsoft I routinely railed against the spying aspects of Windows 10. Well, apparently that’s nothing compared to what enterprise security, analytics, and hardware management tools are doing. + +An analytics firm called ExtraHop examined the networks of its customers and found that their security and analytic software was quietly uploading information to servers outside of the customer's network. The company issued a [report and warning][2] last week. + +ExtraHop deliberately chose not to name names in its four examples of enterprise security tools that were sending out data without warning the customer or user. A spokesperson for the company told me via email, “ExtraHop wants the focus of the report to be the trend, which we have observed on multiple occasions and find alarming. Focusing on a specific group would detract from the broader point that this important issue requires more attention from enterprises.” + +**[ For more on IoT security, read [tips to securing IoT on your network][3] and [10 best practices to minimize IoT security vulnerabilities][4]. | Get regularly scheduled insights by [signing up for Network World newsletters][5]. ]** + +### Products committing security malpractice and secretly transmitting data offsite + +[ExtraHop's report][6] found a pretty broad range of products secretly phoning home, including endpoint security software, device management software for a hospital, surveillance cameras, and security analytics software used by a financial institution. It also noted the applications may run afoul of Europe’s [General Data Privacy Regulation (GDPR)][7]. + +In every case, ExtraHop provided evidence that the software was transmitting data offsite. In one case, a company noticed that approximately every 30 minutes, a network-connected device was sending UDP traffic out to a known bad IP address. The device in question was a Chinese-made security camera that was phoning home to a known ​malicious IP address​ with ties to China. + +And the camera was likely set up independently by an employee at their office for personal security purposes, showing the downside to shadow IT. + +In the cases of the hospital's device management tool and the financial firm's analytics tool, those were violations of data security laws and could expose the company to legal risks even though it was happening without their knowledge. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][8] ]** + +The hospital’s medical device management product was supposed to use the hospital’s Wi-Fi network to only ensure patient data privacy and HIPAA compliance. ExtraHop noticed traffic from the workstation that was managing initial device rollout was opening encrypted SSL:443 connections to vendor-owned cloud storage, a major HIPAA violation. + +ExtraHop notes that while there may not be any malicious activity in these examples, it is still in violation of the law, and administrators need to keep an eye on their networks to monitor traffic for unusual activity. + +"To be clear, we don’t know why these vendors are phoning home data. The companies are all respected security and IT vendors, and in all likelihood, their phoning home of data was either for a legitimate purpose given their architecture design or the result of a misconfiguration," the report says. + +### How to mitigate phoning-home security risks + +To address this security malpractice problem, ExtraHop suggests companies do these five things: + + * Monitor for vendor activity: Watch for unexpected vendor activity on your network, whether they are an active vendor, a former vendor or even a vendor post-evaluation. + * Monitor egress traffic: Be aware of egress traffic, especially from sensitive assets such as domain controllers. When egress traffic is detected, always match it to approved applications and services. + * Track deployment: While under evaluation, track deployments of software agents. + * Understand regulatory considerations: Be informed about the regulatory and compliance considerations of data crossing political and geographic boundaries. + * Understand contract agreements: Track whether data is used in compliance with vendor contract agreements. + + + +**[ Now read this: [Network World's corporate guide to addressing IoT security][9] ]** + +Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3429559/is-your-enterprise-software-committing-security-malpractice.html + +作者:[Andy Patrizio][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Andy-Patrizio/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/03/cybersecurity_eye-with-binary_face-recognition_abstract-eye-100751589-large.jpg +[2]: https://www.extrahop.com/company/press-releases/2019/extrahop-issues-warning-about-phoning-home/ +[3]: https://www.networkworld.com/article/3254185/internet-of-things/tips-for-securing-iot-on-your-network.html#nww-fsb +[4]: https://www.networkworld.com/article/3269184/10-best-practices-to-minimize-iot-security-vulnerabilities#nww-fsb +[5]: https://www.networkworld.com/newsletters/signup.html#nww-fsb +[6]: https://www.extrahop.com/resources/whitepapers/eh-security-advisory-calling-home-success/ +[7]: https://www.csoonline.com/article/3202771/general-data-protection-regulation-gdpr-requirements-deadlines-and-facts.html +[8]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[9]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html +[10]: https://www.facebook.com/NetworkWorld/ +[11]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md b/sources/tech/20171216 Sysadmin 101- Troubleshooting.md deleted file mode 100644 index a08081e3fd..0000000000 --- a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md +++ /dev/null @@ -1,123 +0,0 @@ -Sysadmin 101: Troubleshooting -====== -I typically keep this blog strictly technical, keeping observations, opinions and the like to a minimum. But this, and the next few posts will be about basics and fundamentals for starting out in system administration/SRE/system engineer/sysops/devops-ops (whatever you want to call yourself) roles more generally. -Bear with me! - -"My web site is slow" - -I just picked the type of issue for this article at random, this can be applied to pretty much any sysadmin related troubleshooting. It's not about showing off the cleverest oneliners to find the most information. It's also not an exhaustive, step-by-step "flowchart" with the word "profit" in the last box. It's about general approach, by means of a few examples. -The example scenarios are solely for illustrative purposes. They sometimes have a basis in assumptions that doesn't apply to all cases all of the time, and I'm positive many readers will go "oh, but I think you will find…" at some point. -But that would be missing the point. - -Having worked in support, or within a support organization for over a decade, there is one thing that strikes me time and time again and that made me write this; -**The instinctive reaction many techs have when facing a problem, is to start throwing potential solutions at it.** - -"My website is slow" - - * I'm going to try upping `MaxClients/MaxRequestWorkers/worker_connections` - * I'm going to try to increase `innodb_buffer_pool_size/effective_cache_size` - * I'm going to try to enable `mod_gzip` (true story, sadly) - - - -"I saw this issue once, and then it was because X. So I'm going to try to fix X again, it might work". - -This wastes a lot of time, and leads you down a wild goose chase. In the dark. Wearing greased mittens. -InnoDB's buffer pool may well be at 100% utilization, but that's just because there are remnants of a large one-off report someone ran a while back in there. If there are no evictions, you've just wasted time. - -### Quick side-bar before we start - -At this point, I should mention that while it's equally applicable to many roles, I'm writing this from a general support system adminstrator's point of view. In a mature, in-house organization or when working with larger, fully managed or "enterprise" customers, you'll typically have everything instrumented, measured, graphed, thresheld (not even word) and alerted on. Then your approach will often be rather different. We're going in blind here. - -If you don't have that sort of thing at your disposal; - -### Clarify and First look - -Establish what the issue actually is. "Slow" can take many forms. Is it time to first byte? That's a whole different class of problem from poor Javascript loading and pulling down 15 MB of static assets on each page load. Is it slow, or just slower than it usually is? Two very different plans of attack! - -Make sure you know what the issue reported/experienced actually is before you go off and do something. Finding the source of the problem is often difficult enough, without also having to find the problem itself. -That is the sysadmin equivalent of bringing a knife to a gunfight. - -### Low hanging fruit / gimmies - -You are allowed to look for a few usual suspects when you first log in to a suspect server. In fact, you should! I tend to fire off a smattering of commands whenever I log in to a server to just very quickly check a few things; Are we swapping (`free/vmstat`), are the disks busy (`top/iostat/iotop`), are we dropping packets (`netstat/proc/net/dev`), is there an undue amount of connections in an undue state (`netstat`), is something hogging the CPUs (`top`), is someone else on this server (`w/who`), any eye-catching messages in syslog and `dmesg`? - -There's little point to carrying on if you have 2000 messages from your RAID controller about how unhappy it is with its write-through cache. - -This doesn't have to take more than half a minute. If nothing catches your eye - continue. - -### Reproduce - -If there indeed is a problem somewhere, and there's no low hanging fruit to be found; - -Take all steps you can to try and reproduce the problem. When you can reproduce, you can observe. **When you can observe, you can solve.** Ask the person reporting the issue what exact steps to take to reproduce the issue if it isn 't already obvious or covered by the first section. - -Now, for issues caused by solar flares and clients running exclusively on OS/2, it's not always feasible to reproduce. But your first port of call should be to at least try! In the very beginning, all you know is "X thinks their website is slow". For all you know at that point, they could be tethered to their GPRS mobile phone and applying Windows updates. Delving any deeper than we already have at that point is, again, a waste of time. - -Attempt to reproduce! - -### Check the log! - -It saddens me that I felt the need to include this. But I've seen escalations that ended mere minutes after someone ran `tail /var/log/..` Most *NIX tools these days are pretty good at logging. Anything blatantly wrong will manifest itself quite prominently in most application logs. Check it. - -### Narrow down - -If there are no obvious issues, but you can reproduce the reported problem, great. So, you know the website is slow. Now you've narrowed things down to: Browser rendering/bug, application code, DNS infrastructure, router, firewall, NICs (all eight+ involved), ethernet cables, load balancer, database, caching layer, session storage, web server software, application server, RAM, CPU, RAID card, disks. -Add a smattering of other potential culprits depending on the set-up. It could be the SAN, too. And don't forget about the hardware WAF! And.. you get my point. - -If the issue is time-to-first-byte you'll of course start applying known fixes to the webserver, that's the one responding slowly and what you know the most about, right? Wrong! -You go back to trying to reproduce the issue. Only this time, you try to eliminate as many potential sources of issues as possible. - -You can eliminate the vast majority of potential culprits very easily: Can you reproduce the issue locally from the server(s)? Congratulations, you've just saved yourself having to try your fixes for BGP routing. -If you can't, try from another machine on the same network. If you can - at least you can move the firewall down your list of suspects, (but do keep a suspicious eye on that switch!) - -Are all connections slow? Just because the server is a web server, doesn't mean you shouldn't try to reproduce with another type of service. [netcat][1] is very useful in these scenarios (but chances are your SSH connection would have been lagging this whole time, as a clue)! If that's also slow, you at least know you've most likely got a networking problem and can disregard the entire web stack and all its components. Start from the top again with this knowledge (do not collect $200). Work your way from the inside-out! - -Even if you can reproduce locally - there's still a whole lot of "stuff" left. Let's remove a few more variables. Can you reproduce it with a flat-file? If `i_am_a_1kb_file.html` is slow, you know it's not your DB, caching layer or anything beyond the OS and the webserver itself. -Can you reproduce with an interpreted/executed `hello_world.(py|php|js|rb..)` file? If you can, you've narrowed things down considerably, and you can focus on just a handful of things. If `hello_world` is served instantly, you've still learned a lot! You know there aren't any blatant resource constraints, any full queues or stuck IPC calls anywhere. So it's something the application is doing or something it's communicating with. - -Are all pages slow? Or just the ones loading the "Live scores feed" from a third party? - -**What this boils down to is; What 's the smallest amount of "stuff" that you can involve, and still reproduce the issue?** - -Our example is a slow web site, but this is equally applicable to almost any issue. Mail delivery? Can you deliver locally? To yourself? To ? Test with small, plaintext messages. Work your way up to the 2MB campaign blast. STARTTLS and no STARTTLS. Work your way from the inside-out. - -Each one of these steps takes mere seconds each, far quicker than implementing most "potential" fixes. - -### Observe / isolate - -By now, you may already have stumbled across the problem by virtue of being unable to reproduce when you removed a particular component. - -But if you haven't, or you still don't know **why** ; Once you've found a way to reproduce the issue with the smallest amount of "stuff" (technical term) between you and the issue, it's time to start isolating and observing. - -Bear in mind that many services can be ran in the foreground, and/or have debugging enabled. For certain classes of issues, it is often hugely helpful to do this. - -Here's also where your traditional armory comes into play. `strace`, `lsof`, `netstat`, `GDB`, `iotop`, `valgrind`, language profilers (cProfile, xdebug, ruby-prof…). Those types of tools. - -Once you've come this far, you rarely end up having to break out profilers or debugers though. - -[`strace`][2] is often a very good place to start. -You might notice that the application is stuck on a particular `read()` call on a socket file descriptor connected to port 3306 somewhere. You'll know what to do. -Move on to MySQL and start from the top again. Low hanging fruit: "Waiting_for comic core.md Dict.md lctt2014.md lctt2016.md LCTT翻译规范.md LICENSE Makefile published README.md sign.md sources translated 选题模板.txt 中文排版指北.md lock", deadlocks, max_connections.. Move on to: All queries? Only writes? Only certain tables? Only certain storage engines?… - -You might notice that there's a `connect()` to an external API resource that takes five seconds to complete, or even times out. You'll know what to do. - -You might notice that there are 1000 calls to `fstat()` and `open()` on the same couple of files as part of a circular dependency somewhere. You'll know what to do. - -It might not be any of those particular things, but I promise you, you'll notice something. - -If you're only going to take one thing from this section, let it be; learn to use `strace`! **Really** learn it, read the whole man page. Don 't even skip the HISTORY section. `man` each syscall you don't already know what it does. 98% of troubleshooting sessions ends with strace. - --------------------------------------------------------------------------------- - -via: http://northernmost.org/blog/troubleshooting-101/index.html - -作者:[Erik Ljungstrom][a] -译者:[lujun9972](https://github.com/lujun9972) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://northernmost.org -[1]:http://nc110.sourceforge.net/ -[2]:https://linux.die.net/man/1/strace diff --git a/sources/tech/20190801 5 Free Partition Managers for Linux.md b/sources/tech/20190801 5 Free Partition Managers for Linux.md deleted file mode 100644 index 134e41a819..0000000000 --- a/sources/tech/20190801 5 Free Partition Managers for Linux.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 Free Partition Managers for Linux) -[#]: via: (https://itsfoss.com/partition-managers-linux/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -5 Free Partition Managers for Linux -====== - -_**Here’s our recommended list of partitioning tools for Linux distributions. These tools let you delete, add, tweak or resize the disk partitioning on your Linux system.**_ - -Usually, you decide the disk partitions while installing the OS. But, what if you need to modify the partitions sometime after the installation. You just can’t go back to the setup screen in any way. So, that is where partition managers (or accurately disk partition managers) come in handy. - -In most of the cases, you do not need to separately install the partition manager because it comes pre-installed. Also, it is worth noting that you can either opt for a command-line based partition manager or something with a GUI. - -Attention! - -Playing with disk partitioning is a risky task. Don’t do it unless it’s absolutely necessary. -If you are using a command line based partitioning tool, you need to learn the commands to get the job done. Or else, you might just end up wiping the entire disk. - -### 5 Tools To Manage Disk Partitions in Linux - -![][1] - -The list below is in no particular order of ranking. Most of these partitioning tools should be available in your Linux distribution’s repository. - -#### GParted - -![GParted][2] - -This could perhaps be the most popular GUI-based partition manager available for Linux distributions. You might have it pre-installed in some distributions. If you don’t, simply search for it in the software center to get it installed. - -It directly prompts you to authenticate as the root user when you launch it. So, you don’t have to utilize the terminal here – at all. After authentication, it analyzes the devices and then lets you tweak the disk partitions. You will also find an option to “Attempt Data Rescue” in case of data loss or accidental deletion of files. - -[GParted][3] - -#### GNOME Disks - -![Gnome Disks][4] - -A GUI-based partition manager that comes baked in with Ubuntu or any Ubuntu-based distros like Zorin OS. - -[][5] - -Suggested read  7 Best Linux Tools For Digital Artists - -It lets you delete, add, resize and tweak the partition. It even helps you in [formatting the USB in Ubuntu][6] if there is any problem. - -You can even attempt to repair a partition with the help of this tool. The options also include editing filesystem, creating a partition image, restoring the image, and benchmarking the partition. - -[GNOME Disks][7] - -#### KDE Partition Manager - -![Kde Partition Manager][8] - -KDE Partition Manager should probably come pre-installed on KDE-based Linux distros. But, if it isn’t there – you can search for it on the software center to easily get it installed. - -If you didn’t have it pre-installed, you might get the notice that you do not have administrative privileges when you try launching it. Without admin privileges, you cannot do anything. So, in that case, type in the following command to get started: - -``` -sudo partitionmanager -``` - -It will scan your devices and then you will be able to create, move, copy, delete, and resize partitions. You can also import/export partition tables along with a lot of other options available to tweak. - -[KDE Partition Manager][9] - -#### Fdisk [Command Line] - -![Fdisk][10] - -[Fdisk][11] is a command line utility that comes baked in with every unix-like OS. Fret not, even though it requires you to launch a terminal and enter commands – it isn’t very difficult. However, if you are too confused while using a text-based utility, you should stick to the GUI applications mentioned above. They all do the same thing. - -To launch fdisk, you will have to be the root user and specify the device to manage partitions. Here’s an example for the command to start with: - -``` -sudo fdisk /dev/sdc -``` - -You can refer to [The Linux Documentation Project’s wiki page][12] for the list of commands and more details on how it works. - -#### GNU Parted [Command Line] - -![Gnu Parted][13] - -Yet another command-line utility that you can find pre-installed on your Linux distro. You just need to enter the following command to get started: - -``` -sudo parted -``` - -**Wrapping Up** - -[][14] - -Suggested read  Best Games On Steam You Can Play On Linux and Windows - -I wouldn’t forget to mention [QtParted][15] as one of the alternatives to the list of partition managers. However, it has not been maintained for years now – so I do not recommend using it. - -What do you think about the partition managers mentioned here? Did I miss any of your favorites? Let me know and I’ll update this list of partition manager for Linux with your suggestion. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/partition-managers-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/disk-partitioning-tools-linux.jpg?resize=800%2C450&ssl=1 -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/g-parted.png?ssl=1 -[3]: https://gparted.org/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnome-disks.png?ssl=1 -[5]: https://itsfoss.com/best-linux-graphic-design-software/ -[6]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/ -[7]: https://wiki.gnome.org/Apps/Disks -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/kde-partition-manager.jpg?resize=800%2C404&ssl=1 -[9]: https://kde.org/applications/system/org.kde.partitionmanager -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/fdisk.jpg?fit=800%2C496&ssl=1 -[11]: https://en.wikipedia.org/wiki/Fdisk -[12]: https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnu-parted.png?fit=800%2C559&ssl=1 -[14]: https://itsfoss.com/best-linux-games-steam/ -[15]: http://qtparted.sourceforge.net/ diff --git a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md new file mode 100644 index 0000000000..c7a54360b4 --- /dev/null +++ b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 cool new projects to try in COPR for August 2019) +[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/) +[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/) + +4 cool new projects to try in COPR for August 2019 +====== + +![][1] + +COPR is a [collection][2] of personal repositories for software that isn’t carried in Fedora. Some software doesn’t conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isn’t supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software. + +Here’s a set of new and interesting projects in COPR. + +### Duc + +[Duc][3] is a collection of tools for disk usage inspection and visualization. Duc uses an indexed database to store sizes of files on your system. Once the indexing is done, you can then quickly overview your disk usage either by its command-line interface or the GUI. + +![][4] + +#### Installation instructions + +The [repo][5] currently provides duc for EPEL 7, Fedora 29 and 30. To install duc, use these commands: + +``` +sudo dnf copr enable terrywang/duc +sudo dnf install duc +``` + +### MuseScore + +[MuseScore][6] is a software for working with music notation. With MuseScore, you can create sheet music either by using a mouse, virtual keyboard or a MIDI controller. MuseScore can then play the created music or export it as a PDF, MIDI or MusicXML. Additionally, there’s an extensive database of sheet music created by Musescore users. + +![][7] + +#### Installation instructions + +The [repo][8] currently provides MuseScore for Fedora 29 and 30. To install MuseScore, use these commands: + +``` +sudo dnf copr enable jjames/MuseScore +sudo dnf install musescore +``` + +### Dynamic Wallpaper Editor + +[Dynamic Wallpaper Editor][9] is a tool for creating and editing a collection of wallpapers in GNOME that change in time. This can be done using XML files, however, Dynamic Wallpaper Editor makes this easy with its graphical interface, where you can simply add pictures, arrange them and set the duration of each picture and transitions between them. + +![][10] + +#### Installation instructions + +The [repo][11] currently provides dynamic-wallpaper-editor for Fedora 30 and Rawhide. To install dynamic-wallpaper-editor, use these commands: + +``` +sudo dnf copr enable atim/dynamic-wallpaper-editor +sudo dnf install dynamic-wallpaper-editor +``` + +### Manuskript + +[Manuskript][12] is a tool for writers and is aimed to make creating large writing projects easier. It serves as an editor for writing the text itself, as well as a tool for organizing notes about the story itself, characters of the story and individual plots. + +![][13] + +#### Installation instructions + +The [repo][14] currently provides Manuskript for Fedora 29, 30 and Rawhide. To install Manuskript, use these commands: + +``` +sudo dnf copr enable notsag/manuskript +sudo dnf install manuskript +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/ + +作者:[Dominik Turecek][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/dturecek/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://duc.zevv.nl/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/duc.png +[5]: https://copr.fedorainfracloud.org/coprs/terrywang/duc/ +[6]: https://musescore.org/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/musescore-1024x512.png +[8]: https://copr.fedorainfracloud.org/coprs/jjames/MuseScore/ +[9]: https://github.com/maoschanz/dynamic-wallpaper-editor +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/dynamic-walppaper-editor.png +[11]: https://copr.fedorainfracloud.org/coprs/atim/dynamic-wallpaper-editor/ +[12]: https://www.theologeek.ch/manuskript/ +[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/manuskript-1024x600.png +[14]: https://copr.fedorainfracloud.org/coprs/notsag/manuskript/ diff --git a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md index 797b147aef..abaea75707 100644 --- a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md +++ b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md b/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md new file mode 100644 index 0000000000..f532ad8571 --- /dev/null +++ b/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Navigating the filesystem with relative paths at the command line) +[#]: via: (https://opensource.com/article/19/8/navigating-filesystem-relative-paths) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/greg-p) + +Navigating the filesystem with relative paths at the command line +====== +Learn the difference between absolute and relative paths and how to use +them, and save yourself a lot of time and potential trouble. +![Blue folders flying in the clouds above a city skyline][1] + +If you’re on your way to work, but you stop by a deli for breakfast first, you don’t go back home after breakfast so you can restart your journey. Instead, you continue from where you are because you understand where your office is located relative to your current location. Navigating your computer is the same way. If you change your working directory in a terminal to a subdirectory, such as **Pictures**, you don’t necessarily have to go home again just to make your way into **Documents**. Instead, you use a _relative_ path. + +Conversely, absolute paths always begin from the start of your hard drive. You know that you’ve reached the start by a lone forward slash (**/**) with nothing to its left, because your drive’s root level is the biggest container, holding all your folders and files within it. For that reason, the path **/home/seth** (and its shorthand version **~**, although that’s less clear, because it lacks the leftmost slash) is considered an absolute path. It represents your hard drive’s base level, which contains the **home** directory, which in turn contains **seth** (my username). + +Anything starting with a forward slash is an absolute path, which is the digital equivalent of you going 12 blocks back home just to reach a location that’s two blocks away from where you are now. That fact doesn’t mean absolute paths are bad, though. There are many valid reasons to use absolute paths, not the least of which is their clarity. If you can navigate your drive from absolute paths, then use that as a wayfinder. With auto-completion, typing a full path can be as quick as using a relative path, [especially with autocompletion][2]. + +That said, relative paths can be convenient, and in some cases vital. For instance, you can never be sure of a web server’s absolute path. If a web designer knows they keep [web fonts in a local directory][3] and they link to those fonts on their development laptop using the absolute path **/home/webdev/Public/[www.example.com/fonts][4]**, then all of their links break when the code is pushed to **/var/www/example.com/fonts** on the server. + +Besides that, sometimes it really is quicker and easier to type **cd ../Documents** instead of **cd /home/seth/Documents**. + +Relative paths use two control sequences: the single (**.**) and the double (**..**) dot. A single dot means _don’t move_. The double dot means _take one step back_. These dots work best when you’re somewhat familiar with what’s on your drive, and provided that you can visualize the corresponding paths. + +It may help to visualize each directory as a room in a house. For instance, knowing that you have a home directory that contains both a **Pictures** and a **Documents** folder, you can visualize each subdirectory as a step forward from home: + +![Stepping into a directory.][5] + +To get from one room to the other, you must go back to the common area using the _step back_ control sequence, and then step forward into the other. You can get your current location at any time with the **pwd** (print working directory) command: + + +``` +$ pwd +/home/seth/Pictures +$ cd ../Documents +$ pwd +/home/seth/Documents +``` + +Remember that a single dot means _don’t move_, and it does exactly that: + + +``` +$ pwd +/home/seth +$ cd . +$ pwd +/home/seth +``` + +It might seem odd to have a special command representing a state of no change, but it’s a usefully explicit directive. For instance, were you to create a custom application to [list a directory’s contents][6] and save it in your home directory, foolishly naming the application **reboot**, then any time you used that custom application you would want to be careful that your computer knew _exactly_ which **reboot** command to execute. + +One way you can specify which version is to provide an explicit path to your custom and poorly named application. The single dot reinforces your desire not to stray from your intended path when you’re already in the directory: + + +``` +$ pwd +/home/seth +$ ./reboot +Documents/     Downloads/ +Music/         Pictures/ +Public/        Spheniscidae/ +Videos/        Yugolothae/ +``` + +Sometimes the single dot can be useful as a filler character in paths that you expect to contain a number of levels. For instance, take a web developer who used several links to a **font** directory that was once three steps back. Recently, though, this developer moved the **font** directory into the same directory as their HTML. If the developer doesn’t replace all instances of **../../../fonts** with **./././fonts**, their site will break. + +**Note:** In the case of this example, changing **../../../fonts** to **./fonts** would work, but assume for the sake of this example that doing so would break a script that expects to see three levels before the **fonts** directory. + +Relative paths can be confusing at first, so stick to absolute paths when navigating your computer until you’re comfortable with the concept of relativity. Many people find them useful, while others do not use them. It’s all relative. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/navigating-filesystem-relative-paths + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sethhttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline) +[2]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them#autocomplete +[3]: https://opensource.com/article/19/3/webfonts +[4]: http://www.example.com/fonts +[5]: https://opensource.com/sites/default/files/uploads/path-layout.jpg (Stepping into a directory.) +[6]: https://opensource.com/article/19/7/master-ls-command diff --git a/sources/tech/20190805 What-s your favorite open source BI software.md b/sources/tech/20190805 What-s your favorite open source BI software.md new file mode 100644 index 0000000000..b7ea3e1046 --- /dev/null +++ b/sources/tech/20190805 What-s your favorite open source BI software.md @@ -0,0 +1,56 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What's your favorite open source BI software?) +[#]: via: (https://opensource.com/article/19/8/favorite-open-source-bi-software) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeohttps://opensource.com/users/seth) + +What's your favorite open source BI software? +====== +What business intelligence applications are you using to gather and +share insights from your data? Please let us know in our poll. +![Open for business][1] + +Open source software has come a long way since the [Open Source Initiative][2] was founded in February 1998. Back then, the thought of releasing source code anyone could change scared many commercial software vendors. Now, according to Red Hat's 2019 [State of Enterprise Open Source survey][3], 99% of IT leaders say open source software plays at least a "somewhat important" role in their enterprise IT strategy. + +Open source principles play an equally key role in business intelligence (BI). [Gartner's Magic Quadrant for Data Science and Machine Learning][4] said the market is in the midst of a "big bang" that's redefining the "who" and "how" of data science and ML. In this report (available for clients), the authors cite open source software as one reason for the growth of [citizen data scientists][5]—"'power users' who can perform both simple and moderately sophisticated analytical tasks that would previously have required more expertise." + +### What is open source BI software? + +Open source business intelligence (BI) software helps users upload, visualize, and make decisions based on data that is pulled from several sources. Like all open source software, its source code is public. That's because the copyright holder allows anyone to review, revise, and run the software at any time, for any reason. These benefits extend to users and non-users alike. + +BI involves [turning data into insights][6] that help your business make better decisions. This type of software allows users to pull data from a range of sources, then share it with colleagues and clients. + +[Dashboards and reports][7] are two standard features you should look for. Advanced BI tools like [Kibana][8] also offer data visualizations, while others (like [Sisense][9]) pride themselves on the ability to be set up in-house. + +One big benefit of open source software is having so many developers fixing code at once. Likewise, open source BI software democratizes data. With countless people working on—and within—the same tool, open source BI software gives teams the power to share data with more colleagues from one centralized resource. + +The quality of the data used to make decisions is a top concern for small business leaders GetApp [surveyed][10] in Spring 2019. So, before choosing which open source BI tool to adopt, it's worth weighing the pros and cons of each tool against your business needs. + +_Which open source BI software does your team use? What's your main goal for using it? (Boost collaboration, visualize data, use a wider range of data, etc.?) Which challenges (if any) have you encountered bringing BI software into your business? Keep this conversation going in the comments!_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/favorite-open-source-bi-software + +作者:[Lauren Maffeo][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lmaffeohttps://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_openseries.png?itok=rCtTDz5G (Open for business) +[2]: https://opensource.org/ +[3]: https://www.redhat.com/en/enterprise-open-source-report/2019 +[4]: https://www.gartner.com/en/documents/3899464/magic-quadrant-for-data-science-and-machine-learning-pla +[5]: https://blogs.gartner.com/carlie-idoine/2018/05/13/citizen-data-scientists-and-why-they-matter/ +[6]: https://www.getapp.com/business-intelligence-analytics-software/business-intelligence/#guide +[7]: https://www.getapp.com/business-intelligence-analytics-software/business-intelligence/#features-to-watch-for +[8]: https://www.elastic.co/products/kibana +[9]: https://www.getapp.com/business-intelligence-analytics-software/a/sisense-prism/ +[10]: https://lab.getapp.com/data-driven-decision-making/ diff --git a/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md b/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md new file mode 100644 index 0000000000..fda3063c02 --- /dev/null +++ b/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md @@ -0,0 +1,545 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash Script to Automatically Start a Services When it Goes Down on Linux) +[#]: via: (https://www.2daygeek.com/linux-bash-script-auto-restart-services-when-down/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Bash Script to Automatically Start a Services When it Goes Down on Linux +====== + +There are many open source monitoring tools are currently available in market to monitor Linux systems performance. + +Those are send an email alert when the system reaches the specified threshold limit for CPU, Memory, and Disk space or any service is down. + +But, it doesn’t have an intelligence to auto start the services, if it crash/goes down. + +There are various reasons for the process to crash, which you can investigate and fix the issue but it may take a while. + +If you don’t want to make your service down for a while and if you would like to bring them up immediately whenever it goes down? + +If so, what to do in this situation? How to mitigate this? + +We can write our own bash script to start a service whenever it goes down. Writing a shell script is not a big deal and you have to understand few things to achieve this. + +Once you familiar on this, you can write your own shell script to automate the day to day activities, which will save lots of time. + +We had added many useful shell scripts in the past. If you want to check those, navigate to the below link. + + * **[How to automate day to day activities using shell scripts?][1]** + + + +I have added totally six shell scripts for this usage and you can choose which one is suitable for you. + +I had applied different commands and methodology in each shell script. + +**`Note:`**` ` You need to change the email id instead of ours. + +### 1) How to Automatically Start a Service When it Goes Down on SysVinit Linux System? + +Use the following bash script, if you would like to start a single service in SysVinit Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor.sh + +#!/bin/bash + +serv=httpd + +sstat=stopped + +service $serv status | grep -i 'running\|stopped' | awk '{print $3}' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + service $serv start + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +``` + +Set an executable permission to **`service-monitor.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-1.sh + +#!/bin/bash + +serv=httpd + +sstat=$(pidof $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running fine!!!" + +else + +echo "$serv is down/dead" + +service $serv start + +echo "$serv service is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-1.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-1.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-1.sh +``` + +### 2) How to Automatically Start a Service When it Goes Down on systemd Linux System? + +Use the following bash script, if you would like to start a single service in systemd Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-2.sh + +#!/bin/bash + +serv=httpd + +sstat=dead + +systemctl status $serv | grep -i 'running\|dead' | awk '{print $3}' | sed 's/[()]//g' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + systemctl start $serv + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +``` + +Set an executable permission to **`service-monitor-2.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-2.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-2.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-3.sh + +#!/bin/bash + +serv=httpd + +sstat=$(pidof $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running fine!!!" + +else + +echo "$serv is down/dead" + +systemctl start $serv + +echo "$serv service is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-3.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-3.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-3.sh +``` + +### 3) How to Automatically Start Multiple Services When it Goes Down on SysVinit Linux System? + +Use the following bash script, if you would like to start multiple service in SysVinit Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-4.sh + +#!/bin/bash + +sstat=stopped + +for serv in httpd rsyslog + +do + +service $serv status | grep -i 'running\|stopped' | awk '{print $3}' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + service $serv start + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +done +``` + +Set an executable permission to **`service-monitor-4.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-4.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-4.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-5.sh + +#!/bin/bash + +for serv in rsyslog httpd + +do + +sstat=$(pgrep $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running!!!" + +else + +echo "$serv is down/dead" + +service $serv start + +echo "$serv serv is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-5.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-5.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-5.sh +``` + +### 4) How to Automatically Start Multiple Service When it Goes Down on systemd Linux System? + +Use the following bash script, if you would like to start multiple services in systemd Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-6.sh + +#!/bin/bash + +sstat=dead + +for serv in httpd rsyslog + +do + +systemctl status $serv | grep -i 'running\|dead' | awk '{print $3}' | sed 's/[()]//g' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + systemctl start $serv + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done + +done +``` + +Set an executable permission to **`service-monitor-6.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-6.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-6.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-7.sh + +#!/bin/bash + +for serv in rsyslog httpd + +do + +sstat=$(pgrep $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running!!!" + +else + +echo "$serv is down/dead" + +systemctl start $serv + +echo "$serv serv is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-7.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-7.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-7.sh +``` + +### 5) How to Automatically Start a Service When it Goes Down on systemd and SysVinit Linux System? + +Use the following bash script, if you would like to start a service in systemd and SysVinit Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-8.sh + +#!/bin/bash + +smanager=$(ps -p1 | grep "init\|systemd" | awk '{print $4}') + +serv=httpd + +if (( $(pidof $serv | wc -l) > 0 )) + +then + +echo "$serv is running!!!" + +elif [ "$smanager" == "init" ] + +then + +service $serv start + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +else + +systemctl start $serv + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-8.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-8.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-8.sh +``` + +### 6) How to Automatically Start Multiple Services When it Goes Down on systemd and SysVinit Linux System? + +Use the following bash script, if you would like to start multiple services in systemd and SysVinit Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-9.sh + +#!/bin/bash + +smanager=$(ps -p1 | grep "init\|systemd" | awk '{print $4}') + +for serv in rsyslog httpd + +do + +if (( $(pgrep $serv | wc -l) > 0 )) + +then + +echo "$serv is running!!!" + +elif [ "$smanager" == "init" ] + +then + +service $serv start + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +else + +systemctl start $serv + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-9.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-9.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-9.sh +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-bash-script-auto-restart-services-when-down/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/category/shell-script/ diff --git a/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md b/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md new file mode 100644 index 0000000000..8f9371e787 --- /dev/null +++ b/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md @@ -0,0 +1,156 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Mint 19.2 “Tina” Released: Here’s What’s New and How to Get it) +[#]: via: (https://itsfoss.com/linux-mint-19-2-release/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux Mint 19.2 “Tina” Released: Here’s What’s New and How to Get it +====== + +_**Linux Mint 19.2 “Tina” has been released. See what’s new in it and learn how to upgrade to Linux Mint 19.2.**_ + +Recently, the Linux Mint team [announced][1] the release of Linux Mint 19 Cinnamon with significant improvements and feature additions. I’ll show you some of the main features of the new release and how to upgrade to it. + +### Linux Mint 19.2: What’s new? + +What matters the most is that Linux Mint 19.2 is also a Long Term Support release which will be supported till 2023. The new version includes updated software and lot of improvements along with added features. + +What are the key highlights among the added features? Let us take a look. + +#### Enhanced Update Manager + +![][2] + +Now, you can easily manage kernel updates from the update manager like never before. You get to know how long the kernels are supported. It is also possible to install/remove multiple kernels in a single queue. + +Linux Mint 19.2 also supports multiple kernel flavors, so you can switch between them when you want. + +![][3] + +In addition to all this, you can choose to automate the removal of kernels which are no longer needed and blacklist specific update packages (without blacklisting the future updates for that). + +#### Revamped ‘System Tools’ + +![][4] + +A new tab was added to the System Tools window – “**System Information**” – which will come in handy for users to easily copy/paste their configuration onto a forum to seek support. And, the layout has been improved. + +#### Other Improvements + +With Linux 19.2, the performance has greatly improved due to optimizations done in the window manager. Their aim was to reduce the input lag and make it feel smoother. + +You can now configure the scrollbar to how you want it to be. Sharing files on Linux Mint 19.2 is has improved as well with Cinnamon 4.2. + +Linux Mint 19.2 uses Noto fonts now instead of the Ubuntu fonts. + +With these, there are numerous other improvements under the hood (and some customization ability) – you can check the full details in the [blog post][5] of their official website. + +### Linux Mint 19 vs 19.1 vs 19.2: What’s the difference? + +You probably already know that Linux Mint releases are based on Ubuntu long term support releases. Linux Mint 19 series is based on Ubuntu 18.04 LTS. + +[][6] + +Suggested read  Five Tiny Features of Linux Mint Cinnamon I’ve Come to Love + +Ubuntu LTS releases get ‘point releases’ on the interval of a few months. Point release basically consists of bug fixes and security updates that have been pushed since the last release of the LTS version. This is similar to the Service Pack concept in Windows XP, if you remember it. + +If you are going to download Ubuntu 18.04 which was released in April, 2018 in 2019, you’ll get Ubuntu 18.04.2. The ISO image of 18.04.2 will consists of 18.04 and the bug fixes and security updates applied till 18.04.2. Imagine if there was no point releases, then right after [installing Ubuntu 18.04][7], you’ll have to install a few gigabytes of system updates. Not very convenient, right? + +But Linux Mint has it slightly different. Linux Mint has a major release based on Ubuntu LTS release and then it has three minor releases based on Ubuntu LTS point releases. + +Mint 19 was based on Ubuntu 18.04, 19.1 was based on 18.04.1 and Mint 19.2 is based on Ubuntu 18.04.2. There should be 19.3 in the Mint 19 series before the release of Mint 20 based on Ubuntu 20.04 LTS. All Mint 19.x releases are long term support releases and will get security updates till 2023. + +Now, if you are using Ubuntu 18.04 and keep your system updated, you’ll automatically get updated to 18.04.1, 18.04.2 etc. That’s not the case in Linux Mint. + +Linux Mint minor releases also consists of _feature changes_ along with bug fixes and security updates and this is the reason why updating Linux Mint 19 won’t automatically put you on 19.1. + +Linux Mint gives you the option if you want the new features or not. For example, Mint 19.2 has Cinnamon 4.2 and several other visual changes. If you are happy with the existing features, you can stay on Mint 19. You’ll still get the necessary security and maintenance updates on Mint 19 till 2023. + +Now that you understand the concept of minor releases and want the latest minor release, let’s see how to upgrade to Mint 19.2. + +### Linux Mint 19.2: How to Upgrade? + +No matter whether you have Linux Mint 19.1 or 19, you can follow these steps to [upgrade Linux Mint version][8]. + +[][9] + +Suggested read  Fedora 24 released! + +**Note**: _You should consider making a system snapshot (just in case) for backup. In addition, the Linux Mint team advises you to disable the screensaver and upgrade Cinnamon spices (if installed) from the System settings._ + +![][10] + + 1. Launch the Update Manager. + 2. Now, refresh it to load up the latest available updates (or you can change the mirror if you want). + 3. Once done, simply click on the Edit button to find “**Upgrade to Linux Mint 19.2 Tina**” button. + 4. Finally, just follow the on-screen instructions to easily update it. + + + +Based on your internet connection, it should take anything between a couple of minutes to 30 minutes. + +#### Don’t see Mint 19.2 update yet? Here’s what you can do + +If you don’t see the option to upgrade to Linux Mint 19.2 Tina, don’t lose hope. Here are a couple of things you can do. + +**Step 1: Make sure to use mint-upgrade-info version 1.1.3** + +Make sure that mint-upgrade-info is updated to version 1.1.3. You can try the install command that will update it to a newer version (if there is any). + +``` +sudo apt install mint-upgrade-info +``` + +**Step 2: Switch to default software sources** + +Chances are that you are using a mirror closer to you to get faster software downloads. But this could cause a problem as the mirrors might not have the new upgrade info yet. + +Go to Software Source and change the sources to default. Now run the update manager again and see if Mint 19.2 upgrade is available. + +**Wrapping Up** + +Linux Mint 19.2 is a solid upgrade. The new feature additions are very useful and it’s always good to see them working on the performance (so that it consumes less RAM) and appears to be smoother. + +What do you think about the latest release – Linux Mint 19.2 “Tina”? Have you upgraded yet? If yes, how is your experience so far? Feel free to let us know in the comments below. + +![][11] + +### Ankush Das + +co-author + +![][12] + +### Abhishek Prakash + +co-author + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-mint-19-2-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://blog.linuxmint.com/?p=3786 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina-kernel.png?resize=800%2C523&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina-update.png?resize=800%2C515&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina.jpg?ssl=1 +[5]: https://www.linuxmint.com/rel_tina_cinnamon_whatsnew.php +[6]: https://itsfoss.com/tiny-features-linux-mint-cinnamon/ +[7]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/ +[8]: https://itsfoss.com/upgrade-linux-mint-version/ +[9]: https://itsfoss.com/fedora-24-released/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/mintupgrade.png?ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/ankush_das.jpg?ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2016/11/14883680_10154845158472952_6433939564474062315_o.jpg?ssl=1 diff --git a/translated/tech/20190801 5 Free Partition Managers for Linux.md b/translated/tech/20190801 5 Free Partition Managers for Linux.md new file mode 100644 index 0000000000..d85a0f21f9 --- /dev/null +++ b/translated/tech/20190801 5 Free Partition Managers for Linux.md @@ -0,0 +1,124 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 Free Partition Managers for Linux) +[#]: via: (https://itsfoss.com/partition-managers-linux/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +5 个免费的 Linux 分区管理器 +====== + +_ **以下是我们推荐的 Linux 分区工具。它们能让你删除、添加、微调 Linux 系统上的磁盘分区或分区大小。** _ + +通常,你在安装操作系统时决定磁盘分区。但是,如果你需要在安装后的某个时间修改分区,该怎么办?你无法会到系统安装页面。因此,这就需要分区管理器(或准确地说是磁盘分区管理器)上场了。 + +在大多数情况下,你无需单独安装分区管理器,因为它已预先安装。此外,值得注意的是,你可以选择基于命令行或有 GUI 的分区管理器。 + +注意! + +磁盘分区是一项有风险的任务。除非绝对必要,否则不要这样做。 +如果你使用的是基于命令行的分区工具,那么需要学习完成任务的命令。否则,你可能最终会擦除整个磁盘。 + +### Linux 中的 5 个管理磁盘分区的工具 + +![][1] + +下面的列表没有特定的排名顺序。大多数分区工具应该存在于 Linux 发行版的仓库中。 + +#### GParted + +![GParted][2] + +这可能是 Linux 发行版中最流行的基于 GUI 的分区管理器。你可能已在某些发行版中预装它。如果还没有,只需在软件中心搜索它即可完成安装。 + +它会在启动时直接提示你以 root 用户进行身份验证。所以,你根本不需要在这里使用终端。身份验证后,它会分析设备,然后让你调整磁盘分区。如果发生数据丢失或意外删除文件,你还可以找到“尝试数据救援”的选项。 + +[GParted][3] + +#### GNOME Disks + +![Gnome Disks][4] + +一个基于 GUI 的分区管理器,随 Ubuntu 或任何基于 Ubuntu 的发行版(如 Zorin OS)一起出现。 + +它能让你删除、添加、调整大小和微调分区。如果还有疑问,它甚至可以帮助你[在 Ubuntu 中格式化 USB][6]。 + +你甚至可以借助此工具尝试修复分区。它的选项还包括编辑文件系统、创建分区镜像、还原镜像以及对分区进行基准测试。 + +[GNOME Disks][7] + +#### KDE Partition Manager + +![Kde Partition Manager][8] + +KDE Partition Manager 应该预装在基于 KDE 的 Linux 发行版上。但是,如果没有,你可以在软件中心搜索并轻松安装它。 + + +如果你没有预装它,那么可能会在尝试启动时通知你没有管理权限。没有管理员权限,你无法做任何事情。因此,在这种情况下,请输入以下命令: + +``` +sudo partitionmanager +``` + +它将扫描你的设备,然后你就可以创建、移动、复制、删除和调整分区大小。你还可以导入/导出分区表及使用其他许多调整选项。 + +[KDE Partition Manager][9] + +#### Fdisk (命令行) + +![Fdisk][10] + +[fdisk][11] 是一个命令行程序,它在每个类 Unix 的系统中都有。不要担心,即使它需要你启动终端并输入命令,但这并不是很困难。但是,如果你在使用基于文本的程序时感到困惑,那么你应该继续使用上面提到的 GUI 程序。它们都做同样的事情。 + +要启动 fdisk,你必须是 root 用户并指定管理分区的设备。以下是该命令的示例: + +``` +sudo fdisk /dev/sdc +``` + +你可以参考 [Linux 文档项目的维基页面][12]以获取命令列表以及有关其工作原理的更多详细信息。 + +#### GNU Parted (命令行) + +![Gnu Parted][13] + +这是另一个在你 Linux 发行版上预安装的命令行程序。你需要输入下面的命令启动: + +``` +sudo parted +``` + +**总结** + +我不会忘了说 [QtParted][15] 是分区管理器的替代品之一。但它已经几年没有维护,因此我不建议使用它。 + +你如何看待这里提到的分区管理器?我有错过你最喜欢的吗?让我知道,我将根据你的建议更新这个 Linux 分区管理器列表。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/partition-managers-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/disk-partitioning-tools-linux.jpg?resize=800%2C450&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/g-parted.png?ssl=1 +[3]: https://gparted.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnome-disks.png?ssl=1 +[6]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/ +[7]: https://wiki.gnome.org/Apps/Disks +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/kde-partition-manager.jpg?resize=800%2C404&ssl=1 +[9]: https://kde.org/applications/system/org.kde.partitionmanager +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/fdisk.jpg?fit=800%2C496&ssl=1 +[11]: https://en.wikipedia.org/wiki/Fdisk +[12]: https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnu-parted.png?fit=800%2C559&ssl=1 +[15]: http://qtparted.sourceforge.net/