mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
Merge remote-tracking branch 'LCTT/master' into 20201005-Linux-Jargon-Buster--What-is-a-Package-Manager-in-Linux--How-Does-it-Work.md
This commit is contained in:
commit
0aa289c5f8
@ -1,22 +1,24 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12712-1.html)
|
||||
[#]: subject: (Drawing is an Open Source MS-Paint Type of App for Linux Desktop)
|
||||
[#]: via: (https://itsfoss.com/drawing-app/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Drawing 是一款开源的类似微软画图的 Linux 桌面应用
|
||||
Drawing:一款开源的类似微软画图的 Linux 桌面应用
|
||||
======
|
||||
|
||||
_**简介:Drawing 是一个基本的图像编辑器,就像微软画图一样。有了这个开源的应用,你可以画箭头、线条、几何图形、添加颜色和其他你期望在普通绘图应用程序中做的事情。**_
|
||||
![](https://img.linux.net.cn/data/attachment/album/202010/12/231731q0pgrkzidsguosps.jpg)
|
||||
|
||||
> Drawing 是一个基本的图像编辑器,就像微软画图一样。有了这个开源的应用,你可以画箭头、线条、几何图形、添加颜色和其他你期望在普通绘图应用程序中做的事情。
|
||||
|
||||
### Drawing: 一个简单的 Linux 绘图应用
|
||||
|
||||
![][1]
|
||||
|
||||
对于从 Windows XP (或更早版本)开始使用电脑的人来说,微软画图是一个有趣的随机画一些草图的应用。在这个被 Photoshop 和 GIMP 主导的世界里,画图应用仍然具有一定的现实意义。
|
||||
对于从 Windows XP (或更早版本)开始使用电脑的人来说,微软<ruby>画图<rt>Paint</rt></ruby>是一个有趣的应用,是个可以随便画一些草图的应用。在这个被 Photoshop 和 GIMP 主导的世界里,画图应用仍然具有一定的现实意义。
|
||||
|
||||
有几个[可用于 Linux 的绘画应用][2],我打算在这个列表中再添加一个。
|
||||
|
||||
@ -29,34 +31,32 @@ _**简介:Drawing 是一个基本的图像编辑器,就像微软画图一样
|
||||
Drawing 拥有你所期待的绘图应用的所有功能。你可以:
|
||||
|
||||
* 从头开始创建新的绘图
|
||||
* 编辑现有的 PNG、JPEG 或 BMP 图像文件。
|
||||
* 添加几何图形、线条、箭头等。
|
||||
* 编辑现有的 PNG、JPEG 或 BMP 图像文件
|
||||
* 添加几何图形、线条、箭头等
|
||||
* 虚线
|
||||
* 使用铅笔工具进行自由手绘。
|
||||
* 使用铅笔工具进行自由手绘
|
||||
* 使用曲线和形状工具
|
||||
* 裁剪图像
|
||||
* 缩放图像到不同的像素大小
|
||||
* 添加文本
|
||||
* 选择图像的一部分(矩形、自由选择和颜色选择)。
|
||||
* 选择图像的一部分(矩形、自由选择和颜色选择)
|
||||
* 旋转图像
|
||||
* 添加复制到剪贴板的图像
|
||||
* 可在偏好中使用橡皮擦、荧光笔、油漆桶、颜色选择、颜色选择器工具
|
||||
* 无限撤销
|
||||
* 滤镜可以增加模糊、像素化、透明度等。
|
||||
|
||||
|
||||
* 滤镜可以增加模糊、像素化、透明度等
|
||||
|
||||
### 我使用 Drawing 的经验
|
||||
|
||||
![][5]
|
||||
|
||||
这个应用是新的,并且有不错的用户界面。它具有你期望在标准绘画应用中找到的所有基本功能。
|
||||
这个应用是新出现的,并且有不错的用户界面。它具有你期望在标准的绘画应用中找到的所有基本功能。
|
||||
|
||||
它有一些额外的工具,如颜色选择和颜色选择器,但在使用时可能会混淆。没有可用的文档来描述这些工具的使用,要全靠你自己。
|
||||
它有一些额外的工具,如颜色选择和拾色器,但在使用时可能会混淆。没有什么文档描述这些工具的使用,要全靠你自己摸索。
|
||||
|
||||
它的体验很流畅,我觉得这个工具很有潜力取代 Shutter 作为图像编辑工具(是的,我[用 Shutter 编辑截图][6])。
|
||||
它的体验很流畅,作为图像编辑工具,我觉得这个工具很有潜力取代 Shutter (是的,我[用 Shutter 编辑截图][6])。
|
||||
|
||||
我觉得最麻烦的是,添加元素后无法编辑/修改。你有撤消和重做选项,但如果你想修改一个你在 12 步前添加的文本,你就必须重做所有的步骤。这一点开发者可能会在未来的版本中进行研究。
|
||||
我觉得最麻烦的是,添加元素后无法编辑/修改。你有撤消和重做选项,但如果你想修改一个你在 12 步前添加的文本,你就必须重做所有的步骤。这是未来的版本中开发者可能要做的一些改进。
|
||||
|
||||
### 在 Linux 上安装 Drawing
|
||||
|
||||
@ -89,9 +89,9 @@ sudo add-apt-repository -r ppa:cartes/drawing
|
||||
|
||||
检查你的发行版的包管理器中是否有 Drawing,然后在那里安装。如果你想要最新的版本,你可以使用 Flatpak 版本的应用。
|
||||
|
||||
[Drawing Flatpak][9]
|
||||
- [Drawing Flatpak][9]
|
||||
|
||||
**总结**
|
||||
### 总结
|
||||
|
||||
你还在用画图应用么?你用的是哪一款?如果你已经尝试过 Drawing,你的体验如何?
|
||||
|
||||
@ -102,7 +102,7 @@ via: https://itsfoss.com/drawing-app/
|
||||
作者:[Abhishek Prakash][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/) 荣誉推出
|
||||
|
@ -0,0 +1,133 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Jargon Buster: What is FOSS (Free and Open Source Software)? What is Open Source?)
|
||||
[#]: via: (https://itsfoss.com/what-is-foss/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Linux Jargon Buster: What is FOSS (Free and Open Source Software)? What is Open Source?
|
||||
======
|
||||
|
||||
What does FOSS in It’s FOSS mean? What is FOSS?
|
||||
|
||||
I have been asked this question numerous time in the past. It was about time that I explained what is FOSS in Linux and the software world.
|
||||
|
||||
The distinction is important because FOSS is a generic world and it could mean different depending on the context. Here, I am discussing the FOSS principle in software.
|
||||
|
||||
### What is FOSS?
|
||||
|
||||
FOSS means Free and Open Source Software. It doesn’t mean software is free of cost. It means that source code of the software is open for all and anyone is free to use, study and modify the code. This principle allows other people to contribute to the development and improvement of a software like a community.
|
||||
|
||||
#### The origin of FOSS
|
||||
|
||||
In the 60s and 70s, computers were hardware focused and the hardware were expensive. They were mainly used by academics in universities or researchers in labs. The limited amount of software used to come for free or with their source code and the users were allowed to modify the source code to suit their need.
|
||||
|
||||
In the late 70s and early 80s, the manufacturer’s stopped distributing source code in an attempt to not let their software run on their competitor’s computers.
|
||||
|
||||
This restrictive licensing led to the inconvenience and dislike of peoplewho were used to and fond of modifying software. In the mid 80s, Richard Stallman started the Free Software Movement.
|
||||
|
||||
[Stallman specified four essential fundamental freedom][1] for a software to be Free and Open Source Software.
|
||||
|
||||
![Free Software Freedoms][2]
|
||||
|
||||
I am rephrasing them for easier understanding:
|
||||
|
||||
* Any user should be able to run the software for any purpose.
|
||||
* User should be free to see the source code of the software and if need be, user should be allowed to modify the code as well.
|
||||
* User should be free to distribute the copies of the software to others.
|
||||
* If a user modified the code, she/he should be free to distribute the modified code to others. The modified code must have the source code open.
|
||||
|
||||
|
||||
|
||||
If interested, I would advise reading this article on the [history of FOSS][3].
|
||||
|
||||
### Free in Free and Open Source Software DOES NOT mean free of cost
|
||||
|
||||
![][4]
|
||||
|
||||
As you may have noticed, the ‘free’ in Free and Open Source Software doesn’t mean it is free of cost. It means freedom to run, modify and distribute the software.
|
||||
|
||||
People often wrongly think that FOSS or Open Source software cannot have a price tag. This is not correct.
|
||||
|
||||
Most Free and Open Source Software are available free of cost because of a number of reasons:
|
||||
|
||||
* The source code is already available to public so some developers see no point in putting a price tag on the downloads.
|
||||
* Some projects are contributed by a number of volunteers for free. So, the main developer(s) find it unethical to charge for something that has been contributed freely by so many people.
|
||||
* Some projects are supported and/or developed by bigger corporate or non-profit organizations who employ developers to work on their open source projects.
|
||||
* Some developers create open source projects as hobby or out of their passion for contributing to the world with their code. Things like number of downloads, contributions and words of appreciations matter more than money for them.
|
||||
|
||||
|
||||
|
||||
To avoid the emphasis on ‘free’ some people use the term FLOSS. FLOSS stands for Free and Libre Open Source Software. The world libre (meaning freedom) is different than gartuit/gratis (free of cost).
|
||||
|
||||
> Free as in free speech, not free as in free beer.
|
||||
|
||||
### How do FOSS projects make money?
|
||||
|
||||
It is a myth that open source projects don’t make money. Red Hat was the first open source company to reach the billion dollars mark. [IBM bought Red Hat for $34 billion][5]. There are many such examples.
|
||||
|
||||
Many open source projects, specially the ones in the enterprise sectors, offer support and enterprise oriented features for a fee. This is main business model for Red Hat, SUSE Linux and more such projects.
|
||||
|
||||
Some open source projects like Discourse, WordPress offer hosted instance of their software for a premium fee.
|
||||
|
||||
Many open source projects, specially the desktop applications, rely on donations. VLC, GIMP, Inkscape and other such open source software fell in this category. There are [ways to fund open-source programs][6] but usually, you’ll find donation links on project websites.
|
||||
|
||||
Making money with open source software may be difficult but it is not entirely impossible.
|
||||
|
||||
### But I am not a programmer. Why should I care if a software is open source or not?
|
||||
|
||||
This is a valid question. You are not a software developer, just a regular computer user. Even if the source code of the software is available, you won’t understand how the program works.
|
||||
|
||||
That’s fine. You won’t understand it but someone with the necessary skill sets will and that’s what matter.
|
||||
|
||||
Think of this way. Perhaps you won’t understand a complicated legal document. But if you have the freedom to look at the document and keep a copy of it, you can consult someone who can check the document for legal pitfalls.
|
||||
|
||||
In other words, open source software has transparency.
|
||||
|
||||
### What is the difference between FOSS and Open Source?
|
||||
|
||||
![][7]
|
||||
|
||||
You’ll often come across terms FOSS and open source. They are often used interchangeably.
|
||||
|
||||
Are they the same thing? It is difficult to answer in yes and no.
|
||||
|
||||
You see, the term ‘free’ in FOSS is confusing for many as people incorrectly assume that it as free of cost. Enterprise executives, higher ups and decision makers tend to focus on ‘free’ in Free and Open Source. Since they are business people focused on making money for their company, the term ‘free’ works as deterrence in adopting the FOSS principles.
|
||||
|
||||
This is why a new organization named [Open Source Initiative][8] was created in the mid 90s. They removed the ‘Free’ from Free and Open Source Software and created their own [definition of open source][9]. and their own set of licenses.
|
||||
|
||||
The term ‘open source’ got quite popular specially in the software industry. The executives are more comfortable with Open Source. The adoption of open source grew rapidly and I believe removal of ‘free’ term did play a role here.
|
||||
|
||||
**Got questions?**
|
||||
|
||||
This As I explained in the article [what is Linux Distribution][10], the FOSS/open source concept played a big role in the development and popularity of Linux.
|
||||
|
||||
I tried to explain the concept of FOSS and open source in simpler terms in this jargon buster article. I have tried to avoid going too much in detail or technical accuracies.
|
||||
|
||||
I do hope you have a better understanding of this topic now. If you have got questions or suggestions, feel free to leave a comment and continue the discussion there.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/what-is-foss/
|
||||
|
||||
作者:[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://www.gnu.org/philosophy/free-sw.html
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/foss-freedoms.jpg?resize=800%2C671&ssl=1
|
||||
[3]: https://itsfoss.com/history-of-foss/
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/think-free-speech-not-free-beer.jpg?resize=800%2C800&ssl=1
|
||||
[5]: https://itsfoss.com/ibm-red-hat-acquisition/
|
||||
[6]: https://itsfoss.com/open-source-funding-platforms/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/what-is-foss.png?resize=800%2C450&ssl=1
|
||||
[8]: https://opensource.org/
|
||||
[9]: https://opensource.org/osd
|
||||
[10]: https://itsfoss.com/what-is-linux-distribution/
|
430
sources/tech/20180503 Go on very small hardware (Part 3).md
Normal file
430
sources/tech/20180503 Go on very small hardware (Part 3).md
Normal file
@ -0,0 +1,430 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Go on very small hardware (Part 3))
|
||||
[#]: via: (https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html)
|
||||
[#]: author: (Michał Derkacz )
|
||||
|
||||
Go on very small hardware (Part 3)
|
||||
======
|
||||
[![STM32F030F4P6][1]][2]
|
||||
|
||||
Most of the examples discussed in the [first][3] and [second][4] part of this series are blinking LEDs in one or another way. It may have been interesting at first, but after a while it has become a bit boring. Let’s do something more entertaining…
|
||||
|
||||
…let’s light more LEDs!
|
||||
|
||||
### WS281x LEDs
|
||||
|
||||
The [WS281x][5] RGB LEDs (and their clones) are very popular. You can buy them as single elements, chained into long strips or assembled into matrices, rings or other form-factors.
|
||||
|
||||
![WS2812B][6]
|
||||
|
||||
They can be connected in series and thanks to this fact, you can control a long LED strip with only single pin of your MCU. Unfortunately, the phisical protocol used by their internal controller doesn’t fit straight into any peripheral you can find in a MCU. You have to use bit-banging or use available peripherals in unusual way.
|
||||
|
||||
Which of the available solutions is the most efficient depends on the number of LED strips controlled at the same time. If you have to drive 4 to 16 strips the most efficient way is to [use timers and DMA][7] (don’t overlook the links at the end of Martin’s article).
|
||||
|
||||
If you have to control only one or two strips, use the available SPI or UART peripherals. In case of SPI you can encode only two WS281x bits in one byte sent. UART allows more dense coding thanks to clever use of the start and stop bits: 3 bits per one byte sent.
|
||||
|
||||
The best explanation of how the UART protocol fits into WS281x protocol I found on [this site][8]. If you don’t know Polish, here is the [English translation][9].
|
||||
|
||||
The WS281x based LEDs are still the most popular but there are also SPI controlled LEDs on the market: [APA102][10], [SK9822][11]. Three interesting articles about them: [1][12], [2][13], [3][14].
|
||||
|
||||
### LED ring
|
||||
|
||||
There are many WS2812 based rings on the marker. I have this one:
|
||||
|
||||
![WS2812B][15]
|
||||
|
||||
It has 24 individually addressable RGB LEDs (WS2812B) and exposes four terminals: GND, 5V, DI and DO. You can chain more rings or other WS2812 based things by connecting DI (data in) terminal to the DO (data out) terminal of the previous one.
|
||||
|
||||
Let’s connect this ring to our STM32F030 board. We will use the UART based driver so the DI should be connected to the TXD pin on the UART header. The WS2812B LED requires a power supply with at least 3.5V. 24 LEDs can consume quite a lot of current, so during the programming/debuggin it’s best to connect the GND and 5V terminals on the ring directly to the GND and 5V pins available on ST-LINK programmer:
|
||||
|
||||
![WS2812B][16]
|
||||
|
||||
Our STM32F030F4P6 MCU and the whole STM32 F0, F3, F7, L4 families have one important thing that the F1, F4, L1 MCUs don’t have: it allows to invert the UART signals and therefore we can connect the ring directly to the UART TXD pin. If you don’t known that we need such inversion you probably didn’t read the [article][9] I mentioned above.
|
||||
|
||||
So you can’t use the popular [Blue Pill][17] or the [STM32F4-DISCOVERY][18] this way. Use their SPI peripheral or an external inverter. See the [Christmas Tree Lights][19] project as an example of UART+inverter or the [WS2812 example][20] for NUCLEO-F411RE that uses SPI.
|
||||
|
||||
By the way, probably the most of DISCOVERY boards have one more problem: they work with VDD = 3V instead of 3.3V. The WS281x requires at least the supply voltage * 0.7 for DI high. This is 3.5V in case of 5V supply and 3.3V in case of 4.7V you can find on the 5V pins of the DISCOVERY. As you can see, even in our case the first LED works 0.2V below spec. In case of DISCOVERY it will work 0.3V bellow spec if powered 4.7V and 0.5V bellow spec if powered 5V.
|
||||
|
||||
Let’s finish this lengthy introduction and go to the code:
|
||||
|
||||
```
|
||||
package main
|
||||
|
||||
import (
|
||||
"delay"
|
||||
"math/rand"
|
||||
"rtos"
|
||||
|
||||
"led"
|
||||
"led/ws281x/wsuart"
|
||||
|
||||
"stm32/hal/dma"
|
||||
"stm32/hal/gpio"
|
||||
"stm32/hal/irq"
|
||||
"stm32/hal/system"
|
||||
"stm32/hal/system/timer/systick"
|
||||
"stm32/hal/usart"
|
||||
)
|
||||
|
||||
var tts *usart.Driver
|
||||
|
||||
func init() {
|
||||
system.SetupPLL(8, 1, 48/8)
|
||||
systick.Setup(2e6)
|
||||
|
||||
gpio.A.EnableClock(true)
|
||||
tx := gpio.A.Pin(9)
|
||||
|
||||
tx.Setup(&gpio.Config{Mode: gpio.Alt})
|
||||
tx.SetAltFunc(gpio.USART1_AF1)
|
||||
|
||||
d := dma.DMA1
|
||||
d.EnableClock(true)
|
||||
|
||||
tts = usart.NewDriver(usart.USART1, d.Channel(2, 0), nil, nil)
|
||||
tts.Periph().EnableClock(true)
|
||||
tts.Periph().SetBaudRate(3000000000 / 1390)
|
||||
tts.Periph().SetConf2(usart.TxInv)
|
||||
tts.Periph().Enable()
|
||||
tts.EnableTx()
|
||||
|
||||
rtos.IRQ(irq.USART1).Enable()
|
||||
rtos.IRQ(irq.DMA1_Channel2_3).Enable()
|
||||
}
|
||||
|
||||
func main() {
|
||||
var rnd rand.XorShift64
|
||||
rnd.Seed(1)
|
||||
rgb := wsuart.GRB
|
||||
strip := wsuart.Make(24)
|
||||
black := rgb.Pixel(0)
|
||||
for {
|
||||
c := led.Color(rnd.Uint32()).Scale(127)
|
||||
pixel := rgb.Pixel(c)
|
||||
for i := range strip {
|
||||
strip[i] = pixel
|
||||
tts.Write(strip.Bytes())
|
||||
delay.Millisec(40)
|
||||
}
|
||||
for i := range strip {
|
||||
strip[i] = black
|
||||
tts.Write(strip.Bytes())
|
||||
delay.Millisec(20)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func ttsISR() {
|
||||
tts.ISR()
|
||||
}
|
||||
|
||||
func ttsDMAISR() {
|
||||
tts.TxDMAISR()
|
||||
}
|
||||
|
||||
//c:__attribute__((section(".ISRs")))
|
||||
var ISRs = [...]func(){
|
||||
irq.USART1: ttsISR,
|
||||
irq.DMA1_Channel2_3: ttsDMAISR,
|
||||
}
|
||||
```
|
||||
|
||||
##### The import section
|
||||
|
||||
The new things in the import section compared to the previous examples are the rand/math package and led package with its led/ws281x subtree. The led package itself contains definition of Color type. The led/ws281x/wsuart defines the ColorOrder, Pixel and Strip types.
|
||||
|
||||
I was wondering about using the Color or RGBA type from image/color and about defining the Strip in the way that it will implement image.Image interface but because of using a [gamma correction][21] and the big overhead of image/draw package I ended with simple:
|
||||
|
||||
```
|
||||
type Color uint32
|
||||
type Strip []Pixel
|
||||
```
|
||||
|
||||
with a few useful methods. However, this can change in the future.
|
||||
|
||||
##### The init function
|
||||
|
||||
There aren’t so much novelties in the init function. The UART baud rate was changed from 115200 to 3000000000/1390 ≈ 2158273 which corresponds to 1390 nanoseconds per WS2812 bit. The TxInv bit in CR2 register is set to invert TXD signal.
|
||||
|
||||
##### The main function
|
||||
|
||||
The XorShift64 pseudorandom number generator is used to generate random colors. [XORSHIFT][22] is currently the only algorithm implemented by math/rand package. You have to explicitly initialize it using its Seed method with nonzero argument.
|
||||
|
||||
The rgb variable is of type wsuart.ColorOrder and is set to the GRB color order used by WS2812 (WS2811 uses RGB order). It’s then used to translate colors to pixels.
|
||||
|
||||
The `wsuart.Make(24)` creates initialized strip of 24 pixels. It is equivalent of:
|
||||
|
||||
```
|
||||
strip := make(wsuart.Strip, 24)
|
||||
strip.Clear()
|
||||
```
|
||||
|
||||
The rest of the code uses random colors to draw something similar to “Please Wait…” spinner.
|
||||
|
||||
The strip slice acts as a framebuffer. The `tts.Write(strip.Bytes())` sends the content of the framebuffer to the ring.
|
||||
|
||||
##### Interrupts
|
||||
|
||||
The program is ened with the code that handles interrupts, the same as in the previous [UART example][23].
|
||||
|
||||
Let’s compile it and run:
|
||||
|
||||
```
|
||||
$ egc
|
||||
$ arm-none-eabi-size cortexm0.elf
|
||||
text data bss dec hex filename
|
||||
14088 240 204 14532 38c4 cortexm0.elf
|
||||
$ openocd -d0 -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; program cortexm0.elf; reset run; exit'
|
||||
```
|
||||
|
||||
I’ve skipped the openocd output. The video bellow shows how this program works:
|
||||
|
||||
Sorry, your browser doesn't support embedded videos.
|
||||
|
||||
### Let’s do something useful…
|
||||
|
||||
At the beginning of the [first part][3] I’ve asked: “How low we can Go and still do something useful?”. Our MCU is actually a low-end device (8-bitters will probably disagree with me) but we haven’t done anything useful so far.
|
||||
|
||||
So… Let’s do something useful… Let’s make a Clock!
|
||||
|
||||
There are many examples of clocks built of RGB LEDs on the Internet. Let’s make our own using our little board and RGB ring. We change the previous code as described below.
|
||||
|
||||
##### The import section
|
||||
|
||||
Remove the math/rand package and add stm32/hal/exti.
|
||||
|
||||
##### Global variables
|
||||
|
||||
Add two new global variables: btn and btnev:
|
||||
|
||||
```
|
||||
var (
|
||||
tts *usart.Driver
|
||||
btn gpio.Pin
|
||||
btnev rtos.EventFlag
|
||||
)
|
||||
```
|
||||
|
||||
They will be used to handle the “button” that will be used to set our clock. Our board has no button except reset, but somehow we can manage without it.
|
||||
|
||||
##### The init function
|
||||
|
||||
Add this code to the init function:
|
||||
|
||||
```
|
||||
btn = gpio.A.Pin(4)
|
||||
|
||||
btn.Setup(&gpio.Config{Mode: gpio.In, Pull: gpio.PullUp})
|
||||
ei := exti.Lines(btn.Mask())
|
||||
ei.Connect(btn.Port())
|
||||
ei.EnableFallTrig()
|
||||
ei.EnableRiseTrig()
|
||||
ei.EnableIRQ()
|
||||
|
||||
rtos.IRQ(irq.EXTI4_15).Enable()
|
||||
```
|
||||
|
||||
The PA4 pin is configured as input with the internal pull-up resistor enabled. It’s connected to the onboard LED but that doesn’t hinder anything. More important is that it’s located next to the GND pin so we can use any metal object to simulate the button and set the clock. As a bonus we have additional feedback from the onboard LED.
|
||||
|
||||
We use the EXTI peripheral to track the PA4 state. It’s configured to generate an interrupt on any change.
|
||||
|
||||
##### The btnWait function
|
||||
|
||||
Define a new auxiliary function:
|
||||
|
||||
```
|
||||
func btnWait(state int, deadline int64) bool {
|
||||
for btn.Load() != state {
|
||||
if !btnev.Wait(1, deadline) {
|
||||
return false // timeout
|
||||
}
|
||||
btnev.Reset(0)
|
||||
}
|
||||
delay.Millisec(50) // debouncing
|
||||
return true
|
||||
}
|
||||
```
|
||||
|
||||
It waits for the specified state on the “button” pin, but only until the deadline occurs. This is slightly improved polling code:
|
||||
|
||||
```
|
||||
for btn.Load() != state {
|
||||
if rtos.Nanosec() >= deadline {
|
||||
// timeout
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Our btnWait function, instead of busy waiting for state or deadline, uses the btnev variable of type rtos.EventFlag to sleep until something will happen. You can of course use a channel instead of rtos.EventFlag but the latter one is much cheaper.
|
||||
|
||||
##### The main function
|
||||
|
||||
We need completly new main function:
|
||||
|
||||
```
|
||||
func main() {
|
||||
rgb := wsuart.GRB
|
||||
strip := wsuart.Make(24)
|
||||
ds := 4 * 60 / len(strip) // Interval between LEDs (quarter-seconds).
|
||||
adjust := 0
|
||||
adjspeed := ds
|
||||
for {
|
||||
qs := int(rtos.Nanosec() / 25e7) // Quarter-seconds since reset.
|
||||
qa := qs + adjust
|
||||
|
||||
qa %= 12 * 3600 * 4 // Quarter-seconds since 0:00 or 12:00.
|
||||
hi := len(strip) * qa / (12 * 3600 * 4)
|
||||
|
||||
qa %= 3600 * 4 // Quarter-seconds in the current hour.
|
||||
mi := len(strip) * qa / (3600 * 4)
|
||||
|
||||
qa %= 60 * 4 // Quarter-seconds in the current minute.
|
||||
si := len(strip) * qa / (60 * 4)
|
||||
|
||||
hc := led.Color(0x550000)
|
||||
mc := led.Color(0x005500)
|
||||
sc := led.Color(0x000055)
|
||||
|
||||
// Blend the colors if the hands of the clock overlap.
|
||||
if hi == mi {
|
||||
hc |= mc
|
||||
mc = hc
|
||||
}
|
||||
if mi == si {
|
||||
mc |= sc
|
||||
sc = mc
|
||||
}
|
||||
if si == hi {
|
||||
sc |= hc
|
||||
hc = sc
|
||||
}
|
||||
|
||||
// Draw the clock and write to the ring.
|
||||
strip.Clear()
|
||||
strip[hi] = rgb.Pixel(hc)
|
||||
strip[mi] = rgb.Pixel(mc)
|
||||
strip[si] = rgb.Pixel(sc)
|
||||
tts.Write(strip.Bytes())
|
||||
|
||||
// Sleep until the button pressed or the second hand should be moved.
|
||||
if btnWait(0, int64(qs+ds)*25e7) {
|
||||
adjust += adjspeed
|
||||
// Sleep until the button is released or timeout.
|
||||
if !btnWait(1, rtos.Nanosec()+100e6) {
|
||||
if adjspeed < 5*60*4 {
|
||||
adjspeed += 2 * ds
|
||||
}
|
||||
continue
|
||||
}
|
||||
adjspeed = ds
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
We use the rtos.Nanosec function instead of time.Now to obtain the current time. This saves much of Flash but also reduces our clock to antique device that has no idea about days, months and years and worst of all it doesn’t handle daylight saving changes.
|
||||
|
||||
Our ring has 24 LEDs, so the second hand can be presented with the accuracy of 2.5s. To don’t sacrifice this accuracy and get smooth operation we use quarter-second as base interval. Half-second would be enough but quarter-second is more accurate and works also well with 16 and 48 LEDs.
|
||||
|
||||
The red, green and blue colors are used respectively for hour, minute and second hands. This allows us to use simple logical or operation for color blending. We have the Color.Blend method that can blend arbitrary colors but we’re low of Flash so we prefer simplest possible solution.
|
||||
|
||||
We redraw the clock only when the second hand moved. The:
|
||||
|
||||
```
|
||||
btnWait(0, int64(qs+ds)*25e7)
|
||||
```
|
||||
|
||||
is waiting for exactly that moment or for the press of the button.
|
||||
|
||||
Every press of the button adjust the clock forward. There is an acceleration when the button is held down for some time.
|
||||
|
||||
##### Interrupts
|
||||
|
||||
Define new interrupt handler:
|
||||
|
||||
```
|
||||
func exti4_15ISR() {
|
||||
pending := exti.Pending() & 0xFFF0
|
||||
pending.ClearPending()
|
||||
if pending&exti.Lines(btn.Mask()) != 0 {
|
||||
btnev.Signal(1)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
and add `irq.EXTI4_15: exti4_15ISR,` entry to the ISRs array.
|
||||
|
||||
This handler (or Interrupt Service Routine) handles EXTI4_15 IRQ. The Cortex-M0 CPU supports significantly fewer IRQs than its bigger brothers, so you can often see that one IRQ is shared by multiple interrupt sources. In our case one IRQ is shared by 12 EXTI lines.
|
||||
|
||||
The exti4_15ISR reads all pending bits and selects 12 more significant of them. Next it clears the seleced bits in EXTI and starts to handle them. In our case only bit 4 is checked. The `btnev.Signal(1)` causes that the `btnev.Wait(1, deadline)` wakes up and returns true.
|
||||
|
||||
You can find the complete code on [Github][24]. Let’s compile it:
|
||||
|
||||
```
|
||||
$ egc
|
||||
$ arm-none-eabi-size cortexm0.elf
|
||||
text data bss dec hex filename
|
||||
15960 240 216 16416 4020 cortexm0.elf
|
||||
```
|
||||
|
||||
There are only 184 bytes for any iprovements. Let’s rebuild everything one more time but this time without any type and field names in typeinfo:
|
||||
|
||||
```
|
||||
$ cd $HOME/emgo
|
||||
$ ./clean.sh
|
||||
$ cd $HOME/firstemgo
|
||||
$ egc -nf -nt
|
||||
$ arm-none-eabi-size cortexm0.elf
|
||||
text data bss dec hex filename
|
||||
15120 240 216 15576 3cd8 cortexm0.elf
|
||||
```
|
||||
|
||||
Now, with a kilobyte of free space you can improve something. Let’s see how it works:
|
||||
|
||||
Sorry, your browser doesn't support embedded videos.
|
||||
|
||||
I don’t know how I managed to hit exactly 3:00 !?
|
||||
|
||||
That’s all Folks! In the part 4 (ending this series) we’ll try to display something on a LCD.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html
|
||||
|
||||
作者:[-;Michał Derkacz][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://ziutek.github.io
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://ziutek.github.io/images/mcu/f030-demo-board/board.jpg
|
||||
[2]: https://ziutek.github.io/2018/05/03/go_on_very_small_hardware3.html
|
||||
[3]: https://ziutek.github.io/2018/03/30/go_on_very_small_hardware.html
|
||||
[4]: https://ziutek.github.io/2018/04/14/go_on_very_small_hardware2.html
|
||||
[5]: http://www.world-semi.com/solution/list-4-1.html
|
||||
[6]: https://ziutek.github.io/images/led/ws2812b.jpg
|
||||
[7]: http://www.martinhubacek.cz/arm/improved-stm32-ws2812b-library
|
||||
[8]: http://mikrokontrolery.blogspot.com/2011/03/Diody-WS2812B-sterowanie-XMega-cz-2.html
|
||||
[9]: https://translate.google.pl/translate?sl=pl&tl=en&u=http://mikrokontrolery.blogspot.com/2011/03/Diody-WS2812B-sterowanie-XMega-cz-2.html
|
||||
[10]: http://neon-world.com/en/product.php
|
||||
[11]: http://www.normandled.com/index.php/Product/view/id/800.html
|
||||
[12]: https://cpldcpu.wordpress.com/2014/08/27/apa102/
|
||||
[13]: https://cpldcpu.wordpress.com/2014/11/30/understanding-the-apa102-superled/
|
||||
[14]: https://cpldcpu.wordpress.com/2016/12/13/sk9822-a-clone-of-the-apa102/
|
||||
[15]: https://ziutek.github.io/images/led/rgbring.jpg
|
||||
[16]: https://ziutek.github.io/images/led/ring-stlink-f030.jpg
|
||||
[17]: https://jeelabs.org/article/1649a/
|
||||
[18]: http://www.st.com/en/evaluation-tools/stm32f4discovery.html
|
||||
[19]: https://github.com/ziutek/emgo/tree/master/egpath/src/stm32/examples/minidev/treelights
|
||||
[20]: https://github.com/ziutek/emgo/tree/master/egpath/src/stm32/examples/nucleo-f411re/ws2812
|
||||
[21]: https://en.wikipedia.org/wiki/Gamma_correction
|
||||
[22]: https://en.wikipedia.org/wiki/Xorshift
|
||||
[23]: https://ziutek.github.io/2018/04/14/go_on_very_small_hardware2.html#uart
|
||||
[24]: https://github.com/ziutek/emgo/tree/master/egpath/src/stm32/examples/f030-demo-board/ws2812-clock
|
@ -1,104 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Present Slides in Linux Terminal With This Nifty Python Tool)
|
||||
[#]: via: (https://itsfoss.com/presentation-linux-terminal/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Present Slides in Linux Terminal With This Nifty Python Tool
|
||||
======
|
||||
|
||||
Presentations are often boring. This is why some people add animation or comics/meme to add some humor and style to break the monotony.
|
||||
|
||||
If you have to add some unique style to your college or company presentation, how about using the Linux terminal? Imagine how cool it would be!
|
||||
|
||||
### Present: Do Your Presentation in Linux Terminal
|
||||
|
||||
There are so many amusing and [fun stuff you can do in the terminal][1]. Making and presenting slides is just one of them.
|
||||
|
||||
Python based application named [Present][2] lets you create markdown and YML based slides that you can present in your college or company and amuse people in the true geek style.
|
||||
|
||||
I have made a video showing what it would look like to present something in the Linux terminal with Present.
|
||||
|
||||
[Subscribe to our YouTube channel for more Linux videos][3]
|
||||
|
||||
#### Features of Present
|
||||
|
||||
You can do the following things with Present:
|
||||
|
||||
* Use markdown syntax for adding text to the slides
|
||||
* Control the slides with arrow or PgUp/Down keys
|
||||
* Change the foreground and background colors
|
||||
* Add images to the slides
|
||||
* Add code blocks
|
||||
* Play a simulation of code and output with codio YML files
|
||||
|
||||
|
||||
|
||||
#### Installing Present on Linux
|
||||
|
||||
Present is a Python based tool and you can use PIP to install it. You should make sure to [install Pip on Ubuntu][4] with this command:
|
||||
|
||||
```
|
||||
sudo apt install python3-pip
|
||||
```
|
||||
|
||||
If you are using some other distributions, please check your package manager to install PIP3.
|
||||
|
||||
Once you have PIP installed, you can install Present system wide in this manner:
|
||||
|
||||
```
|
||||
sudo pip3 install present
|
||||
```
|
||||
|
||||
You may also install it for only the current user but then you’ll also have to add ~/.local/bin to your PATH.
|
||||
|
||||
#### Using Present to create and present slides in Linux terminal
|
||||
|
||||
![][5]
|
||||
|
||||
Since Present utilizes markdown syntax, you should be aware of it to create your own slides. Using a [markdown editor][6] will be helpful here.
|
||||
|
||||
Present needs a markdown file to read and play the slides. You may [download this sample slide][7] but you need to download the embed image separately and put it inside image folder.
|
||||
|
||||
* Separate slides using — in your markdown file.
|
||||
* Use markdown syntax for adding text to the slides.
|
||||
* Add images with this syntax: ![RC] (images/name.png).
|
||||
* Change slide colors by adding syntax like <!– fg=white bg=red –>.
|
||||
* Add a slide with effects using syntax like <!– effect=fireworks –>.
|
||||
* Use [codio syntax][8] to add a code running simulation.
|
||||
* Quit the presentation using q and control the slides with left/right arrow or PgUp/Down keys.
|
||||
|
||||
|
||||
|
||||
Keep in mind that resizing the terminal window while running the presentation will mess things up and so does pressing enter key.
|
||||
|
||||
**Conclusion**
|
||||
|
||||
If you are familiar with Markdown and the terminal, using Present won’t be difficult for you.
|
||||
|
||||
You cannot compare it to regular presentation slides made with Impress, MS Office etc but it is a cool tool to occasionally use it. If you are a computer science/networking student or work as a developer or sysadmin, your colleagues will surely find this amusing.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/presentation-linux-terminal/
|
||||
|
||||
作者:[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/funny-linux-commands/
|
||||
[2]: https://github.com/vinayak-mehta/present
|
||||
[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[4]: https://itsfoss.com/install-pip-ubuntu/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/presentation-in-linux-terminal.png?resize=800%2C494&ssl=1
|
||||
[6]: https://itsfoss.com/best-markdown-editors-linux/
|
||||
[7]: https://github.com/vinayak-mehta/present/blob/master/examples/sample.md
|
||||
[8]: https://present.readthedocs.io/en/latest/codio.html
|
@ -1,110 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Jargon Buster: What is a Package Manager in Linux? How Does it Work?)
|
||||
[#]: via: (https://itsfoss.com/package-manager/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Linux Jargon Buster: What is a Package Manager in Linux? How Does it Work?
|
||||
======
|
||||
|
||||
One of the main points [how Linux distributions differ from each other][1] is the package management. In this part of the Linux jargon buster series, you’ll learn about packaging and package managers in Linux. You’ll learn what are packages, what are package managers and how do they work and what kind of package managers available.
|
||||
|
||||
### What is a package manager in Linux?
|
||||
|
||||
In simpler words, a package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command line tool like [apt-get][2] or [pacman][3].
|
||||
|
||||
You’ll often find me using the term ‘package’ in tutorials and articles on It’s FOSS. To understand package manager, you must understand what a package is.
|
||||
|
||||
### What is a package?
|
||||
|
||||
A package is usually referred to an application but it could be a GUI application, command line tool or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file and sometimes information about the dependencies.
|
||||
|
||||
In older days, [software used to installed from its source code][4]. You would refer to a file (usually named readme) and see what software components it needs, location of binaries. A configure script or makefile is often included. You will have to compile the software or on your own along with handling all the dependencies (some software require installation of other software) on your own.
|
||||
|
||||
To get rid of this complexity, Linux distributions created their own packaging format to provide the end users ready-to-use binary files (precompiled software) for installing software along with some [metadata][5] (version number, description) and dependencies.
|
||||
|
||||
It is like baking a cake versus buying a cake.
|
||||
|
||||
![][6]
|
||||
|
||||
Around mid 90s, Debian created .deb or DEB packaging format and Red Hat Linux created .rpm or RPM (short for Red Hat Package Manager) packaging system. Compiling source code still exists but it is optional now.
|
||||
|
||||
To interact with or use the packaging systems, you need a package manager.
|
||||
|
||||
### How does the package manager work?
|
||||
|
||||
Please keep in mind that package manager is a generic concept and it’s not exclusive to Linux. You’ll often find package manager for different software or programming languages. There is [PIP package manager just for Python packages][7]. Even [Atom editor has its own package manager][8].
|
||||
|
||||
Since the focus in this article is on Linux, I’ll take things from Linux’s perspective. However, most of the explanation here could be applied to package manager in general as well.
|
||||
|
||||
I have created this diagram (based on SUSE Wiki) so that you can easily understand how a package manager works.
|
||||
|
||||
![][9]
|
||||
|
||||
Almost all Linux distributions have software repositories which is basically collection of software packages. Yes, there could be more than one repository. The repositories contain software packages of different kind.
|
||||
|
||||
Repositories also have metadata files that contain information about the packages such as the name of the package, version number, description of package and the repository name etc. This is what you see if you use the [apt show command][10] in Ubuntu/Debian.
|
||||
|
||||
Your system’s package manager first interacts with the metadata. The package manager creates a local cache of metadata on your system. When you run the update option of the package manager (for example apt update), it updates this local cache of metadata by referring to metadata from the repository.
|
||||
|
||||
When you run the installation command of your package manager (for example apt install package_name), the package manager refers to this cache. If it finds the package information in the cache, it uses the internet connection to connect to the appropriate repository and downloads the package first before installing on your system.
|
||||
|
||||
A package may have dependencies. Meaning that it may require other packages to be installed. The package manager often takes care of the dependencies and installs it automatically along with the package you are installing.
|
||||
|
||||
![Package Manager Handling Dependencies In Linux][11]
|
||||
|
||||
Similarly, when you remove a package using the package manager, it either automatically removes or informs you that your system has unused packages that can be cleaned.
|
||||
|
||||
Apart from the obvious tasks of installing, removing, you can use the package manager to configure the packages and manage them as per your need. For example, you can [prevent the upgrade of a package version][12] from the regular system updates. There are many more things your package manager might be capable of.
|
||||
|
||||
### Different kinds of package managers
|
||||
|
||||
Package Managers differ based on packaging system but same packaging system may have more than one package manager.
|
||||
|
||||
For example, RPM has [Yum][13] and [DNF][14] package managers. For DEB, you have apt-get, [aptitude][15] command line based package managers.
|
||||
|
||||
![Synaptic package manager][16]
|
||||
|
||||
Package managers are not necessarily command line based. You have graphical package managing tools like [Synaptic][17]. Your distribution’s software center is also a package manager even if it runs apt-get or DNF underneath.
|
||||
|
||||
### Conclusion
|
||||
|
||||
I don’t want to go in further detail on this topic because I can go on and on. But it will deviate from the objective of the topic which is to give you a basic understanding of package manager in Linux.
|
||||
|
||||
I have omitted the new universal packaging formats like Snap and Flatpak for now.
|
||||
|
||||
I do hope that you have a bit better understanding of the package management system in Linux. If you are still confused or if you have some questions on this topic, please use the comment system. I’ll try to answer your questions and if required, update this article with new points.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/package-manager/
|
||||
|
||||
作者:[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/what-is-linux/
|
||||
[2]: https://itsfoss.com/apt-vs-apt-get-difference/
|
||||
[3]: https://itsfoss.com/pacman-command/
|
||||
[4]: https://itsfoss.com/install-software-from-source-code/
|
||||
[5]: https://www.computerhope.com/jargon/m/metadata.htm
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/source-code-comilation-vs-packaging.png?resize=800%2C450&ssl=1
|
||||
[7]: https://itsfoss.com/install-pip-ubuntu/
|
||||
[8]: https://itsfoss.com/install-packages-in-atom/
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/linux-package-manager-explanation.png?resize=800%2C450&ssl=1
|
||||
[10]: https://itsfoss.com/apt-search-command/
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/package-manager-handling-dependencies-in-linux.png?resize=800%2C450&ssl=1
|
||||
[12]: https://itsfoss.com/prevent-package-update-ubuntu/
|
||||
[13]: https://fedoraproject.org/wiki/Yum
|
||||
[14]: https://fedoraproject.org/wiki/DNF
|
||||
[15]: https://wiki.debian.org/Aptitude
|
||||
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/see-packages-by-repositories-synaptic.png?resize=799%2C548&ssl=1
|
||||
[17]: https://itsfoss.com/synaptic-package-manager/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,134 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (rakino)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (6 Essential Things To Do After Installing Manjaro Linux)
|
||||
[#]: via: (https://itsfoss.com/things-to-do-after-installing-manjaro/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
6 Essential Things To Do After Installing Manjaro Linux
|
||||
======
|
||||
|
||||
So, you just did a [fresh installation of Manjaro Linux][1]. Now what?
|
||||
|
||||
Here are a few essential post installation steps I recommend you to follow.
|
||||
|
||||
Quite honestly, these are the things I prefer to do after installing Manjaro. Yours could differ depending on your need.
|
||||
|
||||
### Recommended Things To Do After Installing Manjaro Linux
|
||||
|
||||
![][2]
|
||||
|
||||
I am using Manjaro Xfce edition but the steps are applicable to other desktop variants of [Manjaro][3] as well.
|
||||
|
||||
#### 1\. Set the fastest mirror
|
||||
|
||||
Before even updating your system, I suggest to sort out your mirror list first. When refreshing the Manjaro system and downloading software from repositories, an optimized mirror list can have noticeable performance impact to the system.
|
||||
|
||||
Open the Terminal emulator and type the following command:
|
||||
|
||||
```
|
||||
sudo pacman-mirrors --fasttrack
|
||||
```
|
||||
|
||||
![][4]
|
||||
|
||||
#### 2\. Update your system
|
||||
|
||||
Keeping your system up-to-date reduces the chances of security vulnerabilities. Refreshing your system repository is also a recommended thing to do before installing new software.
|
||||
|
||||
You can [update your Manjaro system][5] by running the following command.
|
||||
|
||||
```
|
||||
sudo pacman -Syu
|
||||
```
|
||||
|
||||
![][6]
|
||||
|
||||
#### 3\. Enable AUR, Snap or Flatpak support
|
||||
|
||||
[Arch User Repository (AUR)][7] is one of the main reasons that a user chooses an [Arch-based system][8]. It gives you access to a huge number of additional software.
|
||||
|
||||
Optionally, you can also enable support for [Snaps][9] and [Flatpaks][10] directly from Pamac GUI package manager.
|
||||
|
||||
![][11]
|
||||
|
||||
#### 4\. Enable TRIM (SSD only)
|
||||
|
||||
If your root partition has been installed on SSD, enabling [TRIM][12] is one thing you need to do after installing Manjaro. TRIM helps to clean blocks in your SSD and extend the lifespan of your SSD.
|
||||
|
||||
To enable TRIM on Manjaro, run the following command in a terminal:
|
||||
|
||||
```
|
||||
sudo systemctl enable fstrim.timer
|
||||
```
|
||||
|
||||
![][13]
|
||||
|
||||
#### 5\. Installing a kernel of your choice (advanced users)
|
||||
|
||||
One of the topics that I covered in my [Manjaro Linux review][14], is how easily you can switch kernels through a graphical interface.
|
||||
|
||||
Do you prefer to use the command line? You can list the installed kernel(s) on your system and install a kernel using your terminal.
|
||||
|
||||
To list the installed kernels:
|
||||
|
||||
```
|
||||
mhwd-kernel -li
|
||||
```
|
||||
|
||||
**To install a new kernel** (the latest to date 5.8 kernel for example)**:**
|
||||
|
||||
```
|
||||
sudo mhwd-kernel -i linux58
|
||||
```
|
||||
|
||||
![][15]
|
||||
|
||||
#### 6\. Install Microsoft true type fonts (if you need it)
|
||||
|
||||
I have to often edit the work documents on my personal computer and hence I need the Microsoft fonts like Times New Roman or Arial.
|
||||
|
||||
If you also need to use Microsoft fonts, you can access the [package][16] from [AUR][7]. If you want to use the command line for AUR packages, you can install an [AUR helper][17].
|
||||
|
||||
![][18]
|
||||
|
||||
#### Conclusion
|
||||
|
||||
[Manjaro is a great distribution][19] if you want to use the benefits of Arch Linux on a pre-configured, desktop optimized distribution. Though it comes pre-configured with many essentials, there are a few steps that cannot be done in advance, as everyone has a different setup and different needs.
|
||||
|
||||
Please let us know in the comments below, which step apart from the already mentioned is the essential for you.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/things-to-do-after-installing-manjaro/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/install-manjaro-linux/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/things-to-do-after-installing-manjaro.jpg?resize=800%2C450&ssl=1
|
||||
[3]: https://manjaro.org
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/manjaro-fasttrack.png?resize=800%2C600&ssl=1
|
||||
[5]: https://itsfoss.com/update-arch-linux/
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/sudo-pacman-Syu.png?resize=800%2C504&ssl=1
|
||||
[7]: https://itsfoss.com/aur-arch-linux/
|
||||
[8]: https://itsfoss.com/arch-based-linux-distros/
|
||||
[9]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/
|
||||
[10]: https://itsfoss.com/flatpak-guide/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/pamac-2.png?resize=800%2C600&ssl=1
|
||||
[12]: https://en.wikipedia.org/wiki/Trim_(computing)
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/fstrim.timer_.png?resize=800%2C600&ssl=1
|
||||
[14]: https://itsfoss.com/manjaro-linux-review/
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/manjaro-cli-kernels.png?resize=800%2C600&ssl=1
|
||||
[16]: https://aur.archlinux.org/packages/ttf-ms-fonts
|
||||
[17]: https://itsfoss.com/best-aur-helpers/
|
||||
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/ttf-ms-fonts.png?resize=800%2C600&ssl=1
|
||||
[19]: https://itsfoss.com/why-use-manjaro-linux/
|
@ -0,0 +1,101 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Present Slides in Linux Terminal With This Nifty Python Tool)
|
||||
[#]: via: (https://itsfoss.com/presentation-linux-terminal/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
用这个漂亮的 Python 工具在 Linux 终端中展示幻灯片
|
||||
======
|
||||
|
||||
演示往往是枯燥的。这就是为什么有些人添加动画或漫画/meme 来增加一些幽默和风格来打破单调的原因。
|
||||
|
||||
如果你需要在你的大学或公司的演示中加入一些独特的风格,那么使用 Linux 终端怎么样?想象一下,这将是多么酷的事情啊!
|
||||
|
||||
### Present:Linux 终端中进行演示
|
||||
|
||||
在终端中可以做很多[有趣好玩的事情][1]。制作和展示幻灯片只是其中之一。
|
||||
|
||||
基于 Python 的应用名为 [Present][2],它可以让你创建基于 markdown 和 YML 的幻灯片,你可以在你的大学或公司里演讲,并以真正的极客风格取悦人们。
|
||||
|
||||
我制作了一个视频,展示了在 Linux 终端中用 Present 演示一些东西的样子。
|
||||
|
||||
#### Present 的功能
|
||||
|
||||
你可以用 Present 做以下事情:
|
||||
|
||||
* 使用 markdown 语法在幻灯片中添加文本。
|
||||
* 用箭头或 PgUp/Down 键控制幻灯片
|
||||
* 改变前景和背景颜色
|
||||
* 在幻灯片中添加图像
|
||||
* 增加代码块
|
||||
* 播放模拟代码,并用 codio YML 文件输出。
|
||||
|
||||
|
||||
|
||||
#### 在 Linux 上安装 Present
|
||||
|
||||
Present 是一个基于 Python 的工具,你可以使用 PIP 来安装它。你应该确保用这个命令[在 Ubuntu 上安装 Pip][4]:
|
||||
|
||||
```
|
||||
sudo apt install python3-pip
|
||||
```
|
||||
|
||||
如果你使用的是其他发行版,请检查你的包管理器来安装 PIP3。
|
||||
|
||||
安装 PIP 后,你就可以以这种方式全局安装 Present:
|
||||
|
||||
```
|
||||
sudo pip3 install present
|
||||
```
|
||||
|
||||
你也可以只为当前用户安装,但你也必须将 \~/.local/bin 添加到你的 PATH。
|
||||
|
||||
#### 在 Linux 终端中使用 Present 来创建和展示幻灯片
|
||||
|
||||
![][5]
|
||||
|
||||
由于 Present 使用了 markdown 语法,你应该用它来创建自己的幻灯片。在这里使用 [markdown 编辑器][6]会有帮助。
|
||||
|
||||
Present 需要一个 markdown 文件来读取和播放幻灯片。你可以[下载这个示例幻灯片][7],但你需要单独下载嵌入图像,并将它放在图像文件夹内。
|
||||
|
||||
* 在 markdown 文件中使用 — 来分隔幻灯片。
|
||||
* 使用 markdown 语法在幻灯片中添加文本。
|
||||
* 使用以下语法添加图片 ![RC] (images/name.png)。
|
||||
* 通过添加像 <!– fg=white bg=red –> 这样的语法来改变幻灯片的颜色。
|
||||
* 使用像 <!– effect=fireworks –> 这样的语法来添加带有效果的幻灯片。
|
||||
* 使用 [codio 语法][8] 添加代码运行模拟。
|
||||
* 使用 q 退出演示,并用左/右箭头或 PgUp/Down 键控制幻灯片。
|
||||
|
||||
|
||||
|
||||
请记住,在演示时调整终端窗口的大小会把东西搞乱,按回车键也是如此。
|
||||
|
||||
**总结**
|
||||
|
||||
如果你熟悉 Markdown 和终端,使用 Present 对你来说并不困难。
|
||||
|
||||
你不能把它和常规的用 Impress、MS Office 等制作的幻灯片相比,但偶尔使用,它是一个很酷的工具。如果你是计算机科学/网络专业的学生,或者是开发人员或系统管理员,你的同事一定会觉得很有趣。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/presentation-linux-terminal/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/funny-linux-commands/
|
||||
[2]: https://github.com/vinayak-mehta/present
|
||||
[4]: https://itsfoss.com/install-pip-ubuntu/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/presentation-in-linux-terminal.png?resize=800%2C494&ssl=1
|
||||
[6]: https://itsfoss.com/best-markdown-editors-linux/
|
||||
[7]: https://github.com/vinayak-mehta/present/blob/master/examples/sample.md
|
||||
[8]: https://present.readthedocs.io/en/latest/codio.html
|
@ -0,0 +1,110 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Jargon Buster: What is a Package Manager in Linux? How Does it Work?)
|
||||
[#]: via: (https://itsfoss.com/package-manager/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Linux 黑话解释:什么是包管理器?它是如何工作的?
|
||||
======
|
||||
|
||||
[Linux 发行版之间有什么不同][1]的要点之一是包管理。在这篇 Linux 黑话解释中,你将了解 Linux 中的打包和包管理器。你将了解什么是包,什么是包管理器,它们是如何工作的,以及有什么样的包管理器可用。
|
||||
|
||||
### 什么是包管理器?
|
||||
|
||||
简单来说,“<ruby>包管理器<rt>package manager</rt></ruby>”(或“软件包管理器”)是一种工具,它允许用户在操作系统上安装、删除、升级、配置和管理软件包。软件包管理器可以是像“软件中心”这样的图形化应用,也可以是像 [apt-get][2] 或 [pacman][3] 这样的命令行工具。
|
||||
|
||||
你会发现我经常在教程和文章中使用“包”这个词。要了解包管理器,你必须了解什么是包。
|
||||
|
||||
### 什么是包?
|
||||
|
||||
一个“<ruby>包<rt>package</rt></ruby>”(或“软件包”)通常指的是一个应用程序,它可以是一个 GUI 应用程序、命令行工具或(其他软件程序需要的)软件库。包本质上是一个存档文件,包含二进制可执行文件、配置文件,有时还包含依赖关系的信息。
|
||||
|
||||
在旧时代,[软件曾经是从它的源代码安装的][4]。你会参考一个文件(通常命名为 `README`),看看它需要什么软件组件、二进制文件的位置。它通常包括一个配置脚本或 `Makefile`。你必须自己编译该软件或自己处理所有的依赖关系(有些软件需要安装其他软件)。
|
||||
|
||||
为了摆脱这种复杂性,Linux 发行版创建了自己的打包格式,为终端用户提供随时可用的二进制文件(预编译软件),以便安装软件,同时提供一些[元数据][5](版本号、描述)和依赖关系。
|
||||
|
||||
这就像烤蛋糕与买蛋糕一样。
|
||||
|
||||
![][6]
|
||||
|
||||
大约在上世纪 90 年代中期,Debian 创建了 DEB 打包格式(`.deb`),Red Hat Linux 创建了 RPM(Red Hat Package Manager 的缩写)打包系统(`.rpm`)。编译源代码的方式仍然存在,但现在是可选的。
|
||||
|
||||
要与打包系统交互或使用打包系统,你需要一个包管理器。
|
||||
|
||||
### 包管理器是如何工作的?
|
||||
|
||||
请记住,包管理器是一个通用的概念,它并不是 Linux 独有的。你会经常发现各种软件或编程语言的包管理器。有[只是针对 Python 包的 PIP 包管理器][7]。甚至 [Atom 编辑器也有自己的包管理器][8]。
|
||||
|
||||
由于本文的重点是 Linux,所以我会从 Linux 的角度出发。不过,这里的大部分解释也可以应用于一般的包管理器。
|
||||
|
||||
我创建了这个图(基于 SUSE Wiki),这样你就可以很容易理解包管理器是如何工作的。
|
||||
|
||||
![][9]
|
||||
|
||||
几乎所有的 Linux 发行版都有“<ruby>软件仓库<rt>software repository</rt></ruby>”,它基本上是软件包的集合。是的,可以有不止一个软件库。软件库包含不同种类的软件包。
|
||||
|
||||
软件仓库也有元数据文件,其中包含了软件包的信息,如软件包的名称、版本号、软件包的描述和软件仓库名称等。这就是你在 Ubuntu/Debian 中使用 [apt show 命令][10]所看到的。
|
||||
|
||||
你的系统上的包管理器首先会与元数据进行交互。包管理器在你的系统上创建了一个元数据的本地缓存。当你运行包管理器的更新选项(例如 `apt update`)时,它会通过引用仓库中的元数据来更新本地元数据缓存。
|
||||
|
||||
当你运行软件包管理器的安装命令(例如 `apt install package_name`)时,软件包管理器会引用这个缓存。如果它在缓存中找到了包的信息,它就会使用互联网连接到相应的仓库,并在你的系统上安装之前先下载包。
|
||||
|
||||
一个包可能有依赖关系。意思是说,它可能需要安装其他软件包。软件包管理器通常会处理这些依赖关系,并将其与你正在安装的软件包一起自动安装。
|
||||
|
||||
![Linux 中包管理器会处理依赖关系][11]
|
||||
|
||||
同样,当你使用包管理器删除一个包时,它要么自动删除,要么通知你系统有未使用的包可以清理。
|
||||
|
||||
除了安装、删除这些显而易见的任务外,你还可以使用包管理器对包进行配置,并根据自己的需要进行管理。例如,你可以在常规的系统更新中[防止升级某个包的版本][12]。你的包管理器可能还能做很多事情。
|
||||
|
||||
### 不同种类的包管理器
|
||||
|
||||
包管理器因打包系统而异,但同一打包系统却可能有多个包管理器。
|
||||
|
||||
例如,RPM 有 [Yum][13] 和 [DNF][14] 包管理器。对于 DEB,你有 `apt-get`、[aptitude][15] 等基于命令行的包管理器。
|
||||
|
||||
![Synaptic 包管理器][16]
|
||||
|
||||
软件包管理器不一定是基于命令行的,也有图形化的软件包管理工具,比如 [Synaptic][17]。你的发行版的“软件中心”也是一个软件包管理器,即使它在底层运行的是 `apt-get` 或 DNF。
|
||||
|
||||
### 结论
|
||||
|
||||
我不想进一步详细介绍这个话题,虽然我可以继续说下去,但这将偏离本主题的目标 —— 即让你对 Linux 中的包管理器有一个基本的了解。
|
||||
|
||||
我暂时忽略了新的通用打包格式,比如 Snap 和 Flatpak。
|
||||
|
||||
我希望你对 Linux 中的包管理系统有更好的理解。如果你还有困惑,或者你对这个主题有一些问题,请发表评论。我会尽量回答你的问题,如果需要的话,我会在本文中更新新的内容。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/package-manager/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/what-is-linux/
|
||||
[2]: https://itsfoss.com/apt-vs-apt-get-difference/
|
||||
[3]: https://itsfoss.com/pacman-command/
|
||||
[4]: https://itsfoss.com/install-software-from-source-code/
|
||||
[5]: https://www.computerhope.com/jargon/m/metadata.htm
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/source-code-comilation-vs-packaging.png?resize=800%2C450&ssl=1
|
||||
[7]: https://itsfoss.com/install-pip-ubuntu/
|
||||
[8]: https://itsfoss.com/install-packages-in-atom/
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/linux-package-manager-explanation.png?resize=800%2C450&ssl=1
|
||||
[10]: https://itsfoss.com/apt-search-command/
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/package-manager-handling-dependencies-in-linux.png?resize=800%2C450&ssl=1
|
||||
[12]: https://itsfoss.com/prevent-package-update-ubuntu/
|
||||
[13]: https://fedoraproject.org/wiki/Yum
|
||||
[14]: https://fedoraproject.org/wiki/DNF
|
||||
[15]: https://wiki.debian.org/Aptitude
|
||||
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/see-packages-by-repositories-synaptic.png?resize=799%2C548&ssl=1
|
||||
[17]: https://itsfoss.com/synaptic-package-manager/
|
@ -0,0 +1,136 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (rakino)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (6 Essential Things To Do After Installing Manjaro Linux)
|
||||
[#]: via: (https://itsfoss.com/things-to-do-after-installing-manjaro/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
安装 Manjaro Linux 后要做的 6 件事
|
||||
======
|
||||
|
||||
所以,你刚刚[全新安装了 Manjaro Linux][1],那么现在该做什么呢?
|
||||
|
||||
下面是我推荐你在安装后进行的一些步骤。
|
||||
|
||||
不过说实话,这些都是我在安装 Manjaro 后喜欢做的事,根据你的需求,步骤可能会有所不同。
|
||||
|
||||
### 推荐在安装完 Manjaro Linux 后去做的事
|
||||
|
||||
![][2]
|
||||
|
||||
我使用的是 Xfce 版的 Manjaro,但这些步骤也适用于 [Manjaro][3] 的其它桌面环境版本。
|
||||
|
||||
#### 1、设置最快的镜像
|
||||
|
||||
在更新系统之前,我建议先整理一下镜像列表。在刷新 Manjaro 系统和从软件仓库下载软件包的时候,优化后的镜像列表会对系统的性能产生明显的影响。
|
||||
|
||||
打开终端模拟器并输入以下命令:
|
||||
|
||||
```
|
||||
sudo pacman-mirrors --fasttrack
|
||||
```
|
||||
|
||||
![][4]
|
||||
|
||||
#### 2、更新系统
|
||||
|
||||
保持系统更新可以降低安全漏洞的发生机率,在安装新的软件之前也建议刷新系统的软件仓库。
|
||||
|
||||
你可以用下面的命令来[更新 Manjaro 系统][5]:
|
||||
|
||||
```
|
||||
sudo pacman -Syu
|
||||
```
|
||||
|
||||
![][6]
|
||||
|
||||
#### 3、启用 AUR,Snap 以及 Flatpak 支持
|
||||
|
||||
[<ruby>Arch 用户仓库<rt>Arch User Repository</rt></ruby>(AUR)][7]是用户选择[基于 Arch Linux 的系统][8]的一个主要理由。你可以在 AUR 中访问到大量的附加软件。
|
||||
|
||||
(译注:AUR 中的 PKGBUILD 均为用户上传且未经审核,使用者需要自负责任,在构建软件包前请注意检查其中内容是否合理。)
|
||||
|
||||
作为可选项,你可以直接在 Pamac 图形化软件包管理器中启用对 [Snap][9] 以及 [Flatpak][10] 的支持。
|
||||
|
||||
![][11]
|
||||
|
||||
#### 启用 TRIM(仅 SSD)
|
||||
|
||||
如果你的根分区已经安装在了 SSD 上,启用 [TRIM][12] 会是你在安装 Manjaro 后需要做的一件事。TRIM 会帮助清理 SSD 中的块,从而延长 SSD 的使用寿命。
|
||||
|
||||
要在 Manjaro 中启用 TRIM,请在终端中输入以下命令:
|
||||
|
||||
```
|
||||
sudo systemctl enable fstrim.timer
|
||||
```
|
||||
|
||||
![][13]
|
||||
|
||||
#### 5、安装内核(高级用户)
|
||||
|
||||
我在 [Manjaro 评测][14]中提到的一个话题就是,你可以在图形界面中轻易地更换内核。
|
||||
|
||||
喜欢使用命令行?你也可以在终端中列出系统中已安装的内核以及安装新的内核。
|
||||
|
||||
列出已安装的内核:
|
||||
|
||||
```
|
||||
mhwd-kernel -li
|
||||
```
|
||||
|
||||
**安装新内核**(以最新的 5.8 版本内核为例)**:**
|
||||
|
||||
```
|
||||
sudo mhwd-kernel -i linux58
|
||||
```
|
||||
|
||||
![][15]
|
||||
|
||||
#### 6、安装微软 TrueType 字体(如果需要)
|
||||
|
||||
我经常在个人电脑上编辑工作文件,因此我需要 Times New Roman 或 Arial 等微软字体。
|
||||
|
||||
如果你也需要使用微软字体,可以从 [AUR][7] 中取得这个[软件包][16]。如果你想要在命令行中管理 AUR 软件包,可以选择安装一个 [AUR 助手][17]。
|
||||
|
||||
![][18]
|
||||
|
||||
#### 结论
|
||||
|
||||
如果你想在一个预配置、为桌面优化的发行版上享受 Arch Linux 的优点,[Manjaro是一个很好的发行版][19]。虽然它预置了很多东西,但由于每个人设置和需求的不同,有几个步骤是不能提前完成的。
|
||||
|
||||
除开已经提到的步骤,还有哪一步对你来说是必不可少的?请在下面的评论中告诉我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/things-to-do-after-installing-manjaro/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[rakino](https://github.com/rakino)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/install-manjaro-linux/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/things-to-do-after-installing-manjaro.jpg?resize=800%2C450&ssl=1
|
||||
[3]: https://manjaro.org
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/manjaro-fasttrack.png?resize=800%2C600&ssl=1
|
||||
[5]: https://itsfoss.com/update-arch-linux/
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/sudo-pacman-Syu.png?resize=800%2C504&ssl=1
|
||||
[7]: https://itsfoss.com/aur-arch-linux/
|
||||
[8]: https://itsfoss.com/arch-based-linux-distros/
|
||||
[9]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/
|
||||
[10]: https://itsfoss.com/flatpak-guide/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/pamac-2.png?resize=800%2C600&ssl=1
|
||||
[12]: https://en.wikipedia.org/wiki/Trim_(computing)
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/fstrim.timer_.png?resize=800%2C600&ssl=1
|
||||
[14]: https://itsfoss.com/manjaro-linux-review/
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/manjaro-cli-kernels.png?resize=800%2C600&ssl=1
|
||||
[16]: https://aur.archlinux.org/packages/ttf-ms-fonts
|
||||
[17]: https://itsfoss.com/best-aur-helpers/
|
||||
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/ttf-ms-fonts.png?resize=800%2C600&ssl=1
|
||||
[19]: https://itsfoss.com/why-use-manjaro-linux/
|
Loading…
Reference in New Issue
Block a user