mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
c591374262
@ -1,16 +1,16 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12171-1.html)
|
||||
[#]: subject: (Rambox is an All-in-one Messenger for Linux)
|
||||
[#]: via: (https://itsfoss.com/rambox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Rambox 是 Linux 中多合一的消息收发工具
|
||||
Rambox:Linux 中多合一的消息收发工具
|
||||
======
|
||||
|
||||
_**简介:Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。**_
|
||||
> Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。
|
||||
|
||||
### Rambox:在单个应用中添加多个消息服务
|
||||
|
||||
@ -18,7 +18,7 @@ _**简介:Rambox 是一个多合一消息收发工具,允许你将多种服
|
||||
|
||||
Rambox 是通过安装单个应用管理多个通信服务的最佳方式之一。你可以在一个界面使用[多个消息服务][2],如 Facebook Messenger、Gmail chats、AOL、Discord、Google Duo、[Viber][3] 等。
|
||||
|
||||
这样,你就不需要安装单独的应用或者在浏览器中保持打开。你可以使用主密码锁定 Rambox 应用。你还可以使用"请勿打扰"功能。
|
||||
这样,你就不需要安装单独的应用或者在浏览器中一直打开着。你可以使用主密码锁定 Rambox 应用。你还可以使用“请勿打扰”功能。
|
||||
|
||||
Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你访问 600 多个应用,而社区版则包含 99 多个应用。专业版本具有额外的功能,如主题、休眠、ad-block、拼写检查和高级支持。
|
||||
|
||||
@ -44,24 +44,22 @@ Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你
|
||||
* Ad-block (**专业版**)
|
||||
* 休眠支持 (**专业版**)
|
||||
* 主题支持(**专业版**)
|
||||
* 移动视图 (**专业版**)
|
||||
* 移动设备视图 (**专业版**)
|
||||
* 拼写检查 (**专业版**)
|
||||
* 工作时间 - 计划传入通知时间 (**专业版**)
|
||||
* 代理支持 (**专业版**)
|
||||
|
||||
|
||||
* 工作时间 - 计划传入通知的时间 (**专业版**)
|
||||
* 支持代理 (**专业版**)
|
||||
|
||||
除了我在这里列出的内容外,你还可以在 Rambox Pro 版本中找到更多功能。要了解有关它的更多信息,你可以参考[正式功能列表][6]。
|
||||
|
||||
还值得注意的是,你不能有超过 3 个活跃并发设备连接。
|
||||
还值得注意的是,你不能超过 3 个活跃并发设备的连接。
|
||||
|
||||
### 在 Linux 上安装 Rambox
|
||||
|
||||
你可以在[官方下载页][4]获取 **.AppImage** 文件来运行 Rambox。如果你好奇,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。
|
||||
你可以在[官方下载页][4]获取 .AppImage 文件来运行 Rambox。如果你不清楚,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。
|
||||
|
||||
另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 **.deb / .rpm** 或其他包。
|
||||
另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 .deb / .rpm 或其他包。
|
||||
|
||||
[Download Rambox Community Edition][4]
|
||||
- [下载 Rambox 社区版][4]
|
||||
|
||||
### 总结
|
||||
|
||||
@ -69,7 +67,7 @@ Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你
|
||||
|
||||
还有一个类似的应用称为 [Franz][10],它也像 Rambox 部分开源、部分高级版。
|
||||
|
||||
尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是资源友好,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。
|
||||
尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是节约资源,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。
|
||||
|
||||
除此之外,这是一个令人印象深刻的应用。你有试过了么?欢迎随时让我知道你的想法!
|
||||
|
||||
@ -80,7 +78,7 @@ via: https://itsfoss.com/rambox/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12170-1.html)
|
||||
[#]: subject: (Difference Between YUM and RPM Package Manager)
|
||||
[#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
@ -10,6 +10,8 @@
|
||||
YUM 和 RPM 包管理器的不同之处
|
||||
======
|
||||
|
||||

|
||||
|
||||
软件包管理器在 Linux 系统中扮演着重要的角色。它允许你安装、更新、查看、搜索和删除软件包,以满足你的需求。
|
||||
|
||||
每个发行版都有自己的一套包管理器,依据你的 Linux 发行版来分别使用它们。
|
||||
@ -18,7 +20,7 @@ RPM 是最古老的传统软件包管理器之一,它是为基于 Red Hat 的
|
||||
|
||||
> 如果你想知道 [YUM 和 DNF 包管理器的区别][1]请参考该文章。
|
||||
|
||||
这意味着 yum 可以自动下载并安装所有需要的依赖项,但 rpm 会告诉你安装一个依赖项列表,然后你必须手动安装。
|
||||
这意味着 `yum` 可以自动下载并安装所有需要的依赖项,但 `rpm` 会告诉你安装一个依赖项列表,然后你必须手动安装。
|
||||
|
||||
当你想用 [rpm 命令][2] 安装一组包时,这实际上是不可能的,而且很费时间。
|
||||
|
||||
@ -76,13 +78,13 @@ via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/
|
||||
作者:[Magesh Maruthamuthu][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/comparison-difference-between-dnf-vs-yum/
|
||||
[1]: https://linux.cn/article-12161-1.html
|
||||
[2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/
|
||||
[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/
|
@ -0,0 +1,67 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Industrial robots could 'eat metal' to power themselves)
|
||||
[#]: via: (https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
Industrial robots could 'eat metal' to power themselves
|
||||
======
|
||||
Scavenging energy by foraging for metal could power Internet of Things electronics and robots, suggest researchers at University of Pennsylvania.
|
||||
Jiraroj Praditcharoenkul / Getty Images
|
||||
|
||||
A fundamental manufacturing shift is on the horizon, some say. It's where robots run all elements of our future factories. The machines will operate using brain-copying artificial intelligence and handle not only manufacturing processes, but also supply-chain logistics, planning, and other roles formerly performed by humans.
|
||||
|
||||
This vision of the future anticipates an industrial workplace where Internet-connected machines will mimic humans, yet do the jobs more precisely, faster and cheaper than humans.
|
||||
|
||||
And the human-copying element may not end there. Researchers at the University of Pennsylvania are suggesting that robots could end up eating like humans, too.
|
||||
|
||||
Robots will "eat metal for energy," according to a [news article][1] published in Medium. The researchers' vision for a "metal-air scavenger" could solve one of the quandaries of future IoT-enabled factories. That quandary is how to power a device that moves without adding mass and weight, as one does by adding bulky batteries.
|
||||
|
||||
The answer, according to the University of Pennsylvania researchers, is to try to electromechanically forage for energy from the metal surfaces that a robot or IoT device traverses, thus converting material garnered, using a chemical reaction, into power.
|
||||
|
||||
"Robots and electronics [would] extract energy from large volumes of energy dense material without having to carry the material on-board," the researchers say in a paper they've published in [ACS Energy Letters][2].
|
||||
|
||||
It would be like "eating metal, breaking down its chemical bonds for energy like humans do with food." Batteries work by repeatedly breaking and creating chemical bonds.
|
||||
|
||||
The research references the dichotomy between computing and power storage. Computing is well suited to miniaturization, and processers have been progressively reduced in size while performance has increased, but battery storage hasn't. You need a bigger battery for more energy.
|
||||
|
||||
Even if swarming, industrial robots became the size of insects (I've [written about][3] the possibility), there's an issue powering the nano devices – the required size of the power source would defeat the object of the miniaturization. The battery alone could crush the device, and even if it didn't, the machine would need excessive amounts of energy to move, because of the battery mass. This conundrum is one of the reasons there's an emphasis in IoT development to find ways to harvest energy ambiently.
|
||||
|
||||
However, with ambient power – such as is found in [solar or potentially magnetism][4], for example – power density comes into play. That's where the harvesting technology can't pull enough energy out of the environment, or it does it so slowly that it's not as power-effective as traditional batteries.
|
||||
|
||||
Enter the metal-eating robot. The University of Pennsylvania researchers' form of harvesting efficiently replicates a power-dense battery. Metal is more dense than the battery chemistry.
|
||||
|
||||
The group performs their foraging energy production with a hydrogel electrolyte sponge towed by the robot. It uses a cathode, dragged over the surface, to extract amperages from the metal fuel source, such as steel or aluminum.
|
||||
|
||||
"Our [metal-air scavenger] has a power density that's ten times better than the best harvesters, to the point that we can compete against batteries," said James Pikul, an assistant professor in the University of Pennsylvania's Department of Mechanical Engineering and Applied Mechanics and one of the paper authors, in the Medium post. "It's using battery chemistry, but doesn't have the associated weight, because it's taking those chemicals from the environment."
|
||||
|
||||
This method is also potentially better than existing lithium-ion battery chemistry, according to Pikul.
|
||||
|
||||
"One day, a robot that needs to recharge its batteries will just need to find some aluminum to 'eat,'" Pikul said.
|
||||
|
||||
The robot, although ultimately likely to be a better worker than the human, is a messy eater. As it oxidizes the metal it passes over, it leaves a "microscopic layer of rust in its wake," according to the article.
|
||||
|
||||
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html
|
||||
|
||||
作者:[Patrick Nelson][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/Patrick-Nelson/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://medium.com/penn-engineering/penn-engineerings-new-scavenger-technology-allows-robots-to-eat-metal-for-energy-bd12f3b83893
|
||||
[2]: https://pubs.acs.org/doi/10.1021/acsenergylett.9b02661
|
||||
[3]: https://www.networkworld.com/article/3429200/self-organizing-micro-robots-may-soon-swarm-the-industrial-iot.html
|
||||
[4]: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html
|
||||
[5]: https://www.facebook.com/NetworkWorld/
|
||||
[6]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,321 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (10 ways to analyze binary files on Linux)
|
||||
[#]: via: (https://opensource.com/article/20/4/linux-binary-analysis)
|
||||
[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe)
|
||||
|
||||
10 ways to analyze binary files on Linux
|
||||
======
|
||||
These simple commands and tools can help you sail through the task of
|
||||
analyzing binary files.
|
||||
![Tux with binary code background][1]
|
||||
|
||||
"There are 10 types of people in this world: those who understand binary and those who don't."
|
||||
|
||||
We work with binaries daily, yet we understand so little about them. By binaries, I mean the executable files that you run daily, right from your command line tools to full-fledged applications.
|
||||
|
||||
Linux provides a rich set of tools that makes analyzing binaries a breeze! Whatever might be your job role, if you are working on Linux, knowing the basics about these tools will help you understand your system better.
|
||||
|
||||
In this article, we will cover some of the most popular of these Linux tools and commands, most of which will be available natively as part of your Linux distribution. If not, you can always use your package manager to install and explore them. Remember: learning to use the right tool at the right occasion requires plenty of patience and practice.
|
||||
|
||||
### file
|
||||
|
||||
What it does: Help to determine the file type.
|
||||
|
||||
This will be your starting point for binary analysis. We work with files daily. Not everything is an executable type; there is a whole wide range of file types out there. Before you start, you need to understand the type of file that is being analyzed. Is it a binary file, a library file, an ASCII text file, a video file, a picture file, a PDF, a data file, etc.?
|
||||
|
||||
The **file** command will help you identify the exact file type that you are dealing with.
|
||||
|
||||
|
||||
```
|
||||
$ file /bin/ls
|
||||
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=94943a89d17e9d373b2794dcb1f7e38c95b66c86, stripped
|
||||
$
|
||||
$ file /etc/passwd
|
||||
/etc/passwd: ASCII text
|
||||
$
|
||||
```
|
||||
|
||||
### ldd
|
||||
|
||||
What it does: Print shared object dependencies.
|
||||
|
||||
If you have already used the **file** command above on an executable binary, you can't miss the "dynamically linked" message in the output. What does it mean?
|
||||
|
||||
When software is being developed, we try not to reinvent the wheel. There are a set of common tasks that most software programs require, like printing output or reading from standard in, or opening files, etc. All of these common tasks are abstracted away in a set of common functions that everybody can then use instead of writing their own variants. These common functions are put in a library called **libc** or **glibc**.
|
||||
|
||||
How does one find which libraries the executable is dependent on? That’s where **ldd** command comes into the picture. Running it against a dynamically linked binary shows all its dependent libraries and their paths.
|
||||
|
||||
|
||||
```
|
||||
$ ldd /bin/ls
|
||||
linux-vdso.so.1 => (0x00007ffef5ba1000)
|
||||
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fea9f854000)
|
||||
libcap.so.2 => /lib64/libcap.so.2 (0x00007fea9f64f000)
|
||||
libacl.so.1 => /lib64/libacl.so.1 (0x00007fea9f446000)
|
||||
libc.so.6 => /lib64/libc.so.6 (0x00007fea9f079000)
|
||||
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fea9ee17000)
|
||||
libdl.so.2 => /lib64/libdl.so.2 (0x00007fea9ec13000)
|
||||
/lib64/ld-linux-x86-64.so.2 (0x00007fea9fa7b000)
|
||||
libattr.so.1 => /lib64/libattr.so.1 (0x00007fea9ea0e000)
|
||||
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea9e7f2000)
|
||||
$
|
||||
```
|
||||
|
||||
### ltrace
|
||||
|
||||
What it does: A library call tracer.
|
||||
|
||||
We now know how to find the libraries an executable program is dependent on using the **ldd** command. However, a library can contain hundreds of functions. Out of those hundreds, which are the actual functions being used by our binary?
|
||||
|
||||
The **ltrace** command displays all the functions that are being called at run time from the library. In the below example, you can see the function names being called, along with the arguments being passed to that function. You can also see what was returned by those functions on the far right side of the output.
|
||||
|
||||
|
||||
```
|
||||
$ ltrace ls
|
||||
__libc_start_main(0x4028c0, 1, 0x7ffd94023b88, 0x412950 <unfinished ...>
|
||||
strrchr("ls", '/') = nil
|
||||
setlocale(LC_ALL, "") = "en_US.UTF-8"
|
||||
bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale"
|
||||
textdomain("coreutils") = "coreutils"
|
||||
__cxa_atexit(0x40a930, 0, 0, 0x736c6974756572) = 0
|
||||
isatty(1) = 1
|
||||
getenv("QUOTING_STYLE") = nil
|
||||
getenv("COLUMNS") = nil
|
||||
ioctl(1, 21523, 0x7ffd94023a50) = 0
|
||||
<< snip >>
|
||||
fflush(0x7ff7baae61c0) = 0
|
||||
fclose(0x7ff7baae61c0) = 0
|
||||
+++ exited (status 0) +++
|
||||
$
|
||||
```
|
||||
|
||||
### Hexdump
|
||||
|
||||
What it does: Display file contents in ASCII, decimal, hexadecimal, or octal.
|
||||
|
||||
Often, it happens that you open a file with an application that doesn’t know what to do with that file. Try opening an executable file or a video file using vim; all you will see is gibberish thrown on the screen.
|
||||
|
||||
Opening unknown files in Hexdump helps you see what exactly the file contains. You can also choose to see the ASCII representation of the data present in the file using some command-line options. This might help give you some clues to what kind of file it is.
|
||||
|
||||
|
||||
```
|
||||
$ hexdump -C /bin/ls | head
|
||||
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
|
||||
00000010 02 00 3e 00 01 00 00 00 d4 42 40 00 00 00 00 00 |..>......B@.....|
|
||||
00000020 40 00 00 00 00 00 00 00 f0 c3 01 00 00 00 00 00 |@...............|
|
||||
00000030 00 00 00 00 40 00 38 00 09 00 40 00 1f 00 1e 00 |....@.8...@.....|
|
||||
00000040 06 00 00 00 05 00 00 00 40 00 00 00 00 00 00 00 |........@.......|
|
||||
00000050 40 00 40 00 00 00 00 00 40 00 40 00 00 00 00 00 |@.@.....@.@.....|
|
||||
00000060 f8 01 00 00 00 00 00 00 f8 01 00 00 00 00 00 00 |................|
|
||||
00000070 08 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 |................|
|
||||
00000080 38 02 00 00 00 00 00 00 38 02 40 00 00 00 00 00 |8.......8.@.....|
|
||||
00000090 38 02 40 00 00 00 00 00 1c 00 00 00 00 00 00 00 |8.@.............|
|
||||
$
|
||||
```
|
||||
|
||||
### strings
|
||||
|
||||
What it does: Print the strings of printable characters in files.
|
||||
|
||||
If Hexdump seems a bit like overkill for your use case and you are simply looking for printable characters within a binary, you can use the **strings** command.
|
||||
|
||||
When software is being developed, a variety of text/ASCII messages are added to it, like printing info messages, debugging info, help messages, errors, and so on. Provided all this information is present in the binary, it will be dumped to screen using **strings**.
|
||||
|
||||
|
||||
```
|
||||
`$ strings /bin/ls`
|
||||
```
|
||||
|
||||
### readelf
|
||||
|
||||
What it does: Display information about ELF files.
|
||||
|
||||
ELF (Executable and Linkable File Format) is the dominant file format for executable or binaries, not just on Linux but a variety of UNIX systems as well. If you have utilized tools like file command, which tells you that the file is in ELF format, the next logical step will be to use the **readelf** command and its various options to analyze the file further.
|
||||
|
||||
Having a reference of the actual ELF specification handy when using **readelf** can be very useful. You can find the specification [here][2].
|
||||
|
||||
|
||||
```
|
||||
$ readelf -h /bin/ls
|
||||
ELF Header:
|
||||
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
|
||||
Class: ELF64
|
||||
Data: 2's complement, little endian
|
||||
Version: 1 (current)
|
||||
OS/ABI: UNIX - System V
|
||||
ABI Version: 0
|
||||
Type: EXEC (Executable file)
|
||||
Machine: Advanced Micro Devices X86-64
|
||||
Version: 0x1
|
||||
Entry point address: 0x4042d4
|
||||
Start of program headers: 64 (bytes into file)
|
||||
Start of section headers: 115696 (bytes into file)
|
||||
Flags: 0x0
|
||||
Size of this header: 64 (bytes)
|
||||
Size of program headers: 56 (bytes)
|
||||
Number of program headers: 9
|
||||
Size of section headers: 64 (bytes)
|
||||
Number of section headers: 31
|
||||
Section header string table index: 30
|
||||
$
|
||||
```
|
||||
|
||||
### objdump
|
||||
|
||||
What it does: Display information from an object file.
|
||||
|
||||
Binaries are created when you write source code which gets compiled using a tool called, unsurprisingly, a compiler. This compiler generates machine language instructions equivalent to the source code, which can then be executed by the CPU to perform a given task. This machine language code can be interpreted via mnemonics called an assembly language. An assembly language is a set of instructions that help you understand the operations being performed by the program and ultimately being executed on the CPU.
|
||||
|
||||
**objdump** utility reads the binary or executable file and dumps the assembly language instructions on the screen. Knowledge of assembly is critical to understand the output of the **objdump** command.
|
||||
|
||||
Remember: assembly language is architecture-specific.
|
||||
|
||||
|
||||
```
|
||||
$ objdump -d /bin/ls | head
|
||||
|
||||
/bin/ls: file format elf64-x86-64
|
||||
|
||||
Disassembly of section .init:
|
||||
|
||||
0000000000402150 <_init@@Base>:
|
||||
402150: 48 83 ec 08 sub $0x8,%rsp
|
||||
402154: 48 8b 05 6d 8e 21 00 mov 0x218e6d(%rip),%rax # 61afc8 <__gmon_start__>
|
||||
40215b: 48 85 c0 test %rax,%rax
|
||||
$
|
||||
```
|
||||
|
||||
### strace
|
||||
|
||||
What it does: Trace system calls and signals.
|
||||
|
||||
If you have used **ltrace**, mentioned earlier, think of **strace** being similar. The only difference is that, instead of calling a library, the **strace** utility traces system calls. System calls are how you interface with the kernel to get work done.
|
||||
|
||||
To give an example, if you want to print something to the screen, you will use the **printf** or **puts** function from the standard library **libc**; however, under the hood, ultimately, a system call named **write** will be made to actually print something to the screen.
|
||||
|
||||
|
||||
```
|
||||
$ strace -f /bin/ls
|
||||
execve("/bin/ls", ["/bin/ls"], [/* 17 vars */]) = 0
|
||||
brk(NULL) = 0x686000
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f967956a000
|
||||
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
|
||||
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
|
||||
fstat(3, {st_mode=S_IFREG|0644, st_size=40661, ...}) = 0
|
||||
mmap(NULL, 40661, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9679560000
|
||||
close(3) = 0
|
||||
<< snip >>
|
||||
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9679569000
|
||||
write(1, "R2 RH\n", 7R2 RH
|
||||
) = 7
|
||||
close(1) = 0
|
||||
munmap(0x7f9679569000, 4096) = 0
|
||||
close(2) = 0
|
||||
exit_group(0) = ?
|
||||
+++ exited with 0 +++
|
||||
$
|
||||
```
|
||||
|
||||
### nm
|
||||
|
||||
What it does: List symbols from object files.
|
||||
|
||||
If you are working with a binary that is not stripped, the **nm** command will provide you with the valuable information that was embedded in the binary during compilation. **nm** can help you identify variables and functions from the binary. You can imagine how useful this would be if you don't have access to the source code of the binary being analyzed.
|
||||
|
||||
To showcase **nm**, we will quickly write a small program and compile it with the **-g** option, and we will also see that the binary is not stripped by using the file command.
|
||||
|
||||
|
||||
```
|
||||
$ cat hello.c
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
printf("Hello world!");
|
||||
return 0;
|
||||
}
|
||||
$
|
||||
$ gcc -g hello.c -o hello
|
||||
$
|
||||
$ file hello
|
||||
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3de46c8efb98bce4ad525d3328121568ba3d8a5d, not stripped
|
||||
$
|
||||
$ ./hello
|
||||
Hello world!$
|
||||
$
|
||||
|
||||
$ nm hello | tail
|
||||
0000000000600e20 d __JCR_END__
|
||||
0000000000600e20 d __JCR_LIST__
|
||||
00000000004005b0 T __libc_csu_fini
|
||||
0000000000400540 T __libc_csu_init
|
||||
U __libc_start_main@@GLIBC_2.2.5
|
||||
000000000040051d T main
|
||||
U printf@@GLIBC_2.2.5
|
||||
0000000000400490 t register_tm_clones
|
||||
0000000000400430 T _start
|
||||
0000000000601030 D __TMC_END__
|
||||
$
|
||||
```
|
||||
|
||||
### gdb
|
||||
|
||||
What it does: The GNU debugger.
|
||||
|
||||
Well, not everything in the binary can be statically analyzed. We did execute some commands which ran the binary, like **ltrace** and **strace**; however, software consists of a variety of conditions that could lead to various alternate paths being executed.
|
||||
|
||||
The only way to analyze these paths is at run time by having the ability to stop or pause the program at any given location and being able to analyze information and then move further down.
|
||||
That is where debuggers come into the picture, and on Linux, **gdb** is the defacto debugger. It helps you load a program, set breakpoints at specific places, analyze memory and CPU register, and do much more. It complements the other tools mentioned above and allows you to do much more runtime analysis.
|
||||
|
||||
One thing to notice is, once you load a program using **gdb**, you will be presented with its own **(gdb)** prompt. All further commands will be run in this **gdb** command prompt until you exit.
|
||||
|
||||
We will use the "hello" program that we compiled earlier and use **gdb** to see how it works.
|
||||
|
||||
|
||||
```
|
||||
$ gdb -q ./hello
|
||||
Reading symbols from /home/flash/hello...done.
|
||||
(gdb) break main
|
||||
Breakpoint 1 at 0x400521: file hello.c, line 4.
|
||||
(gdb) info break
|
||||
Num Type Disp Enb Address What
|
||||
1 breakpoint keep y 0x0000000000400521 in main at hello.c:4
|
||||
(gdb) run
|
||||
Starting program: /home/flash/./hello
|
||||
|
||||
Breakpoint 1, main () at hello.c:4
|
||||
4 printf("Hello world!");
|
||||
Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64
|
||||
(gdb) bt
|
||||
#0 main () at hello.c:4
|
||||
(gdb) c
|
||||
Continuing.
|
||||
Hello world![Inferior 1 (process 29620) exited normally]
|
||||
(gdb) q
|
||||
$
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
Once you are comfortable with using these native Linux binary analysis tools and understanding the output they provide, you can then move onto more advanced and professional open source binary analysis tools like [radare2][3].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/linux-binary-analysis
|
||||
|
||||
作者:[Gaurav Kamathe][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/gkamathe
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_linux_penguin_code_binary.jpg?itok=TxGxW0KY (Tux with binary code background)
|
||||
[2]: http://www.skyfree.org/linux/references/ELF_Format.pdf
|
||||
[3]: https://github.com/radareorg/radare2
|
@ -0,0 +1,161 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Edit music recordings with Audacity on Linux)
|
||||
[#]: via: (https://opensource.com/article/20/4/audacity)
|
||||
[#]: author: (David Both https://opensource.com/users/dboth)
|
||||
|
||||
Edit music recordings with Audacity on Linux
|
||||
======
|
||||
How COVID-19 caused me to learn Audacity on the fly and learn to love
|
||||
it.
|
||||
![Bird singing and music notes][1]
|
||||
|
||||
In this strange and difficult time of a global pandemic, we are all called upon to do things differently, to change our routines, and to learn new things.
|
||||
|
||||
I have worked from home for many years, so that is nothing new to me. Even though I am allegedly retired, I write articles for Opensource.com and [Enable Sysadmin][2] and books. I also manage my own home network, which is larger than you might think, and my church's network and Linux hosts, and I help a few friends with Linux. All of this keeps me busy doing what I like to do, and all of it is usually well within my comfort zone.
|
||||
|
||||
But COVID-19 has changed all of that. And, like many other types of organizations, my church had to move quickly to a new service-delivery paradigm. And that is what churches do—deliver a specific kind of service. As the church sysadmin and with some knowledge of audio recording and editing (back in the '70s, I mixed the sound and was the only roadie for a couple of regional folk-rock groups in Toledo, Ohio), I decided to learn the open source audio recording and editing software [Audacity][3] to help meet this challenge.
|
||||
|
||||
This is not a comprehensive how-to article about using Audacity. It is about my experiences getting started with this powerful audio-editing tool, but there should be enough information here to help you get started.
|
||||
|
||||
I have learned just what I need to know in order to accomplish my task: combining several separate audio clips into a single MP3 audio file. If you already know Audacity and do things differently or know things that I don't, that is expected. And if you have any suggestions to help me accomplish my task more easily, please share them in the comments.
|
||||
|
||||
### The old way
|
||||
|
||||
I try not to use the term "normal" now because it is hard to know exactly what that is—if such a state even exists. But our old method of producing recordings for our shut-ins, members who are traveling, and anyone else was to record the sermon portion of our regular, in-person church services and post them on our website.
|
||||
|
||||
To do this, I installed a TASCAM SS-R100 solid-state recorder that stores the sermons as MP3 files on a thumb drive. We uploaded the recordings to a special directory of our website so people could download them. The recordings are uploaded using a Bash [program][4] I wrote for the task. _Automate everything!_ I trained a couple of others to perform these tasks using sudo in case I was not available.
|
||||
|
||||
This all worked very well. Until it didn't.
|
||||
|
||||
### The new way
|
||||
|
||||
As soon as the first restrictions on large gatherings occurred, we made some changes. We could still have small gatherings, so four of us met Sunday mornings and recorded an abbreviated service using our in-house recorder and doing the upload the usual way. This worked, but as the crisis deepened and it became more of a risk to meet with even a few people, we had to make more changes.
|
||||
|
||||
Like a huge number of other organizations, we realized we each needed to perform our parts of creating services in separate locations from our own homes.
|
||||
|
||||
Now, depending upon the structure of the service, I receive several recordings that I need to combine to create the full church service. Our music director records each anthem and interlude using her iPhone and sends me the recordings in the M4A (MPEG-4 audio) format. They each range in length from seconds to five minutes and are up to 3MB in size. Likewise, our rector sends me two to six recordings, also in M4A format, that contains his portion of the service. Sometimes, other musicians in our church send solos or duets recorded with their significant others; these can be in MP3 or M4A formats.
|
||||
|
||||
Then, I pull all of this together into a single recording that can be uploaded to our server for people to download. I use Audacity for this because it was available in my repo, and it was easy to get started.
|
||||
|
||||
### Getting started with Audacity
|
||||
|
||||
I had never used [Audacity][5] before this, so, like many others these days, I needed to learn something new just in time to accomplish what I needed to do. I struggled a bit at first, but it turned out to be fun and very enlightening.
|
||||
|
||||
Audacity was easy to install on my Fedora 31 workstation because, as in many distros, it is available from the Fedora repository.
|
||||
|
||||
The first time I opened Audacity with the program launcher icon, the application's window was empty with no projects nor tracks present. Audacity projects have an AUP extension, so if you have an existing project, you could click on the file in your favorite file manager and launch Audacity that way.
|
||||
|
||||
### Convert M4A to MP3
|
||||
|
||||
As installed by Fedora, Audacity does not recognize M4A files. Regardless of how you proceed, you need to install the [LAME][6] MP3 encoder and [FFmpeg][7] import/export library, both of which are available from the Fedora repository and, most likely, any other distro's repository.
|
||||
|
||||
There are websites that explain how to configure Audacity to use these tools to import and convert audio files from M4A to other types (such as MP3), but I decided to write a script to do it from the command line. For one reason, using a script is faster than doing a lot of extra clicking in a GUI interface, and for another, the file names need some work, so I already needed a script to rename the files. Many people use non-alphanumeric characters to name files, but I don't like dealing with special keyboard characters from the command line. It's easier to manage files with simple alphanumeric names, so my script removes all non-alphanumeric characters from the file names and then converts the files to MP3 format.
|
||||
|
||||
You may choose a different approach, but I like the scripted solution. It is fast, and I only need to run the script once, no matter how many files need to be renamed and converted to MP3.
|
||||
|
||||
### Create a new project
|
||||
|
||||
You can create a new project whether or not any audio tracks are loaded. I recommend creating the project first, before importing any audio files (aka "clips"). From the Menu bar, select **File > Save Project > Save Project As**. This opens a warning dialog window that says, _"'Save project' is for an Audacity project, not an audio file."_ Click the **OK** button to continue to a standard file-save dialog.
|
||||
|
||||
I found that I needed to do this twice. The first time, the warning dialog did not display any buttons, so I had to close the dialog using the window menu or the x icon in the Title bar.
|
||||
|
||||
Name the project whatever you like, and Audacity automatically adds the AUP extension. You now have an empty project.
|
||||
|
||||
### Add audio files to your project
|
||||
|
||||
The first step is to add your audio files to the project. Using the Menu bar, open **File > Import > Audio** and then use the file dialog to select one or more files to import. For my first test project, I loaded all the files at once without sorting the tracks nor aligning the clips in the desired sequence along the timeline. This time, I started by loading the audio files one at a time in the sequence I wanted them from top to bottom. As each file is imported, it is placed into a new track below any existing tracks. The following image shows the files loaded all at one time in the sequence they appear in the working directory.
|
||||
|
||||
![Tracks loaded in Audacity][8]
|
||||
|
||||
There is a timeline across the top of the window's track area. There is also a scroll bar at the bottom of the window, so you can scroll along the timeline when the tracks extend beyond the width of the Audacity window. There is also a vertical scroll bar if there are more tracks than fit into the window.
|
||||
|
||||
Notice the names in the upper-left corner of the waveform section of each track—they are the file names of each track without the extension. These are not there by default, but I find them helpful. To display these names, use the Menu bar to select **Edit > Preferences** and place a check in the **Show Audio Track Name As Overlay** box.
|
||||
|
||||
### Order your audio clips
|
||||
|
||||
Once you have some files loaded into the Audacity workspace, you can start manipulating them. To order your audio clips, select one and use the **Time-Shift** tool (↔︎) to slide them horizontally along the tracks; continue doing this until all the clips line up end to end in the order you want them. Note that the clip you are moving is book-ended by a pair of vertical alignment lines. When they line up perfectly, the end lines of the two aligned tracks change color to alert you.
|
||||
|
||||
You can hover the mouse pointer over the tool icons in the Audacity toolbars to see a pop-up that displays the name of that tool. This helps beginners understand what each tool does.
|
||||
|
||||
![Audacity toolbox][9]
|
||||
|
||||
Here, the **Selection** tool** **is selected in the Audacity toolbar. The **Time-Shift** tool is second from the left on the bottom row.
|
||||
|
||||
The following image shows what happens when you slide the audio clips into place on the project timeline without sorting the tracks into a particular sequence. This may not be optimal for how you like to work. It is not for me.
|
||||
|
||||
![Audio clips in Audacity][10]
|
||||
|
||||
To remove segments of (or complete) audio clips, select them with the **Selection** tool—you can also select multiple adjacent tracks. Then you can press the **Delete** button on your keyboard to delete the selected segment(s).
|
||||
|
||||
In the image above, you can see a vertical black line in track 1 and a vertical green line crossing all the tracks. These are the audio cursors that show the playback positions of a track or the entire project. Choose the **Selection** tool and click the desired position within a track, then click the **Play** button on the transport controls (in the upper-left of the Audacity window) to begin playback. Playback will continue past the end of the selected track and all the way to the end of the project. If tracks overlap on the timeline, they will play simultaneously.
|
||||
|
||||
To begin playback immediately, click the desired starting point on the timeline. To play part of a track, hold down the Left mouse button to select a short segment of the track, and then click the **Play** button. The other transport buttons—Pause, Stop, and so—on are identified with universal icons and work as you would expect.
|
||||
|
||||
You can also click the **Silence Audio Selection** button—the fifth button from the left on the **Edit** toolbar (shown below)—to completely silence a selected segment while leaving it in place for timing purposes. This is how I silenced a number of background clicks and noises.
|
||||
|
||||
![Audacity edit tools][11]
|
||||
|
||||
It took me a while to figure out how to sort the tracks vertically, and it turns out there are a few different ways to accomplish the task.
|
||||
|
||||
You can use the track menu to reorder arrangement. Each track has its own Control Panel on the left side (shown below). The track drop-down Menu bar at the top of the Control Panel opens a menu that provides several track-sequencing options to move a track up, down, to the top, or to the bottom.
|
||||
|
||||
![Moving tracks in Audacity][12]
|
||||
|
||||
The items to move a track up or down move the track one position at a time, so you have to select it as many times as necessary to get the track in the desired position.
|
||||
|
||||
To drag and drop tracks, you must click on the space occupied by the track details. In this screenshot, that's "Mono, 48000Hz 32 bit float". It can be tricky, because if you click too high, you adjust the panning (the left and right stereo position) and if you click too low, you may collapse or select the track. Target the "Mono" or "Stereo" label (whatever your track happens to be) label, and then click and drag the track up or down to reposition it in your workspace.
|
||||
|
||||
### Apply amplification and noise reduction effects
|
||||
|
||||
Some tracks need the overall volume to be adjusted. I used the **Selection** tool to double-click and select the entire track (but you could also select a portion of a track). On the Menu bar, select **Effect > Amplify** to display a small dialog window. You can use the slider or enter a value to specify the amount of amplification. Negative numbers decrease the volume. If you try to increase the volume, you need to place a check in the **Allow Clipping** box. Then click OK.
|
||||
|
||||
I found that amplification is a bit tricky; it is easy to use too much or too little. Start by using small numbers to see the results. You can always use **Ctrl+Z** to undo your changes if you go too far in either direction.
|
||||
|
||||
Another effect I find useful is noise reduction. One of the tracks was recorded with a noticeable 60Hz hum, which is usually due to poor grounding of the microphone or recorder. Fortunately, there were only several seconds of hum and no other sound at the beginning of the recording.
|
||||
|
||||
Applying the noise reduction effect was a little confusing at first. First, I selected a few samples of the humming sound to tell Audacity what sound needed to be reduced, and then I navigated to **Effect > Noise Reduction**. This opens the **Noise Reduction** dialog. I clicked on the **Get Noise Profile** button in the Step 1 section of the dialog, which uses the selected sample as the basis for a set of filter presets. After it gathers the selected sample, though, the dialog disappeared (this is by design). I re-opened the dialog, used the slider to select the noise reduction level in decibels (I set it to 15dB and left the other sliders alone), and then clicked **OK**.
|
||||
|
||||
This worked well—you can hear the residual hum only if you know it is there. I need to experiment with this some more, but since the result was acceptable, so I did not play with the settings any further.
|
||||
|
||||
The reason the dialog box closes after getting a noise profile is actually for the sake of expediency. If you're processing many tracks or segments of audio, each with a different noise profile, you can open the **Noise Reduction** effect, get the current noise profile, and then select the audio you want to clean. You can then run the Noise Reduction filter using **Ctrl+R**, the keyboard shortcut for running the most recent filter. Instead of getting a new noise profile, however, Audacity uses the one you've just stored, and performs the filter instead. This way, you can get a sample with a few clicks but clean lots of audio with just one keyboard shortcut.
|
||||
|
||||
### And so much more
|
||||
|
||||
I have only worked with a few of the basics and have not even begun to scratch the surface of Audacity. I can already see that it has so many more features and tools that will enable me to create even more professional-sounding projects.
|
||||
|
||||
For example, in addition to working with existing audio files, Audacity can make recordings from line inputs, the desktop sound stream, and microphone inputs. It can do special effects like fade in and out and cross-fades. And I have not even tried to figure out what many of the other effects and tools are capable of.
|
||||
|
||||
I have a feeling I will need to learn more in the near future. Hopefully, this story of my very limited experience with Audacity will prompt you to check it out. For much more information, you can find the [Audacity manual][13] online.
|
||||
|
||||
Using Audacity, you can quickly clean up audio file so that any background noise becomes tolerable.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/audacity
|
||||
|
||||
作者:[David Both][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/dboth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes)
|
||||
[2]: https://www.redhat.com/sysadmin/
|
||||
[3]: https://www.audacityteam.org/
|
||||
[4]: https://opensource.com/article/17/12/using-sudo-delegate
|
||||
[5]: https://opensource.com/education/16/9/audacity-classroom
|
||||
[6]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linlame
|
||||
[7]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linff
|
||||
[8]: https://opensource.com/sites/default/files/uploads/audacity1_tracksloaded.png (Tracks loaded in Audacity)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/audacity2_tools.png (Audacity toolbox)
|
||||
[10]: https://opensource.com/sites/default/files/uploads/audacity3_audioclips.png (Audio clips in Audacity)
|
||||
[11]: https://opensource.com/sites/default/files/uploads/audacity4_edittoolbar.png (Audacity edit tools)
|
||||
[12]: https://opensource.com/sites/default/files/uploads/audacity5_trackmovement.png (Moving tracks in Audacity)
|
||||
[13]: https://manual.audacityteam.org/#
|
@ -0,0 +1,125 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Handle Automatic Updates in Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/auto-updates-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
How to Handle Automatic Updates in Ubuntu
|
||||
======
|
||||
|
||||
_**Brief: This tutorial teaches you how to handle the unattended upgrade i.e. the automatic system updates in Ubuntu Linux.**_
|
||||
|
||||
Sometimes, when you try to [shutdown your Ubuntu system][1], you may come across this screen that stops you from shutting down:
|
||||
|
||||
**Unattended-upgrade in progress during shutdown, please don’t turn off the computer.**
|
||||
|
||||
![Unattended Upgrade In Progress In Ubuntu][2]
|
||||
|
||||
You might wonder what is this “unattended upgrade” and how come it is running without your knowledge.
|
||||
|
||||
The reason is that [Ubuntu][3] takes your system’s security very seriously. By default, it automatically checks for system updates daily and if it finds any security updates, it downloads those updates and install them on its own. For normal system and application updates, it notifies you via the Software Updater tool.
|
||||
|
||||
Since all this happens in the background, you don’t even realize it until you try to shutdown your system or try to install applications on your own.
|
||||
|
||||
Trying to install a new software when these unattended upgrades are in progress leads to the famous [could not get lock error][4].
|
||||
|
||||
![][5]
|
||||
|
||||
As you can see, the automatic updates present a couple of minor annoyance. You may choose to disable the auto updates but that would mean that you’ll have to check and [update your Ubuntu system][6] manually all the time.
|
||||
|
||||
Do you really need to disable auto updates?
|
||||
|
||||
Please note that this is a security feature. Linux allows you to do practically everything in your system even disabling these security features.
|
||||
But in my opinion, as a regular user, _**you should not disable the automatic updates**_. It keeps your system safe after all.
|
||||
For the sake of your system’s security, you may tolerate the minor annoyances that come with the automatic updates.
|
||||
|
||||
Now that you have been warned and you think it is better to take up the additional task of manually updating your system, let’s see how to handle the auto updates.
|
||||
|
||||
As always, there are two ways to do it: GUI and command line. I’ll show you both methods.
|
||||
|
||||
I have used Ubuntu 20.04 here but the steps are valid for Ubuntu 18.04 and any other Ubuntu version.
|
||||
|
||||
### Method 1: Disable automatic updates in Ubuntu graphically
|
||||
|
||||
Go to the menu and look for ‘software & updates’ tool.
|
||||
|
||||
![Software & Updates Settings][7]
|
||||
|
||||
In here, go to Updates tab. Now look for the “Automatically check for updates”. By default it is set to Daily.
|
||||
|
||||
You can change it to Never and your system will never check for updates on its own again. And if it won’t check for updates, it won’t find new updates to install.
|
||||
|
||||
![Disable Auto Updates in Ubuntu Completely][8]
|
||||
|
||||
If you do this, you must manually update your system from time to time. But that’s an additional chore to do and you may not remember it all the time.
|
||||
|
||||
#### Slightly better way to handle auto updates in Ubuntu
|
||||
|
||||
Personally, I would suggest to let it check for updates on its own. If you don’t want it installing the updates automatically, you can change that behavior to get notified about the availability of security updates.
|
||||
|
||||
Keep “Automatically check for updates” to Daily and change “When there are security updates” option to “Display immediately” instead of “Download and install automatically”.
|
||||
|
||||
![Get notified for security updates instead of automatically installing them][9]
|
||||
|
||||
This way, it checks for updates and if there are updates, instead of installing them automatically in the background, the Software Updater tool notifies you that updates are available for your system. Your system already does that for normal system and software updates.
|
||||
|
||||
![Get notified about security updates][10]
|
||||
|
||||
With this setup, you won’t see the “unattended upgrades in progress” when you shutdown your system However, you may still encounter the ‘could not get lock’ error because two separate processes cannot use apt package manager at the same time.
|
||||
|
||||
I believe this is a better solution, don’t you you think?
|
||||
|
||||
As I promised both GUI and command line methods, let me show you how to disable unattended upgrades in the terminal.
|
||||
|
||||
### How to disable automatic updates in Ubuntu using command line
|
||||
|
||||
You’ll find the auto-upgrades settings in the **/etc/apt/apt.conf.d/20auto-upgrades** file. The default text editor in Ubuntu terminal is Nano so you can use this command to edit this configuration file:
|
||||
|
||||
```
|
||||
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
|
||||
```
|
||||
|
||||
Now, if you don’t want your system to check for updates automatically, you can change the value of APT::Periodic::Update-Package-Lists to 0.
|
||||
|
||||
```
|
||||
APT::Periodic::Update-Package-Lists "0";
|
||||
APT::Periodic::Unattended-Upgrade "0";
|
||||
```
|
||||
|
||||
If you want it to check for updates but don’t install the unattended-upgrades automatically, you can choose to set it like this:
|
||||
|
||||
```
|
||||
APT::Periodic::Update-Package-Lists "1";
|
||||
APT::Periodic::Unattended-Upgrade "0";
|
||||
```
|
||||
|
||||
**In the end…**
|
||||
|
||||
The automatic security updates are enabled automatically for a reason and I recommend you keep it like this. A couple of minor annoyances are not really worth risking the security of your system. What do you think?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/auto-updates-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/schedule-shutdown-ubuntu/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/unattended-upgrade-in-progress-in-ubuntu.png?ssl=1
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://itsfoss.com/could-not-get-lock-error/
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/Could_not_get_lock.jpg?ssl=1
|
||||
[6]: https://itsfoss.com/update-ubuntu/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updates-settings-ubuntu-20-04.jpg?ssl=1
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/disable-auto-updates-ubuntu.jpg?ssl=1
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/handle-auto-updates-ubuntu.jpg?ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/updates-available-ubuntu.png?ssl=1
|
Loading…
Reference in New Issue
Block a user