mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
commit
0e58cad7a5
255
published/20210118 Set up a minimal server on a Raspberry Pi.md
Normal file
255
published/20210118 Set up a minimal server on a Raspberry Pi.md
Normal file
@ -0,0 +1,255 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (hwlife)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14405-1.html)
|
||||
[#]: subject: (Set up a minimal server on a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/1/minimal-server-raspberry-pi)
|
||||
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||
|
||||
在树莓派上创建一个最小化的服务器
|
||||
======
|
||||
|
||||
> 不要急着丢弃那台旧树莓派,这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/28/161221byrmba9ayvvmbbkx.jpg)
|
||||
|
||||
最近,我的 [树莓派][2] 上的 microSD 储存卡不工作了。它已经作为服务器持续使用将近两年了,这为我提供了一个开始探索和修正问题的好机会。在初始化安装完成以后,它开始出现一些磁盘方面的问题,并且官方的树莓派操作系统发布了一个有重大意义的更新(并从 Raspbian 更名为<ruby>树莓派操作系统<rt>Raspberr Pi OS</rt></ruby>)。所以我买了一个新的储存卡并开始重装。
|
||||
|
||||
尽管树莓派 3B 不是最新的硬件,但对于运行多样化服务的最小化的服务器还是足够的。我认为我之前的安装使用了完整的安装镜像,包括了图形用户界面和许多其他的软件包是没有必要的。
|
||||
|
||||
这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。
|
||||
|
||||
### 开始
|
||||
|
||||
首先,要为树莓派创建一个新的系统驱动器。这需要两样东西:系统镜像文件和一张 microSD 储存卡。
|
||||
|
||||
#### 下载树莓派系统镜像文件
|
||||
|
||||
虽然有好几种操作系统可供选择,但我坚持选择树莓派官方支持的系统。
|
||||
|
||||
第一步是从 [树莓派操作系统][3] 官方网站上下载最新的系统镜像文件到计算机,然后后写入储存卡。他们提供了三个不同的镜像,我选择了精简版。它是最小化的操作系统,只包含基本系统必要的文件,所以它占用最少的磁盘空间和系统内存。(当我下载系统的时候,发布日期是 2020 年 8 月 20 日,但是它现在肯定已经更新了。我觉得不会有什么巨大不同,但是我建议读一下发行说明。)
|
||||
|
||||
#### 将树莓派系统镜像写到储存卡
|
||||
|
||||
第二步是写下载的系统镜像到储存卡。我的卡之前用过,当我把它插入我的 Linux 桌面计算机之后,它自动加载了两个存在的分区。在我卸载这两个分区前,我不能写入镜像。
|
||||
|
||||
要这样做,我必须得用下面的 `lsblk` 命令来确定它们的路径,经确定,该设备路径为 `/dev/mmcblk0`:
|
||||
|
||||
```
|
||||
# lsblk -p
|
||||
```
|
||||
|
||||
我用 `umount` 命令卸载了这两个分区:
|
||||
|
||||
```
|
||||
# umount /dev/mmcblk0p2
|
||||
# umount /dev/mmcblk0p1
|
||||
```
|
||||
|
||||
一旦分区被卸载,就可以将镜像文件写入到储存卡了。尽管有许多图形化的写入工具,我还是习惯是用古老的 `dd` 命令:
|
||||
|
||||
```
|
||||
# dd bs=4M if=/home/alan/Downloads/raspios/2020-08-20-raspios-buster-armhf-lite.img of=/dev/mmcblk0 status=progress conv=fsync
|
||||
```
|
||||
|
||||
#### 启动树莓派
|
||||
|
||||
你只需要一个显示器、键盘、电源适配器来使用树莓派。我还有一个以太网网线用于网络连接,相比无线网络,我更喜欢通过网线来连接一个专用的服务器。
|
||||
|
||||
插入储存卡并打开树莓派的电源。一旦成功启动,用默认的缺省密码来进行登录:用户名 `pi`,密码`raspberry`。
|
||||
|
||||
### 系统设置
|
||||
|
||||
按照以下步骤尽可能最小化设置磁盘空间、内存使用等。我建议尽可能的花时间研究每个配置,使之尽量正确。通常有几种应用配置的方法,有些配置文件和选项可能会被丢弃,所以要查看产品文档确保你没有应用过时的配置。
|
||||
|
||||
#### 运行 raspi-config
|
||||
|
||||
树莓派系统的主设置程序叫做 `raspi-config`。登录以后立即运行它:
|
||||
|
||||
```
|
||||
# raspi-config
|
||||
```
|
||||
|
||||
![Raspberry Pi config main window][4]
|
||||
|
||||
它出现了一个扩展根文件系统的选项,可以利用储存卡上所有可利用的空间。选择这个选项之后,重启并重新登录。
|
||||
|
||||
用 `df` 命令来验证储存卡的总容量是否被完全使用:
|
||||
|
||||
```
|
||||
# df -h
|
||||
```
|
||||
|
||||
如果你需要设置其他选项,请再次运行 `raspi-config`。它们中的一些选项可以根据你的偏好和配置进行变化。仔细检查所有这些选项,确定没有任何遗漏。为了获得最佳性能,我建议做以下调整。(我跳过了一些我们没有做任何变化的选项。)
|
||||
|
||||
* <ruby>系统选项<rt>System options</rt></ruby>:在此你可以设置主机名,最好使用完全限定的域名(FQDN)。你也能在这里更改你的密码,这始终是强烈建议的。
|
||||
* <ruby>接口选项<rt>Interface options</rt></ruby>:开启 SSH 服务。
|
||||
* <ruby>性能选项<rt>Performance options</rt></ruby>:将 GPU 内存减少到最低值(16MB)。
|
||||
* <ruby>本地化选项<rt>Localization options</rt></ruby>:选择你的时区、位置、键盘类型。
|
||||
* <ruby>高级选项<rt>Advanced options</rt></ruby>:这个选项包括扩展根文件系统的选项。如果你在上面没扩展,一定要在这里做。这样你可以访问储存卡上的所有可用空间。
|
||||
* <ruby>更新<rt>Update</rt></ruby>:进入更新选项会立即检查 `raspi-config` 工具是否有更新。如果更新可用,它将被下载并应用,`raspi-config` 将在几秒钟后重启。
|
||||
|
||||
一旦你在 `raspi-config` 中完成这些配置,选择“<ruby>完成<rt>Finish</rt></ruby>”退出该工具。
|
||||
|
||||
#### 手动配置
|
||||
|
||||
我还建议几个其他更改,它们全都要求编辑某种配置文件来手动更改设置。
|
||||
|
||||
##### 设置静态 IP 地址
|
||||
|
||||
一般来说,最好用静态 IP 地址设置服务器。通过 `ip` 命令来验证网络接口,并设置 IP 地址和你的缺省网关(路由器)和域名服务(DNS)地址:
|
||||
|
||||
```
|
||||
# ip link
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
|
||||
link/ether b8:27:eb:48:3f:46 brd ff:ff:ff:ff:ff:ff
|
||||
```
|
||||
|
||||
你还需要知道你的缺省网关和一个及以上的 DNS 服务器地址。将这些信息添加到 `/etc/dhcpcd.conf` 配置文件中(我强烈建议更改之前对这个文件做一个备份):
|
||||
|
||||
```
|
||||
# cd /etc
|
||||
# cp -a dhcpcd.conf dhcpcd.conf.original
|
||||
```
|
||||
|
||||
按照以下来编辑文件:
|
||||
|
||||
```
|
||||
# vi dhcpcd.conf
|
||||
|
||||
# static IP configuration:
|
||||
interface eth0
|
||||
static ip_address=192.168.1.5/24
|
||||
static routers=192.168.1.1
|
||||
static domain_name_servers=192.168.1.3 192.168.1.4
|
||||
```
|
||||
|
||||
##### 关闭 IPv6 协议
|
||||
|
||||
除非你有特别需要使用 IPv6,否则你可能倾向于禁用它。为此,你可以创建两个新文件,其中包括一个单行指令,指示 Linux 内核不要使用 IPv6。
|
||||
|
||||
首先,创建 `/etc/sysctl.d/disable-ipv6.conf` 文件,其中包含一行指令:
|
||||
|
||||
```
|
||||
# cd /etc/sysctl.d
|
||||
# echo "net.ipv6.conf.all.disable_ipv6 = 1" > disable-ipv6.conf
|
||||
```
|
||||
|
||||
然后创建 `/etc/modprobe.d/blacklist-ipv6.conf` 文件包含一行指令:
|
||||
|
||||
```
|
||||
# cd /etc/modprobe.d
|
||||
# echo "blacklist ipv6" > blacklist-ipv6.conf
|
||||
```
|
||||
|
||||
##### 关闭 Wi-Fi、蓝牙和音频
|
||||
|
||||
我的服务器的具体用途并不需要蓝牙和音频,同时,它用以太网连接,并不使用无线(Wi-Fi)。除非你计划用它们,否则按照以下步骤来关闭它们。
|
||||
|
||||
对 `/boot/config.txt` 这个文件做以下更改(再次强调,我建议为这个文件做个备份):
|
||||
|
||||
```
|
||||
# cd /boot
|
||||
# cp -a config.txt config.txt.original
|
||||
```
|
||||
|
||||
加入以下两个指令到文件底部来禁用蓝牙和 Wi-Fi:
|
||||
|
||||
* `dtoverlay=disable-bt`
|
||||
* `dtoverlay=disable-wifi`
|
||||
|
||||
这些 `echo` 命令就可以完成:
|
||||
|
||||
```
|
||||
# cd /boot
|
||||
# echo "dtoverlay=disable-bt" >> config.txt
|
||||
# echo "dtoverlay=disable-wifi" >> config.txt
|
||||
```
|
||||
|
||||
要关闭音频,更改 `dtparam=audio` 的参数为 `off`。你可以用一个简短的命令 `sed` 来完成:
|
||||
|
||||
```
|
||||
# sed -i '/dtparam=audio/c dtparam=audio=off' config.txt
|
||||
```
|
||||
|
||||
|
||||
最后一步是禁用 Wi-Fi 服务,用 `systemctl mask` 命令来操作:
|
||||
|
||||
```
|
||||
systemctl mask wpa_supplicant.service
|
||||
```
|
||||
|
||||
如果你不需要其他服务的话,也可以禁用它们:
|
||||
|
||||
* 禁用调制解调器服务:`systemctl disable hciuart`
|
||||
* 禁用 Avahi 守护进程:`systemctl disable avahi-daemon.service`
|
||||
|
||||
### 最后一步
|
||||
|
||||
检查你的内存使用量:
|
||||
|
||||
```
|
||||
# free -h
|
||||
```
|
||||
我震惊了:我的系统只用了 30MB 的内存。
|
||||
|
||||
创建个人账户:建议为登录这台服务器的个人创建用户账户。你能分配他们到 `sudo` 组允许他们运行管理命令。举个例子,创建一个用户名为 George 的一个账户。
|
||||
|
||||
```
|
||||
# adduser george
|
||||
# usermod -a -G adm,sudo,users george
|
||||
```
|
||||
|
||||
进行更新:这是一个重要的步骤。应用更新来获取树莓派操作系统的最新修复。
|
||||
|
||||
```
|
||||
# apt update
|
||||
# apt full-upgrade
|
||||
```
|
||||
|
||||
重启:重启你的新服务器是一个好主意:
|
||||
|
||||
```
|
||||
# systemctl reboot
|
||||
```
|
||||
|
||||
安装 Cockpit:你可以在树莓派系统上安装著名的 Linux Web 控制台 [Cockpit][5],它提供了一个基于 HTML 界面来远程管理和监控你的服务器。我最近写了一篇 [Cockpit 入门][6] 的文章。用这个命令来安装它
|
||||
|
||||
```
|
||||
# apt install cockpit
|
||||
```
|
||||
|
||||
现在我的树莓派服务器已经准备好托管服务器了,我能用它来做 [网页服务器][7]、[VPN 服务器][8]、 [Minetest][9] 等游戏服务器,或者就像我做的基于 [Pi-Hole 的广告屏蔽器][10] 。
|
||||
|
||||
### 保持旧硬件的活力
|
||||
|
||||
不论你有什么硬件,仔细地精简并控制你的操作系统和软件包,可以使你的系统资源使用量保持在低水平,以便你获得最大收益。这还可以通过减少试图利用漏洞的潜在恶意行为者可用的服务和软件包数量,提高了安全性。
|
||||
|
||||
因此,在你丢弃旧硬件之前,考虑一下能够继续使用的各种可能性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/minimal-server-raspberry-pi
|
||||
|
||||
作者:[Alan Formy-Duval][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[hwlife](https://github.com/hwlife)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/RaspberryPi.SUNY_.jpg?itok=uS_-VUcb (Raspberry Pi board Model B)
|
||||
[2]: https://opensource.com/resources/raspberry-pi
|
||||
[3]: https://www.raspberrypi.org/software/operating-systems
|
||||
[4]: https://opensource.com/sites/default/files/uploads/raspi-config-main.png (Raspberry Pi config main window)
|
||||
[5]: https://cockpit-project.org/
|
||||
[6]: https://opensource.com/article/20/11/cockpit-server-management
|
||||
[7]: https://opensource.com/article/17/3/building-personal-web-server-raspberry-pi-3
|
||||
[8]: https://opensource.com/article/19/6/raspberry-pi-vpn-server
|
||||
[9]: https://github.com/minetest
|
||||
[10]: https://opensource.com/article/18/2/block-ads-raspberry-pi
|
@ -3,13 +3,17 @@
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14404-1.html"
|
||||
|
||||
尝试开源的安全通讯软件 “Threema” 的 7 个理由
|
||||
尝试开源的安全通讯软件 Threema 的 7 个理由
|
||||
======
|
||||
|
||||
> Threema 是一个优质的开源通讯软件,专注于安全和隐私,提供了一个去中心的基础设施。
|
||||
|
||||
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema.png?w=1200&ssl=1)
|
||||
|
||||
现在已经有很多私密的 WhatsApp 代替品可供我们选择,Threema 则是其中最好的可选项之一。
|
||||
|
||||
可是,为什么你要考虑尝试它呢?它是“终极的”安全通讯软件吗?
|
||||
@ -22,13 +26,13 @@
|
||||
|
||||
在我开始说明为什么要尝试 [Threema][2] 这款私密通讯软件之前,请允许我再介绍一下它。
|
||||
|
||||
Threema 是一个流行的安全通讯软件,它由瑞士团队研发,专注于个人隐私。它也是一个付费软件,你需要在 [Play Store][3] 或者 [App Store] 上,一次性支付费用(大约 4 美元),才能够在你喜爱的移动设备上使用它。
|
||||
Threema 是一个流行的安全通讯软件,它由瑞士团队研发,专注于个人隐私。它也是一个付费软件,你需要在 [Play Store][3] 或者 [App Store][4] 上,一次性支付费用(大约 4 美元),才能够在你喜爱的移动设备上使用它。
|
||||
|
||||
起初,它是一个专有的安全通讯软件,是 [Signal][5] 等其他软件的竞争者。
|
||||
|
||||
在 2020 年的时候,Threema 决定在 [GitHub][6] 上开源它的所有软件。
|
||||
|
||||
你可以下载到移动应用,也可以得到 Linux 桌面(包括 Windows 和 macOS)上的支持。遗憾的是,它在桌面上目前没有一个独立的客户端。
|
||||
你可以下载到移动应用,也可以得到 Linux 桌面(包括 Windows 和 macOS)上的支持。遗憾的是,它在桌面上目前没有独立的客户端。
|
||||
|
||||
因此,你需要让移动设备保持开启状态,才能使用桌面上的 Threema(就和 WhatsApp Web 的工作方式一样)。
|
||||
|
||||
@ -38,7 +42,7 @@ Threema 是一个流行的安全通讯软件,它由瑞士团队研发,专注
|
||||
|
||||
支持你这么做的理由包括:
|
||||
|
||||
### 1. 不需要手机号码
|
||||
#### 1. 不需要手机号码
|
||||
|
||||
![][7]
|
||||
|
||||
@ -46,39 +50,39 @@ Threema 是一个流行的安全通讯软件,它由瑞士团队研发,专注
|
||||
|
||||
但是,手机号码只是注册 Threema 的一个选填项。如果你不想让别人知道你的手机号码,你可以使用注册时生成的 **Threema ID**(用户名)。
|
||||
|
||||
如果你要和别人交流,你必须分享你的 Threema ID,而不是你的手机号码。
|
||||
这样的话,如果你要和别人交流,你必须分享你的 Threema ID,而不是你的手机号码。
|
||||
|
||||
值得一提的是,即使在没有 SIM 卡的设备上,它也能完美工作,因为你不必提供手机号码就可以注册成功。
|
||||
|
||||
### 2. 开源
|
||||
#### 2. 开源
|
||||
|
||||
虽然这是一个显而易见的理由,但它十分重要。
|
||||
|
||||
我非常重视这一点。如果你想要一个值得信赖的 WhatsApp 替代品,你应该倾向于选择一个开发稳定的开源通讯软件。
|
||||
|
||||
### 3. 去中心化的基础设施
|
||||
#### 3. 去中心化的基础设施
|
||||
|
||||
![][8]
|
||||
|
||||
和大多数主流产品不同,Threema 提供了一个去中心化的基础设施,以确保更好地抵御审查制度。
|
||||
和大多数主流产品不同,Threema 提供了一个去中心化的基础设施,以确保更好地抵御检查。
|
||||
|
||||
换句话说,Threema 并不依赖于一个中心服务器架构,也就不会发生“一个错误导致整个网络瘫痪”这种情况。
|
||||
|
||||
这个错误可能是一次停电,或者是政府的一次审查/限制服务的行动。
|
||||
这个错误可能是一次停电,或者是一次检查/限制服务的行动。
|
||||
|
||||
在这些情况下,Threema 会是更有用和更有效的选择。
|
||||
|
||||
### 4. 收费软件
|
||||
#### 4. 收费软件
|
||||
|
||||
它是一个收费软件(一次性付费),这也算是一个好消息吗?
|
||||
|
||||
对于某些人来说,是的。
|
||||
|
||||
如果你想要寻找一个通讯软件,在上面几乎不可能有垃圾消息,或者你不想让你的联系人找到你(或是给你发一些你不想要的信息),那么 Threema 就是你的一个完美选项。
|
||||
如果你想要寻找一个几乎不可能有垃圾消息的通讯软件,而且你也不想让你的联系人找到你(或是给你发一些你不想要的信息),那么 Threema 就是你的一个完美选项。
|
||||
|
||||
毕竟,为一个出色的开源解决方案而付费是值得的,对吧?
|
||||
|
||||
### 5. 可靠的用户界面和特性
|
||||
#### 5. 可靠的用户界面和特性
|
||||
|
||||
![Credits: Threema][9]
|
||||
|
||||
@ -86,7 +90,6 @@ Threema 不是一个新产品,它已经开发了好几年了。
|
||||
|
||||
因此,它能够提供稳定的用户体验,以及一些激动人心的特性,比如说它支持在群聊中发起投票。
|
||||
|
||||
It lets you silently acknowledge messages from a recipient using agree/disagree without triggering a notification to them. This can come in handy at times.
|
||||
你可以使用“同意/不同意”选项,以一种静默的方式确认接收方是否收到了消息,而不会触发一个发送给他们的通知。
|
||||
|
||||
注意,“同意/不同意”的功能只在个人会话中有效。
|
||||
@ -97,7 +100,7 @@ It lets you silently acknowledge messages from a recipient using agree/disagree
|
||||
|
||||
![Credits: Threema][10]
|
||||
|
||||
### 6. 瑞士团队 & 遵守 GDRP 准则
|
||||
#### 6. 瑞士团队 & 遵守 GDRP 准则
|
||||
|
||||
你可能会在意,开发团队是否会受到所在国家的司法管辖权和隐私法等限制,那么对你而言,Threema 就是一个理想的私密通讯软件。
|
||||
|
||||
@ -105,17 +108,17 @@ Threema 受瑞士的法律约束,而众所周知,瑞士的法律是最重视
|
||||
|
||||
除此之外,Threema 还提到了它完全遵守 GDRP 准则。如果你在意这一点的话,Threema 是一个不错的选择。
|
||||
|
||||
### 7. 在工作中使用 Threema
|
||||
#### 7. 在工作中使用 Threema
|
||||
|
||||
![][11]
|
||||
|
||||
有趣的事,Threema 还有另外一个 [独立的版本][11],专注于加强公司内部的通讯安全。
|
||||
有趣的是,Threema 还有另外一个 [独立的版本][11],专注于加强公司内部的通讯安全。
|
||||
|
||||
所以,如果你需要一个安全通讯平台来作为即时通讯软件的话,Threema 将是一个吸引人的选择。
|
||||
|
||||
[Try Threema][12]
|
||||
- [试试 Threema][12]
|
||||
|
||||
### 最后,我的一些想法
|
||||
### 最后,我的看法
|
||||
|
||||
我已经使用 Threema 很长时间了,我承认我在上面没有很多联系人。
|
||||
|
||||
@ -134,7 +137,7 @@ via: https://news.itsfoss.com/reasons-to-try-threema/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://news.itsfoss.com/things-to-know-linux-is-tough/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
@ -150,7 +150,7 @@ via: https://news.itsfoss.com/things-to-know-linux-is-tough/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[译者ID](https://github.com/aREversez)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,201 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Power up your Linux terminal text editor with ed)
|
||||
[#]: via: (https://opensource.com/article/20/12/gnu-ed)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Power up your Linux terminal text editor with ed
|
||||
======
|
||||
This deceptively simple editor empowers the user with a set of control
|
||||
commands that are easy to learn and use.
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
The GNU `ed` command is a line editor. It’s considered the standard Unix text editor because it was the very first text editor for Unix, and so it was (and generally still is) available on any POSIX system. In some ways, it’s easy to tell that it was the first because, in many ways, it’s extremely rudimentary. Unlike most other text editors, it doesn’t open in a window or screen of its own, and in fact, by default, it doesn’t even prompt the user for input. On the other hand, its near lack of any interface can also be a strength. It’s a functional editor that can be controlled with short instructions either interactively or through a script.
|
||||
|
||||
### Installing ed
|
||||
|
||||
If you’re running Linux or BSD, you probably already have `ed` installed (GNU `ed` on Linux and BSD `ed` on BSD). Some minimal environments, however, omit `ed`, but it’s probably available from your distribution’s software repository or ports tree. MacOS ships with BSD `ed` installed.
|
||||
|
||||
### Launching ed
|
||||
|
||||
When you launch `ed`, it appears that you’ve lost your prompt, and possibly that `ed` has stalled. It has not; it’s just waiting for your instructions:
|
||||
|
||||
|
||||
```
|
||||
$ ed
|
||||
```
|
||||
|
||||
To tell `ed` to be a little more verbose, you can command it to return a prompt with the `p` command:
|
||||
|
||||
|
||||
```
|
||||
$ ed
|
||||
p
|
||||
?
|
||||
```
|
||||
|
||||
The question mark (`?`) is the default `ed` prompt.
|
||||
|
||||
### The buffer
|
||||
|
||||
While `ed` is active, you work with what’s called a _buffer_. The buffer is a place in memory. You’re not editing a file directly; you’re only editing the buffer. Should you exit `ed` without writing your changes to a file on disk, then all changes are lost because they only happened in the buffer. (This may sound familiar to experienced Emacs users accustomed to an initial scratch buffer.)
|
||||
|
||||
### Writing text with ed
|
||||
|
||||
After launching `ed`, you’re in command mode. This means you can issue commands to the editor itself, such as when setting it to display a prompt instead of empty space. You can append text to the current buffer with the `a` command, which is terminated by a solitary dot (`.`) on its own line. For instance, this example adds two lines ("hello world" and "hello ed") to the buffer:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
a
|
||||
hello world
|
||||
hello ed
|
||||
.
|
||||
```
|
||||
|
||||
After a terminating dot, you return to command mode.
|
||||
|
||||
### Viewing the buffer
|
||||
|
||||
To see what’s contained in the buffer, you can type either the line you want to see or `,p` to display all lines.
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
1
|
||||
hello world
|
||||
2
|
||||
hello ed
|
||||
,p
|
||||
hello world
|
||||
hello ed
|
||||
```
|
||||
|
||||
### Writing to a file
|
||||
|
||||
Assuming you’re happy with your text, you can write the buffer to a file with the `w` command followed by the name of the destination file.
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
w example.txt
|
||||
19
|
||||
```
|
||||
|
||||
The number after the write operation indicates the number of characters written to the file.
|
||||
|
||||
### Reading a file
|
||||
|
||||
You don’t have to use `ed` for text entry. You can also just open an existing file into the buffer using the `r` command:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
r myfile.txt
|
||||
```
|
||||
|
||||
Alternatively, you can just launch `ed` followed by the file name you want it to load into the buffer:
|
||||
|
||||
|
||||
```
|
||||
$ ed myfile.txt
|
||||
```
|
||||
|
||||
### Editing the buffer
|
||||
|
||||
The `ed` application is a text editor, so you can affect text in the buffer using a special editing syntax. Users of `sed` or `vim` may find some of its syntax familiar. Assume you have a file loaded in the buffer:
|
||||
|
||||
|
||||
```
|
||||
$ ed myfile.txt
|
||||
,p
|
||||
This is an example document.
|
||||
There is some text, but not much.
|
||||
There is some errors, but not much.
|
||||
```
|
||||
|
||||
To change the word "document" to "file" in the first sentence, select the line you want to target (1) and then invoke the search function with `s` followed by your search and replacement terms:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
1
|
||||
This is an example document.
|
||||
s/document/file/
|
||||
1
|
||||
This is an example file.
|
||||
```
|
||||
|
||||
To target a different line, the process is essentially the same but with a different number:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
3
|
||||
There is some errors, but not much.
|
||||
s/is/are/
|
||||
s/much/many/
|
||||
```
|
||||
|
||||
You can see the edits you’ve made to the buffer using the `,p` command as usual.
|
||||
|
||||
|
||||
```
|
||||
This is an example file.
|
||||
There is some text, but not much.
|
||||
There are some errors, but not many.
|
||||
```
|
||||
|
||||
Of course, these changes only exist in the buffer. Were you to look at the file outside of `ed`, you would see the original text only:
|
||||
|
||||
|
||||
```
|
||||
$ cat myfile.txt
|
||||
This is an example document.
|
||||
There is some text, but not much.
|
||||
There is some errors, but not much.
|
||||
```
|
||||
|
||||
To save your changes back into the file, use the `w` command:
|
||||
|
||||
|
||||
```
|
||||
w myfile.txt
|
||||
258
|
||||
```
|
||||
|
||||
### Clearing the buffer
|
||||
|
||||
To get a new buffer so you can either start a new document or load a new one into a fresh environment, use the `c` command. After issuing `c` to clear the buffer, a print command returns nothing because the buffer has been emptied:
|
||||
|
||||
|
||||
```
|
||||
c
|
||||
,p
|
||||
```
|
||||
|
||||
### Quit
|
||||
|
||||
To exit your `ed` session, use the `q` command. This doesn’t give you a chance to save your buffer, so make sure you save before you use this command.
|
||||
|
||||
### Try ed
|
||||
|
||||
There’s a lot more `ed` can do, and learning `ed` can afford you great insight into how `sed` and parts of `vim` work. I didn’t bother trying to write this article in `ed`, admittedly, and I’m not sure it’s the best tool for text entry in general. However, `ed` is an excellent editor of text, and you can learn it easily by reading its documentation. On a GNU system, use `info ed` to view the manual.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/gnu-ed
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
@ -1,161 +0,0 @@
|
||||
[#]: subject: (How I helped my mom switch from Windows to Linux)
|
||||
[#]: via: (https://opensource.com/article/21/6/mom-switch-linux)
|
||||
[#]: author: (Tomasz https://opensource.com/users/tomaszwaraksa)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lkxed)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
How I helped my mom switch from Windows to Linux
|
||||
======
|
||||
With Linux, novice users will gain a smooth, polished desktop experience
|
||||
with a multitude of familiar applications.
|
||||
![Red Lego Heart][1]
|
||||
|
||||
The Large Hadron Collider is [powered by Linux][2]. Laptops on the International Space Station [run on Linux][3]. So do [Instagram][4] and [Nest thermostats][5]. Recently, we watched Ingenuity fly over Mars, an amazing robo-copter driven by… [Linux][6]! It's yet more proof of how flexible and versatile this operating system can be.
|
||||
|
||||
But now, the really big news. It's official. Linux can handle Mom and Dad just as well!
|
||||
|
||||
### The story
|
||||
|
||||
About a year ago, I decided to migrate my mom to Linux. A year has passed, so it's time for retrospection and conclusions.
|
||||
|
||||
Like most of us, I'm officially _Mom's Computer Admin_. Mom is a lovely lady in her late 60s—a real sweetheart. Mom's computer skills are basic. Mom's computer needs are basic, too. Read the internets, send email, type text, browse and edit photos, play videos and music, call family and friends on Skype or Signal.
|
||||
|
||||
Until last year, she was using a Windows laptop, old but not too bad. Then one day, through deceit, threats, and obnoxious popups, Microsoft finally made her click that dreaded "UPGRADE TO WINDOWS 10" button.
|
||||
|
||||
My life as Mom's Computer Admin quickly turned into hell with her desperate calls for help. Why does everything look so different? Where is my app menu? What, this pile of tiles is now my app menu? Why is the computer so slow? Why does it restart daily for updates, just when I need to use it?! Why is something (she meant the hard drive) making noise all the time? What is it actually doing all the time?
|
||||
|
||||
And how would I know that without any ability to look into the source code?
|
||||
|
||||
I considered rolling back the upgrade. But with Windows 7 reaching end-of-life soon, I feared the worst: Without security updates, Mom's computer would soon become a member of countless bot networks, mining cryptocurrencies, mailing spam, and launching vicious DDOS attacks on the vital infrastructure of entire countries. And I'd be the one to clean this mess—every weekend.
|
||||
|
||||
### Linux to the rescue
|
||||
|
||||
With nothing to lose, I decided to migrate her to Linux. I made "the move" five years ago and have never been happier. It surely wouldn't do harm to try it with her.
|
||||
|
||||
Mom was happy when I declared to fix her problems once and for all. What she didn't know is that she would become the crucial part of a year-long scientific experiment named: "Can Mom survive Linux?"
|
||||
|
||||
![Cowsay "Can Mom Survive Linux?"][7]
|
||||
|
||||
(Tomasz Waraksa, [CC BY-SA 4.0][8])
|
||||
|
||||
And so, one day in February 2020, I arrived from faraway Dublin with a seven-year-old Lenovo Yoga 13, which had similar specs but a much nicer screen and half the weight. After some deliberations and testing various Linux distributions on VirtualBox, I decided on the [Zorin OS][9] distribution, proudly made in Ireland. My choice was driven by the following factors:
|
||||
|
||||
* It's based on Ubuntu Linux, with which I'm most familiar.
|
||||
* It closely resembles Windows 7, being carefully designed with Windows refugees in mind.
|
||||
* It feels lightweight, simple, and sufficiently conservative for Mom. No shiny macOS Big Sur glitz anywhere around!
|
||||
|
||||
|
||||
|
||||
![Zorin OS desktop][10]
|
||||
|
||||
(Tomasz Waraksa, [CC BY-SA 4.0][8])
|
||||
|
||||
### System installation
|
||||
|
||||
I installed the operating system my usual way, with the `/home` folder on a dedicated partition to keep Mom's Stuff safe in the unlikely case of system reinstallation. It's my old trick that makes late-night distro-hopping much easier.
|
||||
|
||||
During installation, I chose Polish as the user interface (UI) language. Just like me, Mom is Polish to the bone. No worries, Linux seems to support every possible language, including [Klingon][11].
|
||||
|
||||
Then, I installed the following applications to cover Mom's needs:
|
||||
|
||||
* Skype
|
||||
* [Signal for Desktop][12]
|
||||
* Google Chrome browser
|
||||
* [Geary][13] email client
|
||||
* [gThumb][14] for photo viewing and editing
|
||||
* [VLC][15] for playing video and music
|
||||
* Softmaker Office for text editing and spreadsheets
|
||||
|
||||
|
||||
|
||||
Notice how there's no antivirus on the list. Yay!
|
||||
|
||||
An hour later, her Zorin OS box was ready and loaded with applications.
|
||||
|
||||
![Zorin OS home folder][16]
|
||||
|
||||
(Tomasz Waraksa, [CC BY-SA 4.0][8])
|
||||
|
||||
### System configuration
|
||||
|
||||
I made myself Mom's Computer Admin by doing the following:
|
||||
|
||||
* Created an admin account for myself
|
||||
* Turned Mom's account into non-admin
|
||||
* Installed the `ssh` daemon for remote unattended access
|
||||
* Added the machine to my Hamachi VPN: This way, I can securely connect via `ssh` without opening port 22 on the router. Hamachi is a VPN service by LogMeIn. An old-school VPN, I mean. Intended not for running Netflix from another country but for connecting computers into a secure network over the internet.
|
||||
* Enabled Uncomplicated Firewall ( `ufw`) and allowed ssh traffic
|
||||
* Installed AnyDesk for logging in to the desktop
|
||||
|
||||
|
||||
|
||||
With this, I have secure ssh access to Mom's laptop. I can perform periodic maintenance via shell without Mom even noticing anything. That's because Linux normally _does not_ require a reboot after completed updates; what a miracle, how's that even possible?
|
||||
|
||||
![Updating software remotely][17]
|
||||
|
||||
(Tomasz Waraksa, [CC BY-SA 4.0][8])
|
||||
|
||||
### Can Mom survive Linux?
|
||||
|
||||
Without the slightest doubt!
|
||||
|
||||
When I showed Mom her new PC, she did ask why this new Windows looked different _again_. I had to reveal that this is not Windows at all, but Linux, and explain why we all love Linux. But she picked it up quickly. The classic Zorin OS desktop is very much like her old Windows 7. I watched her find her way through the system and launch her familiar applications with ease.
|
||||
|
||||
She immediately noticed how much faster the computer starts and how much better it performs.
|
||||
|
||||
She's been asking me when I will do the usual computer cleanup so that it doesn't become slow again. I've explained that, with her average use, it won't be needed. Linux simply doesn't rot on its own as Windows does. So far, this has been true. Her PC runs as smooth and fast as on day one.
|
||||
|
||||
Every now and then, I ask how she feels about her new computer. She invariably answers that she's happy with it. Everything works smoothly. The computer doesn't get busy for no reason. No more interrupting her with Very Important Updates. And the menu is where it should always be. She's comfortable with her usual applications in this entirely new environment.
|
||||
|
||||
Over the year, I've logged in remotely a few times to run routine package upgrades. I've logged in with AnyDesk twice. Once, when Mom asked whether photos from an inserted SD card could be imported automatically into the `~/Pictures` folder, and preferably into folders named by dates. Yes, `gThumb` can easily be made to do that with a bit of Bash. Another time, I logged in to add frequently used websites as desktop icons.
|
||||
|
||||
And this has been all of my effort as Mom's Linux Admin so far! At this pace, I could be Mom's Computer Admin to 50 other moms!
|
||||
|
||||
### Summary
|
||||
|
||||
I hope that my story will inspire you to think about migrating to Linux. In the past, we considered Linux to be too difficult for casual users. But today I believe that the opposite is true. The less proficient computer users are, the more reasons they have to migrate to Linux!
|
||||
|
||||
With Linux, novice users will gain a smooth, polished desktop experience with a multitude of familiar applications. They will be much safer than on any other popular computing platform. And helping them with remote access has never been easier and more secure!
|
||||
|
||||
_Disclaimer: This article is not promoting any of the described products, services, or vendors. I don't have any commercial interest nor associations with them. I'm not trying to suggest that these products or services are best for you, nor promising that your experience will be the same._
|
||||
|
||||
* * *
|
||||
|
||||
_This article originally appeared on [Let's Debug It][18] and is reused with permission._
|
||||
|
||||
Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/6/mom-switch-linux
|
||||
|
||||
作者:[Tomasz][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/tomaszwaraksa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart)
|
||||
[2]: https://www.redhat.com/en/about/press-releases/red-hat-provides-cern-platform-mission-critical-applications
|
||||
[3]: https://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability
|
||||
[4]: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad
|
||||
[5]: https://www.theverge.com/2011/11/14/2559567/tony-fadell-nest-learning-thermostat
|
||||
[6]: https://www.zdnet.com/article/to-infinity-and-beyond-linux-and-open-source-goes-to-mars/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/intro.png (Cowsay "Can Mom Survive Linux?")
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[9]: https://zorinos.com/
|
||||
[10]: https://opensource.com/sites/default/files/uploads/zorin-os-desktop.png (Zorin OS desktop)
|
||||
[11]: https://blogs.gnome.org/muelli/2010/04/klingon-language-support/
|
||||
[12]: https://github.com/signalapp
|
||||
[13]: https://wiki.gnome.org/Apps/Geary
|
||||
[14]: https://wiki.gnome.org/Apps/Gthumb
|
||||
[15]: https://www.videolan.org/vlc/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/zorin-os-home-folder.png (Zorin OS home folder)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/upgrading-software.png (Updating software remotely)
|
||||
[18]: https://letsdebug.it/post/16-linux-for-mars-copters-moms-and-pops/
|
@ -1,160 +0,0 @@
|
||||
[#]: subject: "Using FileZilla for Connecting to SFTP Server Via GUI"
|
||||
[#]: via: "https://itsfoss.com/filezilla-ubuntu/"
|
||||
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Using FileZilla for Connecting to SFTP Server Via GUI
|
||||
======
|
||||
|
||||
If you ask the geeky sysadmins, they will swear by [rsync or scp commands for transferring files between remote server and local system][1].
|
||||
|
||||
However, those are command line methods and not everyone feels comfortable.
|
||||
|
||||
Thankfully, there are some GUI tools available that let you transfer files to or from the remote servers.
|
||||
|
||||
[FileZilla][2] is a popular, cross-platform, open-source tool for this purpose. It supports transferring file using FTP over TLS or SSL (FTPS) and also FTP over SSH (SFTP) along with old FTP protocol.
|
||||
|
||||
Let me show how to install FileZilla on Linux and then use it for file transfer.
|
||||
|
||||
So, let’s get started!
|
||||
|
||||
### Installing FileZilla on Ubuntu and other Linux distributions
|
||||
|
||||
You can get the source code tarball but it is always recommended to use your distribution provided package. Since it is a popular software, it should be available in the software repository of most Linux distributions (if not all). _**Please use your distribution’s software center and package manager**_.
|
||||
|
||||
On Ubuntu, you can install it from the software center:
|
||||
|
||||
![FileZilla is available in the Ubuntu Software Center][3]
|
||||
|
||||
You can also use the command line method to install it.
|
||||
|
||||
```
|
||||
|
||||
sudo apt install filezilla
|
||||
|
||||
```
|
||||
|
||||
If you see the [package not found error][4], you should [enable the Universe repository][5].
|
||||
|
||||
Once installed, go to the menu (by pressing the windows key), type FileZilla and start it.
|
||||
|
||||
![Start FileZilla from the system menu][6]
|
||||
|
||||
### Using FileZilla
|
||||
|
||||
When you first run FileZilla, you’ll see an interface like the picture below.
|
||||
|
||||
![Screenshot of FileZilla running][7]
|
||||
|
||||
The left side pane shows the files and directory from your local system. The right side pane is empty for now. When you connect to a remote server, the files from your remote system will be displayed there.
|
||||
|
||||
Before I show you that, let me share a few details on understanding the important aspects of FileZilla interface.
|
||||
|
||||
#### Understaing the FileZilla interface
|
||||
|
||||
The image below give you an overview of the different sections of the window layout of FileZilla.
|
||||
|
||||
![FileZilla Window Layout | image credit][8]
|
||||
|
||||
The GUI is split in 6 different zones/window layout. Let me briefly explain them to you.
|
||||
|
||||
**1\. Toolbar:** It has a variety of options like opening the Site Manager, refreshing local and/or remote directory file and folder lists, start processing current queue of files to be transferred, stop all transfers and discard files from queue, etc.
|
||||
|
||||
**2\. The Quick connect bar:** As its name suggests, allows you to quickly connect to a remote site without specifying many details about it except the host, username, password and port.
|
||||
|
||||
**3\. The Message log:** It shows you a log, regardless if the connection was successful or not. The errors are in red, normal messages are in white, and commands are in blue.
|
||||
|
||||
**4 & 5\. The Local pane and remote panes**: Both are very similar except for the fact that the Local pane shows contents of a local directory and a context menu has options for uploading files. Whereas, the remote pane shows contents of a remote directory and has options for downloading files from a remote directory to your local storage.
|
||||
|
||||
**6\. Transfer queue**: Lastly, the Transfer queue pane shows the status of items being transferred, their transfer speeds, items in queue and the file transfer history (limited to current instance
|
||||
|
||||
#### Connecting to a SFTP server using FileZilla
|
||||
|
||||
_**You need to know the username, password and the IP address of the remote server. The remote server should also be configured to accept connections with the provided details. You also need to have correct access settings in the destination folder.**_
|
||||
|
||||
To add a new SFTP connection, you need to open the site manager. There are two ways to open it.
|
||||
|
||||
There is a “Site Manager” item under the “Files” menu option on the menu bar. Or, you can click on the “Site manager” icon on the toolbar.
|
||||
|
||||
![the Site Manager button on the toolbar][9]
|
||||
|
||||
Once the Site Manager dialog pops up, click on the “New site” button and [optionally] rename the new site that is added to the entry. I have called mine “test8”.
|
||||
|
||||
![screenshot of the Site Manager][10]
|
||||
|
||||
To the right, under the General tab, ensure that the protocol used is appropriate to what the server administer has set for you. In my case, I set up a SFTP server (FTP over SSH) so I will proceed by choosing the option “SFTP – SSH File Transfer Protocol”.
|
||||
|
||||
The next field is for the IP address of the remote server.
|
||||
|
||||
If you do not mention the port number, FileZilla will assume that the port number to be used is the default SSH port 22.
|
||||
|
||||
There are a few options for the “Logon Type” drop-down. In the Normal logon method, you provide the username and password.
|
||||
|
||||
The Key file authentication method is useful for you if you have a pair of public and private keys set up to authenticate your SSH connection for the user.
|
||||
|
||||
Once you have filled all the appropriate details for the remote server and authentication, click on the “Connect” button positioned at the bottom to connect to the site. Do not worry, the new site you just established a connection to, will be saved in compliance to the “Logon Type”.
|
||||
|
||||
![Remote pane being populated after a successful connection][11]
|
||||
|
||||
If you see a status message as “Connected to <host IP address>” and the most recent status message as “Directory listing of “/” was successful”, you have successfully connected to the remote SFTP server (FTP using the SSH protocol).
|
||||
|
||||
Another indicator of a successful SFTP connection is that the remote directory pane gets populated when a connection is successfully established.
|
||||
|
||||
#### Sending files to remote system
|
||||
|
||||
You must **make sure to be in the directories where you have to transfer the file**. Transferring files is as simple as **double-clicking on the file** without explicitly specifying the target location.
|
||||
|
||||
If you click on a file from the left pane, it immediately gets transferred (or added to the queue if there are pending transfers) to the directory visible in the right pane.
|
||||
|
||||
The same goes from transferring files from right to left, i.e., from remote server to local. **This is why it is important to be in the correct locations in both local and remote systems**.
|
||||
|
||||
Alternatively, you can right-click on the file(s) and upload them (or add them to the upload queue). The destination is always the directory displayed in FileZilla interface.
|
||||
|
||||
![Transfer queue pane showing the local file name, remote destination, transfer speed and an ETA][12]
|
||||
|
||||
There isn’t much difference in either way of uploading files except for convenience and timing.
|
||||
|
||||
#### Downloading files from remote system
|
||||
|
||||
Just like uploading files, you get two options when transferring file from a remote server to local storage, but instead of “Upload” it is “Download”.
|
||||
|
||||
Downloading a file will download that file in the local directory that you currently have open in the Local directory pane.
|
||||
|
||||
You will notice a consistent behavior in downloading and uploading files, except for the sender and receiver. The file transfers will be in done in parallel unless the number of connections is restricted.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Awesome! With the basics covered, you should be able to transfer files to and from your computer to your server. I hope you learnt something new :)
|
||||
|
||||
If you have any queries, please ask them in the [It’s FOSS community forums][13]. If you felt this was helpful to you, do let me know with a comment down below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/filezilla-ubuntu/
|
||||
|
||||
作者:[Pratham Patel][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/pratham/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linuxhandbook.com/transfer-files-ssh/
|
||||
[2]: https://filezilla-project.org/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu-software-center.png?resize=751%2C382&ssl=1
|
||||
[4]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/
|
||||
[5]: https://itsfoss.com/ubuntu-repositories/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu.png?resize=763%2C224&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_filezilla.webp?resize=800%2C431&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/02_filezilla_layout.webp?resize=800%2C504&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_site_manager_annotated.webp?resize=386%2C170&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/04_site_manager.webp?resize=800%2C577&ssl=1
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/05_successful_connection.webp?resize=800%2C431&ssl=1
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/07_transfer_pane_populated-1.webp?resize=800%2C431&ssl=1
|
||||
[13]: https://itsfoss.community/
|
@ -1,142 +0,0 @@
|
||||
[#]: subject: "Mabox Linux – Beautiful Arch Linux with Openbox [Review]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/03/mabox-linux-2022/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Mabox Linux – Beautiful Arch Linux with Openbox [Review]
|
||||
======
|
||||
MABOX LINUX IS A MANJARO LINUX RE-SPIN WITH A LIGHTWEIGHT OPENBOX WINDOW
|
||||
MANAGER, READY TO USE WITH PRE-CONFIGURED THEMES AND UTILITIES. WE
|
||||
REVIEW THE DISTRIBUTION IN THIS POST.
|
||||
If you love window manager, rolling-release-based Arch Linux and are looking for a ready-made Linux distribution with this combination, try Mabox Linux. The Mabox Linux is built on top of the great Manjaro Linux with Openbox Window manager and several native utilities.
|
||||
|
||||
Thanks to the Openbox, this Linux distribution is super-lightweight in resource consumption while being a beautiful desktop for everyone to use. The Mabox Linux tools adapted from BunsenLabs and inspired by Crunchbang brings some of their applications.
|
||||
|
||||
Let’s do a deep dive on this awesome Linux Distribution.
|
||||
|
||||
### Mabox Linux Review
|
||||
|
||||
#### Installation and Live Medium
|
||||
|
||||
One of the advantages of Mabox .ISO is it provides you free and proprietary drivers both the options during the LIVE medium boot process. This helps if you have NVIDIA or other hardware in the system.
|
||||
|
||||
The LIVE desktop lets you install Mabox via the Calamares installer. The installation takes around 3 to 4 minutes on standard hardware, and it is error-free in my test.
|
||||
|
||||
The installer is managed to detect the other operating systems in the test device.
|
||||
|
||||
#### Look and Feel with Customization
|
||||
|
||||
Mabox brings a pre-configured Openbox window manager. The stock version looks nice with dark skin and a menu with panels.
|
||||
|
||||
The top panel is built using Tint2 and split into two sections. And Left panel gives you shortcuts to the main menu, file manager, web browser. Also, the panel have a different menu for the left and right-click mouse button. The right panel contains a resource monitor, volume control, screenshot shortcut and power menu. The top panel is not continuous and stay on top for application windows for certain themes.
|
||||
|
||||
![Mabox Linux with Nord Theme][1]
|
||||
|
||||
At the right section of the desktop, the pre-configured Conky script gives you system information with date, time, storage and other displays.
|
||||
|
||||
The welcome window gives you quick start shortcuts on settings, help and support with links to documentation.
|
||||
|
||||
The window managers are keyboard friendly and sometimes have trouble with the Mouse. But thanks to Openbox and pre-configured Mabox, you can easily use Mouse while increasing your productivity with nifty keyboard shortcuts.
|
||||
|
||||
The right-click menu on the desktop gives you easily search and launch options.
|
||||
|
||||
![Search and Launch from desktop][2]
|
||||
|
||||
If you do not like the default look, you can customize it on your own with just a few clicks via Openbox and Tint2 panel configuration tool.
|
||||
|
||||
![Main Application Menu][3]
|
||||
|
||||
Mabox has different themes as pre-set, including Panel and Concky scripts. You can click and apply with these stunning Mabox themes. It is one of the excellent features if you do not want to get into the hassles of configuring the panels, colours and Conky on your own.
|
||||
|
||||
[][4]
|
||||
|
||||
SEE ALSO: KDE Plasma 5.21 Review - Perhaps the Worthy Linux Desktop to Take on Windows
|
||||
|
||||
A good set of nice wallpaper gives you the flexibility to make it look more fabulous in no time.
|
||||
|
||||
![Mabox Themes][5]
|
||||
|
||||
#### Applications
|
||||
|
||||
Mabox Linux packages all necessary applications in its installer image. Here is a quick list of essential applications that are included.
|
||||
|
||||
* Terminal – terminator
|
||||
* Xpad – quick text pad
|
||||
* File manager – PCManFM
|
||||
* FSearch for desktop file search
|
||||
* Flameshot screenshot utility
|
||||
* Geany text editor
|
||||
* Audacious music player
|
||||
* Firefox web browser
|
||||
|
||||
|
||||
|
||||
Mabox also includes its control centre to manage your system effectively. Mabox control center gives you the option to add/remove applications, update your system, launch several configuration windows for window manager components and many such options.
|
||||
|
||||
If you cannot find any settings, you can easily find them in the Mabox control center via its logical grouping of system settings.
|
||||
|
||||
![Mabox Control Center][6]
|
||||
|
||||
#### What about the performance?
|
||||
|
||||
The performance of Mabox Linux is super impressive. Thanks to the Openbox window manager, Mabox only uses around 350+ MB of RAM while the CPU hovers at 2% to 3% during the idle state.
|
||||
|
||||
The default installation takes around 5.39 GB of disk space which is unbelievable with all these applications and settings programs pre-installed.
|
||||
|
||||
It is so optimized that the highest app consuming more memory is Xorg with 90 MB.
|
||||
|
||||
So, I thought of trying out heavy usage performance. And that performance is also surprising. I opened a file manager, Firefox, with three tabs, one text editor for development, a terminal window and the Control Center. With this workload, Mabox only consumes around 920 MB of memory and CPU at 6% to 7%.
|
||||
|
||||
![Mabox Linux Heavy Workload Performance][7]
|
||||
|
||||
During the [review of several distributions][8], this is the first time I found a distro that did not cross 1 GB of memory during a heavy workload. But the results may vary in different use cases. Still, the metric is impressive.
|
||||
|
||||
### Can Mabox Linux be used as daily driver?
|
||||
|
||||
If you are familiar and comfortable with Arch Linux with the window manager, you can use Mabox Linux as a daily driver. A few well-packaged Arch Linux distros are available with a window manager, and Mabox is one of the best.
|
||||
|
||||
![Mabox Linux Windows 95 pre-configured theme][9]
|
||||
|
||||
### Summary
|
||||
|
||||
I think the Mabox Linux team did a great job packaging all the components with Arch Linux and presented with a nice Linux Distribution. It does look stunning while consuming very few system resources. With the power of rolling-release based Arch Linux, I think you can trust this distro for long term usage.
|
||||
|
||||
You can download Mabox Linux from its [official webpage][10].
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][11], [Twitter][12], [YouTube][13], and [Facebook][14] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/03/mabox-linux-2022/
|
||||
|
||||
作者:[Arindam][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.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-with-Nord-Theme-1024x581.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Search-and-Launch-from-desktop.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Main-Application-Menu.jpg
|
||||
[4]: https://www.debugpoint.com/2021/03/kde-plasma-5-21-review/
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Themes.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Control-Center.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Heavy-Workload-Performance-1024x508.jpg
|
||||
[8]: https://www.debugpoint.com/tag/linux-distro-review
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Windows-95-preconfigured-theme-1-1024x577.jpg
|
||||
[10]: https://maboxlinux.org/
|
||||
[11]: https://t.me/debugpoint
|
||||
[12]: https://twitter.com/DebugPoint
|
||||
[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[14]: https://facebook.com/DebugPoint
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://itsfoss.com/budibase/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -0,0 +1,235 @@
|
||||
[#]: subject: "Top 10 Linux Distributions for Programmers in 2022 [Featured]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Top 10 Linux Distributions for Programmers in 2022 [Featured]
|
||||
======
|
||||
WE REVIEW THE TOP 10 BEST LINUX DISTRIBUTIONS FOR PROGRAMMERS AND
|
||||
DEVELOPERS (IN 2022) TO HELP WITH THEIR WORK AND PERSONAL PROJECTS.
|
||||
The developers or the programmers use various tools and applications for their job or projects. It includes code editors, programming language compilers, add-ons, databases, etc. If you categorise the workflow of a modern developer – it contains a typical workflow as below –
|
||||
|
||||
* accessing to the code repo
|
||||
* programming
|
||||
* debugging
|
||||
* testing
|
||||
* deploying
|
||||
|
||||
|
||||
|
||||
And this typical workflow may need a wide range of tools. A standard list might be like this –
|
||||
|
||||
* Code editors
|
||||
* Simple Text Editors
|
||||
* Web browsers (all variants for a web developer)
|
||||
* Database engine
|
||||
* A local server
|
||||
* The respective programming language compiler
|
||||
* Debuggers
|
||||
* Monitoring or profiling tools (executables or network)
|
||||
|
||||
|
||||
|
||||
Arguably, Linux is the best choice for programming compared to Windows. I am not comparing macOS in this article for several reasons. The primary reason for Linux is the best is because packages and apps with modern technology come as pre-installed or very easy to install in Linux distributions than Windows.
|
||||
|
||||
Hence, in this post, we would like to list the best Linux Distributions for programmers in 2022.
|
||||
|
||||
### Top 10 Linux Distributions for Programmers in 2022
|
||||
|
||||
#### 1\. Fedora Workstation
|
||||
|
||||
![Fedora 35 Workstation][1]
|
||||
|
||||
Perhaps the perfect Linux distribution among this list is Fedora Linux. Its default workstation edition for desktop brings an authentic GNOME desktop experience with its choice of packages.
|
||||
|
||||
Fedora Linux default installation gives you all major development packages out of the box. They include PHP, OpenJDK, PostgreSQL, Django, Ruby on Rails, Ansible, etc.
|
||||
|
||||
Installing additional applications such as Code editors and other packages are super simple with the dnf package manager. You can also take advantage of Software which is an app store where you can search and install applications with just a click of a button.
|
||||
|
||||
Fedora Linux supports Snap and Flatpak, and that gives you more flexibility. You can also take advantage of the RPM Fusion repository in Fedora. The RPM Fusion repo gives you access to many free and non-free packages. Fedora Linux doesn’t want to include these packages in their main repo for license and other obvious reasons.
|
||||
|
||||
You can check out the latest Fedora Linux on their official website below.
|
||||
|
||||
[Download Fedora][2]
|
||||
|
||||
#### 2\. Ubuntu Linux
|
||||
|
||||
![Ubuntu Desktop is a perfect Linux Distribution for Programmers.][3]
|
||||
|
||||
The second Linux distribution in this list is Ubuntu Linux. Ubuntu Linux is the most used Linux distribution today in server and desktop both. Ubuntu provides a long-term support release with five years of official support (plus another five years of maintenance support) and two short-term releases per year for power users.
|
||||
|
||||
Due to its popularity, all the latest packages and application vendors provide Ubuntu (.deb) variants. The popularity also brings massive support in forums and documentation, perfect for developers, especially when you are stuck with errors during the development phase. Learn more about Ubuntu in the below link.
|
||||
|
||||
[Download Ubuntu][4]
|
||||
|
||||
#### 3\. openSUSE
|
||||
|
||||
openSUSE is one of the most stable and professionally built Linux distributions used in critical systems worldwide. This Linux Distribution is a go-to solution for enterprise-level workloads that include desktops, servers and thin clients.
|
||||
|
||||
It has some advantages over Ubuntu and Fedora. First, it has two variants – Leap and Tumbleweed. The openSUSE Leap is a long term support release (LTS) that gives you up-to-date stability. The openSUSE Tumbleweed is a rolling release software that features bleeding edge packages.
|
||||
|
||||
If you need the latest packages and hardware support for your development, then Tumbleweed is your choice. If you need stability and a longer running system with low maintenance, choose openSUSE Leap.
|
||||
|
||||
One of the advantages of using openSUSE for your development work is its package manager YaST. You can automate many activities with ease using the YaST package manager.
|
||||
|
||||
On top of that, the openSUSE software delivery method is outstanding. It has its software portal on the web, which you can visit, search for a package and click install.
|
||||
|
||||
If you are a little experienced in Linux compared to the new users, choose openSUSE for your development work.
|
||||
|
||||
[Download openSUSE][5]
|
||||
|
||||
#### 4\. Manjaro Linux
|
||||
|
||||
Manjaro Linux is an Arch Linux based distribution that makes Arch installation easy. It is based on Arch Linux but brings several features such as a GUI installer like Ubuntu or Linux Mint, pamac installer, its curated repositories and more. Manjaro comes in three primary desktop flavours – GNOME, KDE Plasma and Xfce to cater to almost all user base.
|
||||
|
||||
If you want Arch Linux and its rolling release package base for your development needs but do not want to get into the hassles of installing vanilla Arch, Manjaro is your perfect choice.
|
||||
|
||||
[Download Manjaro][6]
|
||||
|
||||
#### 5\. Arch Linux
|
||||
|
||||
While Manjaro and other Arch-based easy installation Linux distributions are out there, you may still want to get your hands dirty with the [vanilla Arch installation][7] with your custom desktop.
|
||||
|
||||
This is more for power developers or programmers who want more control and a custom Linux operating system built for projects or needs. In those cases, you may want to install Arch Linux with your favourite desktop to set up your development operating system.
|
||||
|
||||
[][8]
|
||||
|
||||
SEE ALSO: Top Nitrux Applications (Maui) Everyone Should Try
|
||||
|
||||
Suppose you are experienced in Arch Linux and computers in general. In that case, this is the best choice among all because it gives you complete control over each package in your custom build Linux operating system.
|
||||
|
||||
[Download Arch Linux][9]
|
||||
|
||||
#### 6\. Pop OS
|
||||
|
||||
The Pop OS (represented as Pop!_OS) was developed by computer manufacturer System76 for their series of hardware. Pop OS is free and open-source based on Ubuntu. It follows the Ubuntu release cycle for its base while bringing additional tweaks, packages customised for users.
|
||||
|
||||
![Pop OS 21.10 Desktop][10]
|
||||
|
||||
Pop OS is perfect for programmers because it natively supports many programming languages based on Ubuntu. It markets itself as popular among computer scientists and programmers for its curated software centre, which has a dedicated section featuring applications for development and programming.
|
||||
|
||||
On top of that, the COSMIC desktop (customised GNOME desktop) in Pop OS gives a unique experience to programmers with auto-tiling, a lovely colour palette, native dark mode and a wide range of settings.
|
||||
|
||||
If you need an Ubuntu base and want a stable programmer-friendly Linux distribution, then choose Pop OS.
|
||||
|
||||
[Download POP OS][11]
|
||||
|
||||
#### 7\. KDE Neon
|
||||
|
||||
If you are a developer who feels comfortable in the KDE Plasma desktop and wants a Qt-based development environment, then KDE Neon is perfect for you.
|
||||
|
||||
KDE Neon is a Linux distribution based on the Ubuntu LTS version with the latest KDE Plasma desktop, KDE Framework packages. So, in KDE Neon, you get Ubuntu LTS stability with bleeding-edge KDE packages with Qt.
|
||||
|
||||
This is a perfect Linux Distribution if you need a fast system with out of the box applications, a friendly user interface and huge community support.
|
||||
|
||||
[Download KDE Neon][12]
|
||||
|
||||
#### 8\. Debian
|
||||
|
||||
Debian GNU/Linux needs no introduction. Debian’s stable branch is the base of Ubuntu and all its derivatives. Hence it is one of the primary and stable Linux. And it is perfect for your development environment because it gives you ultimate stability with multi-year support.
|
||||
|
||||
Although, Debian’s stable branch is slightly conservative on adopting the latest packages. Debian maintainers carefully check and merges packages because the entire world (well, almost) depends on Debian stability.
|
||||
|
||||
It is a perfect programming environment for advanced users and sysadmins if you are looking for a stable and long-running dev environment with low maintenance effort.
|
||||
|
||||
[Download Debian Linux][13]
|
||||
|
||||
#### 9\. Kali Linux
|
||||
|
||||
The Kali Linux is developed by Offensive Security primarily targeted to ethical hackers and penetration testers who look out for vulnerabilities in networks. It comes with tons of hacking tools and applications pre-installed.
|
||||
|
||||
It can act as a perfect Linux distribution for programmers and developers if you are experienced enough. Go for Kali Linux if you are well versed with Linux with some experience in navigating around errors and dependencies.
|
||||
|
||||
[Download Kali Linux][14]
|
||||
|
||||
#### 10\. Fedora Labs Options
|
||||
|
||||
And the final Linux Distribution in this list is some combinations of Linux Distributions from Fedora Linux.
|
||||
|
||||
Fedora Labs provides specially curated Linux Distributions for programmers, scientists and students with pre-loaded applications, respective packages and utilities. Many people are not aware of these, and when appropriately configured, they can act as perfect ready-made Linux distribution for you.
|
||||
|
||||
Here’s a summary of them.
|
||||
|
||||
* Combination of Scientific and numerical open-source tools with KDE Plasma desktop.
|
||||
* Application list includes –
|
||||
* GNU Scientific Library for C/C++
|
||||
* MATLAB Compatible MGNU Octave
|
||||
* LaTeX
|
||||
* Maxima Computer Algebra System
|
||||
* Gnuplot for drawing 2D and 3D graphs
|
||||
* Pandas Python library for data science
|
||||
* IPython
|
||||
* Packages for Java and R programming languages
|
||||
* Learn more about Fedora Scientific and [download it here][15].
|
||||
|
||||
|
||||
* Open source neuroscience applications and packages with GNOME Desktop environment. Learn more and download here.
|
||||
|
||||
|
||||
* Perfect Linux distribution combines the best open-source robotics applications and packages targeted to beginner and experienced Robotics scientists and programmers.
|
||||
* Learn more and [download it here][16].
|
||||
|
||||
|
||||
|
||||
from Fedora Linux includes [Fedora Security Labs][17], [Fedora Astronomy][18] and [Fedora Python Classroom][19], which you want to check out.
|
||||
|
||||
These Fedora Labs options can be perfect Linux distributions for programming projects or working in specific science fields.
|
||||
|
||||
### Summary
|
||||
|
||||
So, how do you choose your favourite among this list of best Linux Distributions for programmers?
|
||||
|
||||
If you are unsure and want to have a development system up and running with minimal effort, go for Fedora Workstation or Ubuntu.
|
||||
|
||||
If you have spare time or want more control in your system, like experimenting and being comfortable with occasional errors, then go for Arch Linux based systems.
|
||||
|
||||
Pop OS is also a good choice for new developers new to the Linux ecosystem. For specific needs, go to the Fedora Labs options.
|
||||
|
||||
I hope this list of best Linux Distributions for programmers in 2022 gives you some guidance on choosing your favourite Linux distributions for programming and development.
|
||||
|
||||
Cheers.
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][20], [Twitter][21], [YouTube][22], and [Facebook][23] and never miss an update!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022/
|
||||
|
||||
作者:[Arindam][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.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2021/11/Fedora-35-Workstation-1024x528.jpg
|
||||
[2]: https://getfedora.org/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Desktop-is-a-perfect-Linux-Distribution-for-Programmers-1024x579.jpg
|
||||
[4]: https://ubuntu.com/download
|
||||
[5]: https://www.opensuse.org/
|
||||
[6]: https://manjaro.org/download/
|
||||
[7]: https://www.debugpoint.com/2022/01/archinstall-guide/
|
||||
[8]: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/
|
||||
[9]: https://archlinux.org/download/
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pop-OS-21.10-Desktop-1024x579.jpg
|
||||
[11]: https://pop.system76.com/
|
||||
[12]: https://neon.kde.org/download
|
||||
[13]: https://www.debian.org/distrib/
|
||||
[14]: https://www.kali.org/
|
||||
[15]: https://labs.fedoraproject.org/en/scientific/
|
||||
[16]: https://labs.fedoraproject.org/en/robotics/
|
||||
[17]: https://labs.fedoraproject.org/en/security
|
||||
[18]: https://labs.fedoraproject.org/en/astronomy
|
||||
[19]: https://labs.fedoraproject.org/en/python-classroom
|
||||
[20]: https://t.me/debugpoint
|
||||
[21]: https://twitter.com/DebugPoint
|
||||
[22]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[23]: https://facebook.com/DebugPoint
|
@ -0,0 +1,238 @@
|
||||
[#]: subject: "Not a Systemd Fan? Here are 11 Systemd-Free Linux Distributions"
|
||||
[#]: via: "https://itsfoss.com/systemd-free-distros/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Not a Systemd Fan? Here are 11 Systemd-Free Linux Distributions
|
||||
======
|
||||
|
||||
systemd is a popular init system adopted by most of the major Linux distributions backed by dozens of developers and companies.
|
||||
|
||||
In case you’re curious, the init system is the first process after the Linux Kernel comes into action in the boot process to initialize various device management, logging, and networking service. You may know them as [daemons][1] as well.
|
||||
|
||||
Technically, systemd solved numerous issues that made Linux distributions more reliable to use on desktop and massive server configurations.
|
||||
|
||||
So, it is safe to say that many believe that it is meant to be to make the boot process reliable and fast with the ability to initialize things in parallel,.
|
||||
|
||||
However, there are other users who absolutely hate the inclusion of it in modern Linux distributions. Hence, demanding systemd-free Linux distributions.
|
||||
|
||||
But, why is that?
|
||||
|
||||
Furthermore, what are your options if you do not want systemd on your Linux system?
|
||||
|
||||
This article will briefly discuss why some users prefer system-free distros and some of the best options available.
|
||||
|
||||
![][2]
|
||||
|
||||
### Why systemd-free Alternatives?
|
||||
|
||||
Primarily, systemd is considered as a bloated implementation compared to the classic init systems like SysVinit (or System V init).
|
||||
|
||||
It is also believed to go against the UNIX philosophy, where the aim should have been to keep things simple and focus on doing a single thing efficiently.
|
||||
|
||||
Moreover, systemd is a complex implementation with various modules, which potentially increases the attack surface compared to SysVinit.
|
||||
|
||||
In addition to some of these reasons, desktop environments like GNOME and KDE are known to depend on systemd components. However, some argue that other tools/services should not be entirely dependent on systemd, taking the freedom of a user to use another init system.
|
||||
|
||||
### 11 Systemd-free Linux Distro Options
|
||||
|
||||
However, the list of distributions without systemd involves some options that use [elogind][3] and some systemd parts.
|
||||
|
||||
These are some of the options that help you run distros without systemd while fulfilling some of the dependencies of systemd.
|
||||
|
||||
Fret not, the list also involves options that are entirely systemd-free without elogind and other systemd-parts. The list mentions the use of the same wherever necessary.
|
||||
|
||||
The list is in no particular order of ranking.
|
||||
|
||||
#### 1\. Devuan
|
||||
|
||||
![Credits: Distrowatch][4]
|
||||
|
||||
Devuan is a Debian fork without systemd. It is usually based on the latest stable Debian version available.
|
||||
|
||||
The project’s aim is to allow users to control the choice of Init system. You can choose to use sysVinit, runit, and openRC.
|
||||
|
||||
With Devuan, you will have access to all the desktop environments that are available in Debian. It works with the systemd-free configurations. Compared to some other systemd-free distros, Devuan can be an easier option with respectable accessibility improvements and a smooth installation process.
|
||||
|
||||
At the time of publishing this, you can try Devuan on 32-bit and 64-bit systems.
|
||||
|
||||
[Devuan][5]
|
||||
|
||||
#### 2\. AntiX
|
||||
|
||||
![Credits: Distrowatch][6]
|
||||
|
||||
AntiX is an interesting systemd-free distro based on Debian (Stable), which is also [one of the best options for 32-bit systems][7].
|
||||
|
||||
Considering it offers support for both 64-bit and 32-bit systems and uses IceWM window manager, it is [one of the most lightweight options][8] as well.
|
||||
|
||||
You also get the option to use Fluxbox, and a couple of other window managers as per your requirements.
|
||||
|
||||
When it comes to the Init system, you can choose to download the runit edition or sysVinit version. There are different editions available to get started.
|
||||
|
||||
[AntiX][9]
|
||||
|
||||
#### 3\. Void Linux
|
||||
|
||||
![Credits: Distrowatch][10]
|
||||
|
||||
Void Linux is a unique offering that is not based on any existing Linux distro. It is entirely independent and actively developed.
|
||||
|
||||
It prefers to use runit as the init system instead of systemd. While it focuses on providing stability, they follow a [rolling release schedule][11] with their continuous build system.
|
||||
|
||||
You get to use its native package manager, written from scratch, to quickly install and manage software in your system.
|
||||
|
||||
They offer detailed documentation to explain the available features and instructions to configure your experience.
|
||||
|
||||
[Void Linux][12]
|
||||
|
||||
#### 4\. GoboLinux
|
||||
|
||||
![Credits: Distrowatch][13]
|
||||
|
||||
If you are feeling adventurous, and do not have an issue playing with the terminal, GoboLinux is an interesting pick. While it does offer a desktop, you get the bare minimum and don’t expect something like you see in Ubuntu.
|
||||
|
||||
Unlike most, it is a modular Linux distribution that focuses on an efficient file system to organize the programs. Usually, when we install something on Linux, the files for programs get scattered all over the system at different directories.
|
||||
|
||||
GoboLinux aims to simplify that by giving each program its directory. On top of all the unique points, it is also a systemd-free distro.
|
||||
|
||||
[GoboLinux][14]
|
||||
|
||||
#### 5\. Alpine Linux
|
||||
|
||||
![][15]
|
||||
|
||||
Alpine Linux is yet another independent Linux distribution without systemd. When it comes to init system, it uses OpenRC.
|
||||
|
||||
The distribution focuses on security and resource efficiency. So, if you were looking for a simple systemd-free distro with a focus on security, Alpine Linux can be a good choice.
|
||||
|
||||
[Alpine Linux][16]
|
||||
|
||||
### 6\. Artix
|
||||
|
||||
![Credits: Distrowatch][17]
|
||||
|
||||
Artix is an Arch-based distro without systemd. You can configure it to use OpenRC, Runit, or dinit (a new init system).
|
||||
|
||||
It does utilize **elogind** as its user login manager to try making the move to a systemd-free distro seamless. However, if you dislike its presence, you can try running it without it.
|
||||
|
||||
Compared to some other options, Artix is only suitable for experienced Arch users who can configure their setup.
|
||||
|
||||
[Artix Linux][18]
|
||||
|
||||
### 7\. TinyCore Linux
|
||||
|
||||
![Credits: Distrowatch][19]
|
||||
|
||||
TinyCore Linux is a modular Linux distribution with community-built extensions. You get a Linux kernel, root filesystem, and some startup-up scripts to install some kernel modules.
|
||||
|
||||
Basically, you build your minimal Linux distribution with TinyCore Linux.
|
||||
|
||||
As the name suggests, it is a tiny installation barely taking up any storage space (as low as 10 MB) as per modern OS standards.
|
||||
|
||||
Considering it is modular, you can fully customize your configuration without systemd, or making use of elogind. You can quickly install a variety of desktop environments and window managers to get started.
|
||||
|
||||
For obvious reasons, it can run perfectly fine on older computers.
|
||||
|
||||
[TinyCore Linux][20]
|
||||
|
||||
### 8\. Chimera Linux
|
||||
|
||||
![][21]
|
||||
|
||||
Chimera Linux is an experimental option if you like to compile things yourself and use a Linux distribution. However, you get ISO images available with GUI.
|
||||
|
||||
It is based on FreeBSD, and uses dinit as its init system.
|
||||
|
||||
You can install GNOME or Enlightenment desktop with Chimera Linux to get a full-fledged desktop experience.
|
||||
|
||||
[Chimera Linux][22]
|
||||
|
||||
### 9\. Venom Linux
|
||||
|
||||
![Credits: Distrowatch][23]
|
||||
|
||||
Venom Linux is yet another source-based Linux distribution, giving you the ability to customize things while keeping it minimal.
|
||||
|
||||
It does not rely on systemd or elogind.
|
||||
|
||||
[Venom Linux][24]
|
||||
|
||||
### 10\. Kiss Linux
|
||||
|
||||
Kiss Linux is a rolling release distribution where you need to download the tarball, unpack and rebuild the system as per your requirements.
|
||||
|
||||
The default init system is busybox. But, you can experiment with other init systems as well.
|
||||
|
||||
[Kiss Linux][25]
|
||||
|
||||
### 11\. PCLinuxOS
|
||||
|
||||
![PCLinuxOS][26]
|
||||
|
||||
PCLinuxOS is a fantastic choice for users who want a working desktop environment without all the hassle.
|
||||
|
||||
It does not rely on systemd, but you also get all the essential tools with the distribution baked in. So, compared to most other options, the challenges of not having systemd will be minimal, making the user experience better.
|
||||
|
||||
It uses sysVinit and also features a package manager to help you manage software.
|
||||
|
||||
[PCLinuxOS][27]
|
||||
|
||||
### Systemd or Not?
|
||||
|
||||
Bloat or not, Systemd has made it possible to make numerous things easy while improving performance.
|
||||
|
||||
You will not have any compatibility issues when choosing a distro with systemd.
|
||||
|
||||
Considering most of the popular Linux distributions rely on it, there’s something about it that makes sense to provide a better user experience to the end-user.
|
||||
|
||||
However, if you are someone who wants an init system that follows the traditional approach, systemd-free distros should suit you well.
|
||||
|
||||
Note that you might face some issues/challenges when it comes to some systemd-free distros. So, make sure you do your research before trying anything.
|
||||
|
||||
If you know of some other good Linux distro that doesn’t use systemd, do let us know in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/systemd-free-distros/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/linux-daemons/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/systemd-free-distros.png?resize=800%2C450&ssl=1
|
||||
[3]: https://wiki.gentoo.org/wiki/Elogind
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/devuan.png?resize=800%2C500&ssl=1
|
||||
[5]: https://www.devuan.org/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/antix.png?resize=800%2C500&ssl=1
|
||||
[7]: https://itsfoss.com/32-bit-linux-distributions/
|
||||
[8]: https://itsfoss.com/lightweight-linux-beginners/
|
||||
[9]: https://antixlinux.com/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/void.jpg?resize=800%2C500&ssl=1
|
||||
[11]: https://itsfoss.com/rolling-release/
|
||||
[12]: https://voidlinux.org/
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gobo.png?resize=800%2C450&ssl=1
|
||||
[14]: https://gobolinux.org/
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/AlpineDesktop.png?resize=800%2C452&ssl=1
|
||||
[16]: https://alpinelinux.org/
|
||||
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/artix.jpg?resize=800%2C500&ssl=1
|
||||
[18]: https://artixlinux.org/
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/tinycore.jpg?resize=800%2C640&ssl=1
|
||||
[20]: http://tinycorelinux.net/
|
||||
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/chimera-screenshot.jpg?resize=800%2C450&ssl=1
|
||||
[22]: https://chimera-linux.org/
|
||||
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/venom.jpg?resize=800%2C500&ssl=1
|
||||
[24]: https://venomlinux.org/
|
||||
[25]: https://kisslinux.org/
|
||||
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/pclinuxos.jpg?resize=800%2C500&ssl=1
|
||||
[27]: https://www.pclinuxos.com/
|
@ -0,0 +1,200 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lkxed)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Power up your Linux terminal text editor with ed)
|
||||
[#]: via: (https://opensource.com/article/20/12/gnu-ed)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
使用 ed 来启动你的 Linux 终端文本编辑器
|
||||
======
|
||||
这个看似简单的编辑器为用户提供了许多易于学习和使用的命令。
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
GNU `ed` 命令是一个行编辑器。它被认为是标准的 Unix 文本编辑器,因为它是首个出现在 Unix 的文本编辑器,并且它曾经无处不在,你在任何一个 POSIX 系统中都能找到它(通常来说,你现在也可以)。在某种程度上,你也可以很容易看出来它是第一个文本编辑器,因为它在许多方面的功能都十分基础。和其他大多数的文本编辑器不同,它不会打开一个属于自己的窗口或显示区域,事实上,在默认情况下,它甚至不会提示用户输入文字。从另一个方面来说,它在交互功能上的缺失也可以成为一个优点。它是一个多功能的编辑器,你可以用简短的命令控制它,无论是在交互式的命令行中,还是在编写的 shell 脚本里。
|
||||
|
||||
### 安装 ed
|
||||
|
||||
如果你正在使用 Linux 或者 BSD 的话,你很可能已经默认安装了 `ed`(在 Linux 上是 GNU 的 `ed`,而在 BSD 上是 BSD 的 `ed`)。但是,一些极简的环境可能没有包括 `ed`,这也没关系,你的发行版的软件仓库中很可能有 `ed` 可供下载。macOS 默认安装了 BSD 的 `ed`。
|
||||
|
||||
### 启动 ed
|
||||
|
||||
当你启动 `ed` 的时候,你的终端提示符不见了,看起来好像是 `ed` 停止运行了。其实它没有,它只是在等待你输入指令而已。
|
||||
|
||||
|
||||
```
|
||||
$ ed
|
||||
```
|
||||
|
||||
为使 `ed` 显示更详细的信息,你可以输入命令 `p` 让它返回一个提示符:
|
||||
|
||||
|
||||
```
|
||||
$ ed
|
||||
p
|
||||
?
|
||||
```
|
||||
|
||||
这个问号(`?`)是默认的 `ed` 提示符。
|
||||
|
||||
### 缓存
|
||||
|
||||
当 `ed` 激活时,你其实是在和一个叫 _<ruby>缓存<rt>buffer</rt></ruby>_ 的东西打交道。缓存是内存中的一块区域。你并不会直接编辑文件,而是在编辑它对应的缓存。当你退出 `ed` 却没有把修改保存到磁盘的文件上时,所有的修改都会丢失,因为它们只在缓存中存在。(这听起来可能很耳熟,如果你是一个习惯了<ruby>初始抓取缓存<rt>initial scratch buffer</rt></ruby>的有经验的 Emacs 用户的话。)
|
||||
|
||||
### 使用 `ed` 输入文本
|
||||
|
||||
启动 `ed` 后,你处于命令模式。这意味着你可以向编辑器发送指令,比如让它显示一个提示符,而不是空白区域。你可以使用 `a` 命令开始附加文本到当前的缓存,使用一个实心的点 `.` 来终止输入。比如,下面的这个例子往缓存中附加了两行文字(“hello world” 和 “hello ed”):
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
a
|
||||
hello world
|
||||
hello ed
|
||||
.
|
||||
```
|
||||
|
||||
使用点 `.` 终止输入后,你将回到命令模式。
|
||||
|
||||
### 查看缓存
|
||||
|
||||
怎样查看当前缓存里都有什么呢?你可以输入想要查看的行号,也可以使用 `,p` 命令来显示所有的行:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
1
|
||||
hello world
|
||||
2
|
||||
hello ed
|
||||
,p
|
||||
hello world
|
||||
hello ed
|
||||
```
|
||||
|
||||
### 写入文件
|
||||
|
||||
如果你现在对文本很满意,你可以使用 `w` 命令把缓存写入到文件中,后面跟上目标文件名:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
w example.txt
|
||||
19
|
||||
```
|
||||
|
||||
写操作后显示的那个数字代表着写入到文件中的字符数。
|
||||
|
||||
### 读取文件
|
||||
|
||||
除了使用 `ed` 来读取文本,你也可以使用 `r` 命令把一个已经存在的文件加载到到缓存里:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
r myfile.txt
|
||||
```
|
||||
|
||||
另外,你也可以在启动 `ed` 时,在它后面加上你想要加载到缓冲里的文件名:
|
||||
|
||||
|
||||
```
|
||||
$ ed myfile.txt
|
||||
```
|
||||
|
||||
### 编辑缓冲
|
||||
|
||||
鉴于 `ed` 是一个文本编辑器,你当然可以使用一种特殊的语法来编辑缓存中的文本。使用 `sed` 或 `vim` 的用户或许会觉得这个语法很熟悉。假设现在缓存中已经加载了一个文件:
|
||||
|
||||
|
||||
```
|
||||
$ ed myfile.txt
|
||||
,p
|
||||
This is an example document.
|
||||
There is some text, but not much.
|
||||
There is some errors, but not much.
|
||||
```
|
||||
|
||||
如果你要把第一句话中的 `document` 修改为 `file`,你可以先选择目标行(1),然后使用 `s` 命令调用搜索函数,后面跟着搜索文本和替换文本:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
1
|
||||
This is an example document.
|
||||
s/document/file/
|
||||
1
|
||||
This is an example file.
|
||||
```
|
||||
|
||||
如果你要编辑其他行,步骤也是一样的,只需提供一个不同的行号即可:
|
||||
|
||||
|
||||
```
|
||||
?
|
||||
3
|
||||
There is some errors, but not much.
|
||||
s/is/are/
|
||||
s/much/many/
|
||||
```
|
||||
|
||||
你可以使用 `,p` 命令来看到你对缓存的历史编辑记录:
|
||||
|
||||
|
||||
```
|
||||
This is an example file.
|
||||
There is some text, but not much.
|
||||
There are some errors, but not many.
|
||||
```
|
||||
|
||||
当然,这些修改只存在于缓存中。你如果在 `ed` 编辑器外查看这个文件,你只会看到原始的文本:
|
||||
|
||||
|
||||
```
|
||||
$ cat myfile.txt
|
||||
This is an example document.
|
||||
There is some text, but not much.
|
||||
There is some errors, but not much.
|
||||
```
|
||||
|
||||
如果你要把这些修改保存回文件中,使用 `w` 命令即可:
|
||||
|
||||
|
||||
```
|
||||
w myfile.txt
|
||||
258
|
||||
```
|
||||
|
||||
### 清空缓存
|
||||
|
||||
如果想要得到一个新的缓存,以此来打开一个新的文件,或者把一个新的文件加载到不同的环境中,你可以使用 `c` 命令。使用这个清空缓存后,什么也不会输出,因为缓冲已经是空的了:
|
||||
|
||||
|
||||
```
|
||||
c
|
||||
,p
|
||||
```
|
||||
|
||||
### 退出
|
||||
|
||||
如果要退出当前的 `ed` 会话,你可以使用 `q` 命令。它并不会给你一个保存缓存的机会,所以你要确保自己在这之前执行了保存操作。
|
||||
|
||||
### 尝试一下 ed 吧
|
||||
|
||||
`ed` 还可以做到很多事情,学习 `ed` 可以让你知道它和部分的 `vim` 是如何工作的。我并没有尝试使用 `ed` 来写这篇文章,老实说,我也不认为它是通常意义上的最佳文本编辑器。但是,`ed` 仍然是一个出色的编辑器。通过阅读它的文档,你可以很轻松地学会它。在 GNU 系统上,你可以使用 `info ed` 来查看它的操作手册。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/gnu-ed
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
@ -1,327 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (hwlife )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Set up a minimal server on a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/1/minimal-server-raspberry-pi)
|
||||
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||
|
||||
|
||||
|
||||
在树莓派上创建一个最小化的服务器
|
||||
|
||||
======
|
||||
|
||||
不要舍弃旧配置的树莓派,这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。
|
||||
|
||||
![Raspberry Pi board Model B][1]
|
||||
|
||||
|
||||
|
||||
最近,在我的 [树莓派][2]上的储存卡不工作了。它已经作为服务器持续使用将近两年了,这为我提供了一个开始探索和修正问题的好机会。在初始化安装完成以后,它开始表现出一些磁盘方面的问题,并且官方树莓派操作系统发布了一个有重大意义的更新(Raspbian更名为Raspberr Pi OS)。所以我买了一个新的储存卡并开始重装。
|
||||
|
||||
|
||||
|
||||
尽管树莓派3B不是最新的硬件,但它对运行最小化的服务器提供多样化服务还是足够的。我认为我之前的安装用了完整安装镜像包括图形用户界面和许多其他的软件包是没有必要的。
|
||||
|
||||
|
||||
这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。
|
||||
|
||||
|
||||
### 开始
|
||||
|
||||
|
||||
|
||||
开始,要为树莓派创建一个新的系统分区。这要求两件事:系统镜像文件和储存卡。
|
||||
|
||||
#### 下载树莓派系统镜像文件
|
||||
|
||||
|
||||
|
||||
当有好几种操作系统可用的时候,我选择坚持树莓派官方支持的系统。
|
||||
|
||||
|
||||
第一步是从[Raspberry Pi OS][3]官方网站上下载最新的系统镜像文件到计算机,让后写入储存卡。有三个不同的镜像被提供,我选择树莓派精简版。它是最小化的操作系统只包含必要的文件为基本系统,所以它将占用最少的磁盘空间和系统内存。(当我下载系统的时候,发布日期是2020年8月20日,但是它已经被更新到最新。我不期望有什么巨大不同,但是我建议读一下发行说明。)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### 写树莓派系统镜像到储存卡
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
第二步是写下载的系统镜像到储存卡。我的卡之前用过,当我把它插入我的Linux桌面之后,它自动加载了两个存在的分区。我不能写入镜像直到我卸载了这两个分区。
|
||||
|
||||
我不得不用`lsblk`命令来证实`/dev/mmcblk0`设备文件的路径:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
`# lsblk -p`
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
我用`umount`命令卸载了这两个分区:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
# umount /dev/mmcblk0p2
|
||||
|
||||
# umount /dev/mmcblk0p1
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
一旦分区被卸载,就可以将镜像文件写入到储存卡了。尽管有许多图形化工具,我还是习惯是用 `dd`命令:
|
||||
|
||||
|
||||
|
||||
```
|
||||
`# dd bs=4M if=/home/alan/Downloads/raspios/2020-08-20-raspios-buster-armhf-lite.img of=/dev/mmcblk0 status=progress conv=fsync`
|
||||
```
|
||||
|
||||
#### 启动树莓派
|
||||
|
||||
你只需要一个显示器,键盘,电源适配器来使用树莓派。我也有一个以太网口用网络连接,不过我更喜欢通过无线网络来搭建一个专用的服务器。
|
||||
|
||||
插入储存卡并打开电源。一旦成功启用,用默认的缺省密码来进行登录:用户名 `pi` and 密码`raspberry`。
|
||||
|
||||
### 系统设置
|
||||
|
||||
|
||||
按照以下步骤尽可能最小化设置磁盘空间,内存使用等。我建议花时间尽可能正确的研究每个配置。通常有几种应用配置的方法,有些配置文件和目录可能会被丢弃,所以要查看产品文档确保你没有应用过时的配置。
|
||||
|
||||
|
||||
#### 运行 raspi-config
|
||||
|
||||
在树莓派系统上这个主设置程序叫做raspi-config。登录以后立即运行它:
|
||||
|
||||
|
||||
```
|
||||
`# raspi-config`
|
||||
```
|
||||
|
||||
![Raspberry Pi config main window][4]
|
||||
|
||||
|
||||
它出现一个选项来扩展根文件系统用来利用储存卡上所有可利用的空间。选择这个选项之后,重启并重新登录。
|
||||
|
||||
|
||||
用 `df`命令来验证储存卡的总容量是否被完全使用:
|
||||
|
||||
```
|
||||
`# df -h`
|
||||
```
|
||||
|
||||
|
||||
如果你需要设置其他选项,请再次运行`raspi-config`。它们中的一些选项可以根据你的偏好和配置进行变化。通过设置整个选项确定没有丢失之后,我建议按照以下变化调整最优性能。(我忽略了一些我们有做任何变化的选项。)
|
||||
|
||||
* **System options:** 你能设置主机名,最好使用完全限定的域名(FQDN)是强烈建议的。你也能在这里更改你的密码。
|
||||
* **Interface options:** 开启SSH服务。
|
||||
* **Performance options:** 减少GPU内存到最低设 (16MB)。
|
||||
* **Localization options:** 选择你的时区,位置,键盘类型。
|
||||
* **Advanced options:** 这个选项包括扩展根文件系统的扩展文件系统选项。如果你还没有扩展,去确定将所有可用空间扩展到储存卡上。
|
||||
* **Update:** 立即进入更新选项来更新raspi-config工具。如果更新可用,它将被下载并应用,否则,raspi-config将会在几秒钟重启。
|
||||
|
||||
|
||||
一旦你在raspi-config中完成这些配置,选择**完成**退出工具.
|
||||
|
||||
|
||||
#### 手动配置
|
||||
|
||||
|
||||
我建议有几个其他的更改。他们全都是要求编辑某种配置文件来手动更改设置的。
|
||||
|
||||
##### 设置静态ip地址
|
||||
|
||||
|
||||
一般来说,用静态ip地址设置服务器是最好不过的了。通过 `ip`命令来验证网络接口并设置ip地址和你的缺省网关(路由)和域名服务(DNS)地址:
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
# ip link
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
|
||||
link/ether b8:27:eb:48:3f:46 brd ff:ff:ff:ff:ff:ff
|
||||
```
|
||||
|
||||
|
||||
你也有必要知道你的缺省网关和更多的DNS服务器地址。加入这些信息到`/etc/dhcpcd.conf`这个配置文件中(我强烈建议更改之前对这个文件做一个备份):
|
||||
|
||||
|
||||
```
|
||||
# cd /etc
|
||||
# cp -a dhcpcd.conf dhcpcd.conf.original
|
||||
```
|
||||
|
||||
按照以下来编辑文件:
|
||||
|
||||
|
||||
```
|
||||
# vi dhcpcd.conf
|
||||
|
||||
# static IP configuration:
|
||||
interface eth0
|
||||
static ip_address=192.168.1.5/24
|
||||
static routers=192.168.1.1
|
||||
static domain_name_servers=192.168.1.3 192.168.1.4
|
||||
```
|
||||
|
||||
##### 关闭IPV6协议
|
||||
|
||||
|
||||
除非你有特别需要使用IPV6,你可能更会选择来禁用它。做这个只需要创建包含一行直接指令给Linux内核不让它开启IPV6的两个文件。
|
||||
|
||||
首先,创建 `/etc/sysctl.d/disable-ipv6.conf`文件并添加行`net.ipv6.conf.all.disable_ipv6 = 1`:
|
||||
|
||||
|
||||
```
|
||||
# cd /etc/sysctl.d
|
||||
# echo "net.ipv6.conf.all.disable_ipv6 = 1" > disable-ipv6.conf
|
||||
```
|
||||
|
||||
|
||||
然后创建`/etc/modprobe.d/blacklist-ipv6.conf`文件并添加行 `blacklist ipv6`:
|
||||
|
||||
|
||||
|
||||
```
|
||||
# cd /etc/modprobe.d
|
||||
# echo "blacklist ipv6" > blacklist-ipv6.conf
|
||||
```
|
||||
|
||||
|
||||
##### 关闭WiFi,蓝牙和音频
|
||||
|
||||
|
||||
我的服务器用于特定目的并不需要蓝牙和音频,同时,它用以太网连接,并不使用无线(WiFi)。除非你计划用它们,按照以下步骤来关闭它们。
|
||||
|
||||
|
||||
对`/boot/config.txt`这个文件做一下更改 _(再说一遍, 我建议为这个文件做个备份)_:
|
||||
|
||||
|
||||
|
||||
```
|
||||
# cd /boot
|
||||
# cp -a config.txt config.txt.original
|
||||
```
|
||||
|
||||
|
||||
加入以下两个指令到文件底部来禁用蓝牙和WIFI:
|
||||
|
||||
* `dtoverlay=disable-bt`
|
||||
* `dtoverlay=disable-wifi`
|
||||
|
||||
|
||||
|
||||
这些echo命令就可以完成:
|
||||
|
||||
```
|
||||
# cd /boot
|
||||
# echo "dtoverlay=disable-bt" >> config.txt
|
||||
# echo "dtoverlay=disable-wifi" >> config.txt
|
||||
```
|
||||
|
||||
|
||||
要关闭音频,更改 `dtparam=audio`的参数为 `off`。你可以用一个简短的命令 `sed`来完成:
|
||||
|
||||
|
||||
```
|
||||
`# sed -i '/dtparam=audio/c dtparam=audio=off' config.txt`
|
||||
```
|
||||
|
||||
|
||||
最后一步是禁用WIFI服务,用`systemctl mask` 命令来操作:
|
||||
|
||||
|
||||
```
|
||||
`systemctl mask wpa_supplicant.service`
|
||||
```
|
||||
|
||||
|
||||
如果你不需要其他服务的话,也可以禁用它们:
|
||||
|
||||
|
||||
|
||||
* **禁用调制解调器服务** [code]`systemctl disable hciuart`
|
||||
```
|
||||
* **Disable Avahi-daemon:** [code]`systemctl disable avahi-daemon.service`
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 最后一步
|
||||
|
||||
* **检查你的内存使用量** [code]`# free -h`[/code] 我震惊了:我的系统只用了30MB的内存
|
||||
* **创建个人账户:** 建议为登录这台服务器的个人创建用户账户。你能分配他们到sudo组允许他们发布管理命令。举个例子,创建一个用户名为George的一个账户:: [code] # adduser george
|
||||
# usermod -a -G adm,sudo,users george
|
||||
```
|
||||
* **得到更新:** 这是一个重要的步骤。应用更新到最新来修复树莓派操作系统: [code] # apt update
|
||||
# apt full-upgrade
|
||||
```
|
||||
* **重启:** 重启你的新服务器是一个好主意: [code]`# systemctl reboot`
|
||||
```
|
||||
* **安装Cockpit:** 你可以在树莓派系统上安装 [Cockpit][5], 以Linux网络控制台而著名. 它提供了一个基于HTML界面来远程管理和监控的程序。我最近写了一个关于 从Cockpit开始][6]. 用这个命令来安装: [code]`# apt install cockpit`
|
||||
```
|
||||
|
||||
|
||||
现在我的树莓派服务器已经准备好了,我能用它来做[网页服务器][7] ,[VPN务器][8], [Minetest][9]等游戏服务器,或者就像我做的基于 [Pi-Hole的d blocker服务器][10] 。
|
||||
|
||||
### 保持旧硬件的活力
|
||||
|
||||
|
||||
不论你有什么样可用的硬件,认真的最小化并控制你的操作系统和软件包可以保证你的系统资源使用量最低以至于你能从中获得最大收益。这还可以通过减少试图利用漏洞进行攻击的潜在恶意行为者可用的服务和软件包数量,提高了安全性。
|
||||
|
||||
因此,在你舍弃你的旧硬件之前,考虑它怎么能够继续使用的所有可能性
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/minimal-server-raspberry-pi
|
||||
|
||||
作者:[Alan Formy-Duval][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[hwlife](https://github.com/hwlife)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/RaspberryPi.SUNY_.jpg?itok=uS_-VUcb (Raspberry Pi board Model B)
|
||||
[2]: https://opensource.com/resources/raspberry-pi
|
||||
[3]: https://www.raspberrypi.org/software/operating-systems
|
||||
[4]: https://opensource.com/sites/default/files/uploads/raspi-config-main.png (Raspberry Pi config main window)
|
||||
[5]: https://cockpit-project.org/
|
||||
[6]: https://opensource.com/article/20/11/cockpit-server-management
|
||||
[7]: https://opensource.com/article/17/3/building-personal-web-server-raspberry-pi-3
|
||||
[8]: https://opensource.com/article/19/6/raspberry-pi-vpn-server
|
||||
[9]: https://github.com/minetest
|
||||
[10]: https://opensource.com/article/18/2/block-ads-raspberry-pi
|
@ -0,0 +1,159 @@
|
||||
[#]: subject: (How I helped my mom switch from Windows to Linux)
|
||||
[#]: via: (https://opensource.com/article/21/6/mom-switch-linux)
|
||||
[#]: author: (Tomasz https://opensource.com/users/tomaszwaraksa)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lkxed)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
我是如何帮助妈妈从 Windows 切换至 Linux 的
|
||||
======
|
||||
有了 Linux,即便是新手用户,也能通过大量熟悉的应用程序获得流畅、精致的桌面体验。
|
||||
![Red Lego Heart][1]
|
||||
|
||||
大型强子对撞机是 [由 Linux 驱动][2] 的,国际空间站上的笔记本电脑是 [运行在 Linux 上][3] 的,[Instagram][4] 和 [Nest thermostats][5] 也是如此。最近,我们观看了 <ruby>机智号<rt>Ingenuity</rt></ruby> 在火星上空飞翔,它是一个令人惊叹的无人直升机,也是 [由 Linux 驱动的][6]!这进一步证明了这个操作系统的灵活性和通用性。
|
||||
|
||||
但是现在,真正的大新闻来了。我在这里“官宣”:Linux 也可以给父母使用!
|
||||
|
||||
### 事情经过
|
||||
|
||||
大约一年前,我决定把妈妈的电脑环境迁移至 Linux。现在,一年过去了,是时候回顾和总结一下了。
|
||||
|
||||
和大多数人一样,我是专属的 “妈妈的电脑管理员”。我的妈妈是一个 60 多岁的可爱老太太 —— 一个真正的甜心。她的电脑技能很基础,她的电脑使用需求也很基础:上上网,发发邮件,打打字,浏览、编辑照片,看看视频听听歌,还有就是在 Skype 或者 Signal 上和家里人或者朋友们打打电话。
|
||||
|
||||
直到去年之前,妈妈一直在使用一个 Windows 笔记本电脑。电脑已经很旧了,但还不算太糟糕。于是在某一天,通过欺骗、威胁和弹出讨厌的窗口等手段,微软终于成功让她点击了那个可怕的按钮 —— “升级到 Windows 10”。
|
||||
|
||||
她绝望地向我呼救。作为妈妈的电脑管理员,我的生活很快就变成了地狱。“为什么所有东西看起来都不一样了?我的应用列表跑去哪儿了?什么,这堆瓷块一样的东西变成我的应用列表了?我的电脑怎么变得这么慢?它怎么每天都要自动更新重启,而且偏偏就是在我想要用它的时候?为什么有东西(她指的是硬盘)一直嗡嗡嗡地叫?它到底一直在忙些什么啊?”
|
||||
|
||||
可是我又看不到源代码,我怎么它一直在忙些什么呢?
|
||||
|
||||
本来我是打算回滚这个升级的,但是 Windows 7 马上就要终止支持了,我担心会发生最坏的事情:没有了安全更新,妈妈的电脑很快就会变成数不清的<ruby>僵尸网络<rt>bot networks</rt></ruby>中的一员,一天到晚地挖矿、发送垃圾邮件,以及对全国的重要设施发动恶毒的 DDOS 攻击。最后还是需要我来清理这个烂摊子 —— (而且是)每一个周末。
|
||||
|
||||
### 大救星 Linux 来了
|
||||
|
||||
我决定把她的电脑环境迁移到 Linux 上,反正也没有什么可损失的。我自己在五年前就这么做了,我从未那么开心过。不如让妈妈也试试,肯定不会有什么坏处。
|
||||
|
||||
当妈妈知道我要一次性解决她所有的问题时,她非常开心。但她不知道的是,她将成为一项为期一年的科学实验的关键部分,这个实验叫做:“妈妈能学会使用 Linux 吗?”
|
||||
|
||||
![Cowsay "Can Mom Survive Linux?"][7]
|
||||
|
||||
(图源 Tomasz Waraksa,遵从[<ruby>署名-相同方式共享 4.0 国际协议<rt>CC BY-SA 4.0</rt></ruby>][8])
|
||||
|
||||
于是,在 2020 年 2 月的某一天,我从遥远的都柏林带着一台使用七年的联想 Yoga 13 来到这里,这台电脑和妈妈那台有着相似的参数,但它的屏幕要好很多,而且只有一半的重量。我在 VirtualBox 里讨论和测试了不同的 Linux 发行版,最终选择了 [Zorin OS][9] 发行版,一个自豪的“爱尔兰造”系统。我选择它是考虑到了下面几个因素:
|
||||
|
||||
|
||||
* 它基于我最熟悉的 Ubuntu Linux。
|
||||
* 它和 Windows 7 很像,在精心设计的同时考虑到了 Windows 难民。
|
||||
* 我感觉它很轻量、简单,对妈妈来说足够保守。完全没有 macOS Big Sur 上的花里胡哨!
|
||||
|
||||
|
||||
|
||||
![Zorin OS desktop][10]
|
||||
|
||||
(图源 Tomasz Waraksa,遵从[<ruby>署名-相同方式共享 4.0 国际协议<rt>CC BY-SA 4.0</rt></ruby>][8])
|
||||
|
||||
### 系统安装
|
||||
|
||||
我用自己一贯的方式安装了这个操作系统,为 `/home` 目录单独分了一个区,这样一来,系统重装时(尽管不大可能发生)妈妈的文件仍然能够保持安全。这是我的惯用技巧,它可以方便我安装发行版的深夜更新。
|
||||
|
||||
在安装过程中,我选择了波兰语作为用户界面语言。和我一样,妈妈也是个彻头彻尾的波兰人。不必担心,Linux 看起来支持所有语言,甚至包括 [克林贡语][11]。
|
||||
|
||||
接着,根据妈妈的需求,我安装了下面这些应用:
|
||||
|
||||
* Skype
|
||||
* [Signal 桌面客户端][12]
|
||||
* 谷歌 Chrome 浏览器
|
||||
* [Geary][13] 邮件客户端
|
||||
* [gThumb][14],用来浏览和编辑照片
|
||||
* [VLC][15],用来播放视频和音乐
|
||||
* Softmaker Office,用来编辑文本和表格
|
||||
|
||||
|
||||
|
||||
注意到列表里没有杀毒软件了吗?好耶!
|
||||
|
||||
一个小时后,系统和应用全部安装完成,妈妈的 Zorin OS 已准备就绪。
|
||||
|
||||
![Zorin OS home folder][16]
|
||||
|
||||
(图源 Tomasz Waraksa,遵从[<ruby>署名-相同方式共享 4.0 国际协议<rt>CC BY-SA 4.0</rt></ruby>][8])
|
||||
|
||||
### 设置系统
|
||||
|
||||
我通过下面这几个步骤,让自己成为了妈妈的电脑管理员:
|
||||
|
||||
* 为我自己创建了一个管理员账户
|
||||
* 把妈妈的账户设置为非管理员
|
||||
* 安装了用于远程无人值守访问的 `ssh` 守护程序
|
||||
* 把这台机器加入到了我的 Hamachi VPN 中:这样一来,我就可以安全地使用 ssh 连接,而不需要打开路由器上的 `22` 端口。Hamachi 是一个由 LogMeIn 提供的 VPN 服务。它是一个传统的 VPN,我的意思是,它的目标不是让你在另外一个国家运行 Netflix 应用,而是在互联网上为计算机之间建立一个安全的网络连接。
|
||||
* 启动了简单防火墙(`ufw`)并允许 ssh 流量
|
||||
* 安装了 AnyDesk 来远程登录到桌面
|
||||
|
||||
|
||||
|
||||
这样操作之后,我就可以通过安全的 ssh 连接访问到妈妈的笔记本电脑。我可以通过 shell 进行定期维护,而妈妈甚至不会注意到任何事情。这是因为 Linux 完成更新后通常 _不需要_ 重新启动。真是一个奇迹啊!简直不可能的事,它是怎么做到的呢?
|
||||
|
||||
![Updating software remotely][17]
|
||||
|
||||
(图源 Tomasz Waraksa,遵从[<ruby>署名-相同方式共享 4.0 国际协议<rt>CC BY-SA 4.0</rt></ruby>][8])
|
||||
|
||||
### 妈妈能学会使用 Linux 吗
|
||||
|
||||
毫无疑问!
|
||||
|
||||
尽管当我把新电脑展示给她看的时候,她确实有问到为什么这个新的 Windows 又看起来不一样了。我不得不解释说这个其实不是 Windows,而是 Linux,然后向她解释了为什么我们都爱 Linux。不过,她学得很快。这个经典的 Zorin OS 桌面和她用惯了的 Windows 7 十分相似。我看到她在系统里点来点去,然后很轻松地找到并且运行了她熟悉的应用程序。
|
||||
|
||||
她立刻就注意到电脑启动快了很多,表现也好了很多。
|
||||
|
||||
然后她开始问我什么时候会给她做电脑的定期清理,好让她电脑不会再一次变慢。我和她解释说,以她的日常使用量,不需要再做定期清理了。Linux 和 Windows 不一样,它不会自己“腐烂”的。目前来说,的确如此。她的电脑仍然像第一天那样流畅和快速。
|
||||
|
||||
我时不时地会问她对新电脑感觉怎么样,她总是回答说很满意。一切都很顺利。电脑也不会莫名其妙就变得忙起来。再也不会有一些“很重要的更新”来打断她。应用菜单也总是在它该在的地方。在这个全新的环境中,她对自己常用的应用程序也感到满意。
|
||||
|
||||
在这一年中,我远程登录过几次她的电脑,为的是进行常规的软件包升级。我还使用 AnyDesk 登录过两次她的桌面。一次是妈妈问我能不能帮她把 SD 卡里的照片自动导入到 `~/Pictures` 目录里,如果能够放到以日期命名的目录里就更好了。当然可以,只要懂一点点的 Bash,就可以使用 `gThumb` 很轻松地实现这个功能。另一次,我把她经常访问的网站添加到了桌面,这样她点击桌面图标就可以访问了。
|
||||
|
||||
这就是目前我作为妈妈的 Linux 管理员所做的全部事情!按照这个情况,我还可以再给 50 个妈妈当电脑管理员!
|
||||
|
||||
### 总结
|
||||
|
||||
我希望我的故事能够启发你考虑迁移到 Linux。过去,我们认为 Linux 对于普通用户来说太难了。但今天,我相信事实恰恰相反。用户使用电脑越不熟练,他们就越有理由迁移到 Linux!
|
||||
|
||||
有了 Linux,即便是新手用户,也能通过大量熟悉的应用程序获得流畅、精致的桌面体验。新手用户们将比在任何其他流行的计算平台上都要安全得多。并且,通过远程访问来帮助他们从未如此简单和安全!
|
||||
|
||||
_免责声明:本文不推广所描述的任何产品、服务或供应商。我与他们没有任何商业利益或联系。我并没有在暗示这些产品或服务是最适合你的,也不承诺你的体验会和我一样。_
|
||||
|
||||
* * *
|
||||
|
||||
_本文最初发布在 [Let's Debug It][18] 上,在获得许可后重新使用。_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/6/mom-switch-linux
|
||||
|
||||
作者:[Tomasz][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/tomaszwaraksa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart)
|
||||
[2]: https://www.redhat.com/en/about/press-releases/red-hat-provides-cern-platform-mission-critical-applications
|
||||
[3]: https://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability
|
||||
[4]: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad
|
||||
[5]: https://www.theverge.com/2011/11/14/2559567/tony-fadell-nest-learning-thermostat
|
||||
[6]: https://www.zdnet.com/article/to-infinity-and-beyond-linux-and-open-source-goes-to-mars/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/intro.png (Cowsay "Can Mom Survive Linux?")
|
||||
[8]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[9]: https://zorinos.com/
|
||||
[10]: https://opensource.com/sites/default/files/uploads/zorin-os-desktop.png (Zorin OS desktop)
|
||||
[11]: https://blogs.gnome.org/muelli/2010/04/klingon-language-support/
|
||||
[12]: https://github.com/signalapp
|
||||
[13]: https://wiki.gnome.org/Apps/Geary
|
||||
[14]: https://wiki.gnome.org/Apps/Gthumb
|
||||
[15]: https://www.videolan.org/vlc/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/zorin-os-home-folder.png (Zorin OS home folder)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/upgrading-software.png (Updating software remotely)
|
||||
[18]: https://letsdebug.it/post/16-linux-for-mars-copters-moms-and-pops/
|
@ -0,0 +1,167 @@
|
||||
[#]: subject: "Using FileZilla for Connecting to SFTP Server Via GUI"
|
||||
[#]: via: "https://itsfoss.com/filezilla-ubuntu/"
|
||||
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "hwlife "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
使用FileZilla图形界面连接sftp服务器
|
||||
======
|
||||
如果你问极客系统管理员,他们将使用[rsync或者scp命令在远程服务器和本地系统之间传输文件][1]。
|
||||
|
||||
然而,以上这些都是命令行方式,用起来不是每个人都能感到舒适。
|
||||
|
||||
谢天谢地的是,有一些图形化工具能够让你从远程服务器来传输文件。
|
||||
|
||||
[FileZilla][2] 是一个流行的,跨平台的传输文件为目的开源软件。它支持使用通过TLS或者SSL加密的FTP协议(FTPS),同时还有SSH上的FTP协议以及旧的FTP协议。
|
||||
|
||||
让我展示怎样在Linux上安装FileZilla然后用它来文件传输。
|
||||
|
||||
那么,让我们开始吧!
|
||||
|
||||
|
||||
### 在ubuntu和其他Linux发行版上安装FileZilla
|
||||
|
||||
你可以使用源码来安装但是还是建议使用你的分发提供包。因为它是一个热门软件,它应该在许多Linux发行版的软件仓库中可用(如果不是全部的话)。 _**请使用你的发行版软件中心和包管理器里来安装**_.
|
||||
|
||||
在Ubuntu上,你可以从软件中心来安装它:
|
||||
|
||||
![FileZilla is available in the Ubuntu Software Center][3]
|
||||
|
||||
你也可以使用命令行的方式来安装它。
|
||||
|
||||
```
|
||||
|
||||
sudo apt install filezilla
|
||||
|
||||
```
|
||||
|
||||
如果你看到[软件包不存在的错误][4],你应该 [开启通用仓库][5]。
|
||||
|
||||
一旦安装成功共,去菜单键(通过按windows键),键入FileZilla来启动它。
|
||||
|
||||
![Start FileZilla from the system menu][6]
|
||||
|
||||
### 使用FileZilla
|
||||
|
||||
当你第一次使用FileZilla时,你将会看到如下图所示的一个界面。
|
||||
|
||||
![Screenshot of FileZilla running][7]
|
||||
|
||||
左边窗口显示来自你本地系统的文件和目录。右边窗口显示目前是空的。当你连接到远程服务器时,来自你的远程系统的文件将会显示到这里。
|
||||
|
||||
在我让你看之前,让我分享一下关于理解FileZilla图形界面重要方面的一些细节。
|
||||
|
||||
|
||||
#### 了解FileZilla图形界面
|
||||
|
||||
下图总体上给你展示了FileZilla窗口布局的不同部分。
|
||||
|
||||
![FileZilla Window Layout | image credit][8]
|
||||
|
||||
图形界面由6个不同的区域/窗口来组成。让我简短的给你解释它们。
|
||||
|
||||
**1\. 工具栏:** 它有许多选项,如打开站点管理器,刷新本地和远程目录文件和文件列表,开始运行中的当前文件传输队列,停止正和传输任务并且取消文件排队的功能,等等。
|
||||
|
||||
**2\. 快速连接栏:** 顾名思义,允许你快速连接到一个远程站点,不用指定许多详细信息,如主机名,用户名,密码和端口。
|
||||
|
||||
**3\. 消息日志:** 它显示给你一个日志,不论你连接成功与否,错误消息标记为红色,正常消息为白色,命令是蓝色。
|
||||
|
||||
**4 & 5\. 本地窗口和远程窗口**: 这两个窗口是非常相似的除了本地窗口显示本地目录内容和用来上传文件的上下文菜单。然而,远程窗口形式是远程目录的内容和从远程目录下载到本地文件的选项。
|
||||
|
||||
**6\. 传输队列**: 最后,传输队列窗口显示项目正被传输的状态和他们的传输速度以及队列文件传输历史(仅限当前实例)。
|
||||
|
||||
|
||||
#### 使用FileZilla连接到SFTP服务器
|
||||
|
||||
_**你需要知道用户名,密码,和与远程服务器的IP地址。远程服务器也应该被设置成能够接收带有详细信息的连接。你在目标文件夹也需要有正确的存储设置。**_
|
||||
|
||||
新增一个SFTP连接,你需要打开站点管理器。有两种方式可以打开它。
|
||||
|
||||
在菜单栏上的"文件"菜单选项下有一个"站点管理器"。或者,你可以直接点击工具栏上的"站点管理器"图标。
|
||||
|
||||
![the Site Manager button on the toolbar][9]
|
||||
|
||||
一旦站点管理器对话框弹出,点击"新文件"按钮[可选]重命名 添加到条目中的新站点。我叫我的为"test8".
|
||||
|
||||
![screenshot of the Site Manager][10]
|
||||
|
||||
在右侧的常规选项下,确保使用的协议与服务器管理员为你设置的相一致。在我的例子中,我通过SSH功能的FTP协议设置了一个SFTP服务器(FTP over SSH),因此我将继续选择"带有SSH功能的SFTP传输协议"。
|
||||
|
||||
下一个框填写远程服务器的IP地址。
|
||||
|
||||
如果你没有提及端口号,FileZilla将假定端口号为缺省的SSH协议22端口来使用。
|
||||
|
||||
登录类型下拉列表有几个选项。在常规登录方式下,你只需要提供用户名和密码。
|
||||
|
||||
如果你有一对公钥和私钥钥匙对来设置并授权你的SSH用户连接,Key文件授权方式是有用的。
|
||||
|
||||
一旦你已经为远程服务器和授权填写了整个详细的信息,点击底部的"连接"按钮连接到站点。别担心,你刚刚建立的新站点将会通过"登录类型"来保存。
|
||||
|
||||
![Remote pane being populated after a successful connection][11]
|
||||
|
||||
如果你看到一个 “连接到 <主机IP地址>”的状态消息,并且许多最近的状态消息是 “目录列表 “/” 显示成功”,你已经成功的连接到了远程的SFTP服务器(使用SSH的FTP协议)。
|
||||
|
||||
另一个SFTP连接成功的标志是当连接成功建立的时候,远程目录窗口有了很多消息。
|
||||
|
||||
|
||||
#### 发送文件到远程系统
|
||||
|
||||
你必须 **确保你位于传输的文件在目录里**。传输文件非常简单,只需**双击文件**,无需指定指定目标位置。
|
||||
|
||||
如果你在左边窗口点击了一个文件,它立即可视化的传输(或者传输任务的话,加到队列中的)到右边的窗口里。
|
||||
|
||||
同样从右边窗口到左边窗口也是一样,比如,从远程服务器到本地。**这就是为什么本地和远程系统在正确的位置是非常重要的了**。
|
||||
|
||||
或者说,你可以鼠标右击文件上传它们(或者加它们到上传队列)。目标位置总是FileZilla界面中显示的目录。
|
||||
|
||||
![Transfer queue pane showing the local file name, remote destination, transfer speed and an ETA][12]
|
||||
|
||||
|
||||
除了方便和快捷方面,上传文件这两种方式没有什么不同。
|
||||
|
||||
|
||||
#### 下载远程系统中的文件
|
||||
|
||||
像上传文件一样,当从远程服务器传输文件到本地时有两种方式,但不是"上传"而是"下载"。
|
||||
|
||||
下载文件将在本地目录窗口中也就是你当前打开的本地窗口来下载。
|
||||
|
||||
你将会注意到除了发送者和接收者之外,下载和上传文件降世一个持续的行为。文件将并行传输除非连接数量受到限制。
|
||||
|
||||
|
||||
### 结论
|
||||
|
||||
厉害!在这些基础上,你应该能够从你的计算机传输文件到你的服务器。我希望你能够学到一些新东西:)
|
||||
|
||||
如果你有一些疑问,请在[FOSS社区论坛][13]中询问。如果你感到这些对你有帮助,请在下方评论让我知道!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/filezilla-ubuntu/
|
||||
|
||||
作者:[Pratham Patel][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[hwlife](https://github.com/hwlife)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/pratham/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linuxhandbook.com/transfer-files-ssh/
|
||||
[2]: https://filezilla-project.org/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu-software-center.png?resize=751%2C382&ssl=1
|
||||
[4]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/
|
||||
[5]: https://itsfoss.com/ubuntu-repositories/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu.png?resize=763%2C224&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_filezilla.webp?resize=800%2C431&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/02_filezilla_layout.webp?resize=800%2C504&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_site_manager_annotated.webp?resize=386%2C170&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/04_site_manager.webp?resize=800%2C577&ssl=1
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/05_successful_connection.webp?resize=800%2C431&ssl=1
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/07_transfer_pane_populated-1.webp?resize=800%2C431&ssl=1
|
||||
[13]: https://itsfoss.community/
|
@ -0,0 +1,135 @@
|
||||
[#]: subject: "Mabox Linux – Beautiful Arch Linux with Openbox [Review]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/03/mabox-linux-2022/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Mabox Linux - 带有 Openbox 的美丽的 Arch Linux (回顾)
|
||||
======
|
||||
Mabox Linux 是一个 MANJARO LINUX 重制版,带有一个轻量级的 Openbox 窗口管理器,可以与预配置的主题和实用程序一起使用。 我们在这篇文章中回顾这个发行版。
|
||||
|
||||
如果你喜欢窗口管理器、基于滚动发布的 Arch Linux,并且正在寻找一个具有这种组合的现成的 Linux 发行版,请尝试 Mabox Linux。Mabox Linux 是建立在很棒的 Manjaro Linux 之上的,带有 Openbox 窗口管理器和一些原生实用程序。
|
||||
|
||||
由于有了 Openbox,这个 Linux 发行版在资源消耗方面是超级轻量级的,同时也是一个供大家使用的漂亮桌面。改编自 BunsenLabs 并受 Crunchbang 启发的 Mabox Linux 工具带来了他们的一些应用。
|
||||
|
||||
让我们来深入了解一下这个了不起的 Linux 发行版。
|
||||
|
||||
### Mabox Linux 回顾
|
||||
|
||||
#### 安装和 Live 媒体
|
||||
|
||||
Mabox .ISO 的优势之一是它在 LIVE 媒体启动过程中为你提供了免费和专有的驱动程序两种选择。如果你的系统中有 NVIDIA 或其他硬件,这对你有帮助。
|
||||
|
||||
Live 桌面让你通过 Calamares 安装程序来安装 Mabox。在标准硬件上,安装大约需要 3 到 4 分钟,在我的测试中是没有错误的。
|
||||
|
||||
安装程序是设法检测测试设备中的其他操作系统的。
|
||||
|
||||
#### 具有自定义的外观和感觉
|
||||
|
||||
Mabox 带来了一个预配置的 Openbox 窗口管理器。原有的版本看起来不错,有深色皮肤和带面板的菜单。
|
||||
|
||||
顶部的面板是用 Tint2 构建的,分成两个部分。而左边的面板为你提供了主菜单、文件管理器、网络浏览器的快捷方式。另外,面板上的鼠标左键和右键有不同的菜单。右边的面板包含资源监视器、音量控制、截图快捷方式和电源菜单。顶部面板不是连续的,在某些主题下,应用程序窗口会停留在顶部。
|
||||
|
||||
![Mabox Linux with Nord Theme][1]
|
||||
|
||||
在桌面的右边部分,预先配置好的 Conky 脚本给你提供系统信息,包括日期、时间、存储和其他显示。
|
||||
|
||||
欢迎窗口为你提供了关于设置、帮助和支持的快速启动快捷方式,并有文档链接。
|
||||
|
||||
窗口管理器对键盘友好,有时对鼠标有困难。但由于 Openbox 和预配置的 Mabox,你可以轻松地使用鼠标,同时通过灵巧的键盘快捷方式提高你的工作效率。
|
||||
|
||||
桌面上的右键菜单为你提供了轻松的搜索和启动选项。
|
||||
|
||||
![Search and Launch from desktop][2]
|
||||
|
||||
如果你不喜欢默认的外观,你可以通过 Openbox 和 Tint2 面板配置工具,只需点击几下就可以自行定制。
|
||||
|
||||
![Main Application Menu][3]
|
||||
|
||||
Mabox 有不同的主题作为预设,包括面板和 Concky 脚本。你可以点击并应用这些令人惊叹的 Mabox 主题。如果你不想陷入自己配置面板、颜色和 Conky 的麻烦中,这是一个很好的功能。
|
||||
|
||||
一套好的墙纸可以让你灵活地让它在短时间内看起来更加美妙。
|
||||
|
||||
![Mabox Themes][5]
|
||||
|
||||
#### 应用
|
||||
|
||||
Mabox Linux 将所有必要的应用打包在其安装镜像中。以下是所包含的基本应用的快速列表。
|
||||
|
||||
* Terminator 终端
|
||||
* Xpad 快速写字板
|
||||
* PCManFM 文件管理器
|
||||
* FSearch 用于桌面文件搜索
|
||||
* Flameshot 截图工具
|
||||
* Geany 文本编辑器
|
||||
* Audacious 音乐播放器
|
||||
* Firefox 网络浏览器
|
||||
|
||||
|
||||
|
||||
Mabox 还包括控制中心,以有效管理你的系统。Mabox 控制中心让你可以选择添加/删除应用,更新你的系统,为窗口管理组件启动几个配置窗口和许多这样的选项。
|
||||
|
||||
如果你找不到任何设置,你可以在 Mabox 控制中心通过其系统设置的逻辑分组轻松找到它们。
|
||||
|
||||
![Mabox Control Center][6]
|
||||
|
||||
#### 性能如何?
|
||||
|
||||
Mabox Linux 的性能是超级令人印象深刻的。由于采用了 Openbox 窗口管理器,Mabox 只用了大约 350 多 MB 的内存,而 CPU 在空闲状态下徘徊在 2% 到 3%。
|
||||
|
||||
默认安装需要大约 5.39GB 的磁盘空间,这对所有这些预装的应用和设置程序来说是不可思议的。
|
||||
|
||||
它是如此优化,以至于消耗内存最多的应用是 Xorg,有 90MB。
|
||||
|
||||
所以,我想尝试一下重度使用下的性能。而这个性能也是令人惊讶的。我打开了一个文件管理器,带三个标签的 Firefox,一个用于开发的文本编辑器,一个终端窗口和控制中心。在这样的工作负荷下,Mabox 只消耗了大约 920MB 的内存和 6% 到 7% 的 CPU。
|
||||
|
||||
![Mabox Linux Heavy Workload Performance][7]
|
||||
|
||||
在[回顾几个发行版][8]的过程中,这是我第一次发现一个发行版在重度工作负荷下不超过 1GB 内存的情况。但在不同的使用情况下,结果可能有所不同。不过,这个指标还是令人印象深刻。
|
||||
|
||||
### Mabox Linux 可以作为日常驱动使用吗?
|
||||
|
||||
如果你对带有窗口管理器的 Arch Linux 比较熟悉和适应,你可以把 Mabox Linux 作为日常驱动使用。有几个打包好的 Arch Linux 发行版带有窗口管理器,而 Mabox 是其中最好的一个。
|
||||
|
||||
![Mabox Linux Windows 95 pre-configured theme][9]
|
||||
|
||||
### 总结
|
||||
|
||||
我认为 Mabox Linux 团队将所有的组件与 Arch Linux 打包在一起,并呈现出一个漂亮的 Linux 发行版,做得非常好。它的外观确实令人惊艳,而消耗的系统资源却很少。有了基于 Arch Linux 的滚动发布功能,我认为你可以信赖这个发行版的长期使用。
|
||||
|
||||
你可以从它的[官方网页][10]下载 Mabox Linux。
|
||||
|
||||
* * *
|
||||
|
||||
我们带来最新的技术、软件新闻和重要的东西。通过 [Telegram][11]、[Twitter][12]、[YouTube][13] 和 [Facebook][14] 保持联系,永远不要错过任何更新!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/03/mabox-linux-2022/
|
||||
|
||||
作者:[Arindam][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://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-with-Nord-Theme-1024x581.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Search-and-Launch-from-desktop.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Main-Application-Menu.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Themes.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Control-Center.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Heavy-Workload-Performance-1024x508.jpg
|
||||
[8]: https://www.debugpoint.com/tag/linux-distro-review
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Windows-95-preconfigured-theme-1-1024x577.jpg
|
||||
[10]: https://maboxlinux.org/
|
||||
[11]: https://t.me/debugpoint
|
||||
[12]: https://twitter.com/DebugPoint
|
||||
[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[14]: https://facebook.com/DebugPoint
|
Loading…
Reference in New Issue
Block a user