Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
wxy 2018-03-31 08:22:30 +08:00
commit 8d59152250
10 changed files with 635 additions and 160 deletions

View File

@ -1,71 +1,71 @@
从没听过的 10 个免费的 Linux 高效率应用程序
没听过的 10 个免费的 Linux 生产力应用程序
=====
![](https://www.maketecheasier.com/assets/uploads/2017/09/Linux-productivity-apps-00-Featured.jpg)
高效率的应用程序确实可以让你工作变得更轻松。如果你是一位 Linux 用户,这 10 个不太知名的 Linux 桌面应用程序可以帮助到你。事实上Linux 用户可能已经听说过列表上的所有应用,但对于那些没有超越主流应用的人来说,这些应用是未知的。
高效率的应用程序确实可以让你工作变得更轻松。如果你是一位 Linux 用户,这 10 个不太知名的 Linux 桌面应用程序可以帮助到你。事实上Linux 用户可能已经听说过这个列表上的所有应用,但对于那些只用过主流应用的人来说,应该是不知道这些应用的。
### 1. Tomboy/Gnote
![linux-productivity-apps-01-tomboy][1]
[Tomboy][2] 是一个简单的便签应用。它不仅仅适用于 Linux你也可以在 Unix,Windows 和 macOS 上获得它。Tomboy 很容易使用-你写一个便条,选择是否让它粘贴在你的桌面上,当你完成它时删除它。
[Tomboy][2] 是一个简单的便签应用。它不仅仅适用于 Linux你也可以在 Unix、Windows 和 macOS 上获得它。Tomboy 很容易使用——你写一个便条,选择是否让它粘贴在你的桌面上,当你完成它时删除它。
### 2. MyNotex
![linux-productivity-apps-02-mynotex][3]
如果你想要一个更多功能的便签,但是仍喜欢一个小而简单的应用程序,而不是一个巨大的套件,请看 [MyNotex][4]。除了简单的笔记和检索之外,它还带有一些不错的功能,例如格式化键盘快捷键和附件等等。你也可以将其用作图片管理器。
如果你想要一个更多功能的便签,但是仍喜欢一个小而简单的应用程序,而不是一个巨大的套件,请看 [MyNotex][4]。除了简单的笔记和检索之外,它还带有一些不错的功能,例如格式化键盘快捷键和附件等等。你也可以将其用作图片管理器。
### 3. Trojitá
![linux-productivity-apps-03-trojita][5]
尽管你可以没有桌面电子右键客户端,但如果你已经习惯了有几十个可用的桌面电子右键客户端,请尝试 [Trojita][6]。这有利于生产力,因为它是一个快速轻量级的电子邮件客户端,但它提供了一个好的电子邮件客户端必须具备的所有功能(以及更多)。
尽管你可以没有桌面电子邮件客户端,但如果你想要一个的话,在几十个的桌面电子邮件客户端里,请尝试下 [Trojita][6]。这有利于生产力,因为它是一个快速轻量级的电子邮件客户端,但它提供了一个好的电子邮件客户端必须具备的所有功能(以及更多)。
### 4. Kontact
![linux-productivity-apps-04-kontact][7]
个人信息管理器 (PIM) 是一款出色的生产力工具。我的个人喜好是 [Kontact][8]。尽管它已经有几年没有更新,但它仍然是一个非常有用的 PIM 工具,用于管理电子邮件地址簿日历任务新闻源等。Kontact 是一个本地 KDE,但你也可以在其他桌面上使用它。
个人信息管理器PIM是一款出色的生产力工具。我的个人喜好是 [Kontact][8]。尽管它已经有几年没有更新,但它仍然是一个非常有用的 PIM 工具,用于管理电子邮件、地址簿、日历、任务、新闻源等。Kontact 是一个 KDE 原生程序,但你也可以在其他桌面上使用它。
### 5. Osmo
![linux-productivity-apps-05-osmo][9]
[Osmo][10] 是以一款更先进的应用,包括日历,任务,联系人和 notes 功能。它还附带一些额外的功能,比如加密私有数据备份和地图上的地理位置,以及对 notes 、任务、、联系人登录强大搜索功能。
[Osmo][10] 是一款更先进的应用,包括日历、任务、联系人和便签功能。它还附带一些额外的功能,比如加密私有数据备份和地图上的地理位置,以及对便签、任务、联系人等的强大搜索功能。
### 6. Catfish
![linux-productivity-apps-06-catfish][11]
一个好的搜索工具是高生产力的表现。[Catfish][12] 是一个必须尝试的搜索工具。它是一个 GTK+ 工具非常快速轻量级。Catfish 会利用 Zeitgeist 的自动完成功能,你还可以按日期和类型过滤搜索结果。
没有好的搜索工具就没有高生产力。[Catfish][12] 是一个必须尝试的搜索工具。它是一个 GTK+ 工具非常快速轻量级。Catfish 会利用 Zeitgeist 的自动完成功能,你还可以按日期和类型过滤搜索结果。
### 7. KOrganizer
![linux-productivity-apps-07-korganizer][13]
[KOrganizer][14] 是我上面提到的 Kontact 应用程序的日历和调度组件。如果你不需要完整的 PIM 应用程序,只需要日历和日程安排,则可以使用 KOrganizer。KOrganizer 提供快速的待办事项和快速事件条目,以及事件和待办事项的附件。
[KOrganizer][14] 是我上面提到的 Kontact 应用程序的日历和计划组件。如果你不需要完整的 PIM 应用程序,只需要日历和日程安排,则可以使用 KOrganizer。KOrganizer 提供快速的待办事项和快速事件条目,以及事件和待办事项的附件。
### 8. Evolution
![linux-productivity-apps-08-evolution][15]
如果你不是 KDE 应用程序的粉丝,但你仍然需要一个好的 PIM那么试试 GNOME 的 [Evolution][16]。Evolution 并不是一个你从没听过的不太受欢迎的应用程序,但因为它有用,所以它出现在这个列表中。也许你已经听说过 Evolution 是一个电子邮件客户端,但它远不止于此-你可以用它来管理日历,邮件,地址簿和任务。
如果你不是 KDE 应用程序的粉丝,但你仍然需要一个好的 PIM那么试试 GNOME 的 [Evolution][16]。Evolution 并不是一个你从没听过的少见的应用程序,但因为它有用,所以它出现在这个列表中。也许你已经听说过 Evolution 是一个电子邮件客户端,但它远不止于此——你可以用它来管理日历、邮件、地址簿和任务。
### 9. Freeplane
![linux-productivity-apps-09-freeplane][17]
我不知道你们中的大多数是否每天都使用思维导图软件,但是如果你使用,请选择 [Freeplane][18]。这是一款免费的思维导图和知识管理软件,可用于商业或娱乐。你可以创建笔记,将其排列在云或图表中,使用日历和提醒设置任务等。
我不知道你们中的大多数是否每天都使用思维导图软件,但是如果你使用,请选择 [Freeplane][18]。这是一款免费的思维导图和知识管理软件,可用于商业或娱乐。你可以创建笔记,将其排列在云或图表中,使用日历和提醒设置任务等。
### 10. Calligra Flow
![linux-productivity-apps-10-calligra-flow][19]
最后,如果你需要流程图和图工具,请尝试 [Calligra Flow][20]。你可以将其视为开放源代码 [Microsoft Visio][21] 替代品,但 Calligra Flow 不提供 Viso 提供的所有特权。不过,你可以使用它来创建网络图,组织结构图,流程图等等。
最后,如果你需要流程图和图工具,请尝试 [Calligra Flow][20]。你可以将其视为开放源代码 [Microsoft Visio][21] 替代品,但 Calligra Flow 不提供 Viso 提供的所有特性。不过,你可以使用它来创建网络图、组织结构图、流程图等等。
生产力工具不仅可以加快工作速度,还可以让你更有条理。我敢打赌,在某些方面几乎没有人不使用生产力工具。尝试这里列出的应用程序可以使你的工作效率更高,还能让你的生活至少轻松一些。
生产力工具不仅可以加快工作速度,还可以让你更有条理。我敢打赌,几乎没有人不使用某种形式的生产力工具。尝试这里列出的应用程序可以使你的工作效率更高,还能让你的生活至少轻松一些。
--------------------------------------------------------------------------------
@ -73,7 +73,7 @@ via: https://www.maketecheasier.com/free-linux-productivity-apps-you-havent-hear
作者:[Ada Ivanova][a]
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,57 +1,75 @@
命令行乐趣:恶搞输错 Bash 命令的用户
命令行乐趣:嘲讽输错 Bash 命令的用户
======
你可以通过配置 sudo 命令去恶搞输入错误密码的用户。但是之后shell 的恶搞提示语可能会滥用于输入错误命令的用户。
你可以通过配置 `sudo` 命令去嘲讽输入错误密码的用户。但是现在,当用户在 shell 输错命令时,就能嘲讽他了(滥用?)。
## 你好 bash-insulter
### 你好 bash-insulter
来自 Github 页面:
> 当用户键入错误命令,随机嘲讽。它使用了一个 bash4.x. 版本的全新内置错误处理函数,叫 command_not_found_handle。
> 当用户键入错误命令,随机嘲讽。它使用了一个 bash4.x. 版本的全新内置错误处理函数,叫 `command_not_found_handle`
## 安装
### 安装
键入下列 git 命令克隆一个仓库:
`git clone https://github.com/hkbakke/bash-insulter.git bash-insulter`
```
git clone https://github.com/hkbakke/bash-insulter.git bash-insulter
```
示例输出:
```
Cloning into 'bash-insulter'...
remote: Counting objects: 52, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 52 (delta 12), reused 12 (delta 2), pack-reused 0
Unpacking objects: 100% (52/52), done.
```
用文本编辑器,编辑你的 ~/.bashrc 或者 /etc/bash.bashrc 文件,比如说使用 vi
`$ vi ~/.bashrc`
在其后追加这一行(具体了解请查看 [if..else..fi 声明][1] 和 [命令源码][2]
用文本编辑器,比如说使用 `vi`,编辑你的 `~/.bashrc` 或者 `/etc/bash.bashrc` 文件:
```
$ vi ~/.bashrc
```
在其后追加这一行(具体了解请查看 [if..else..fi 声明][1] 和 [source 命令][2]
```
if [ -f $HOME/bash-insulter/src/bash.command-not-found ]; then
source $HOME/bash-insulter/src/bash.command-not-found
fi
```
保存并关闭文件。重新登陆,如果不想退出账号也可以手动运行它:
保存并关闭文件。重新登录,如果不想退出账号也可以手动运行它:
```
$ . $HOME/bash-insulter/src/bash.command-not-found
```
## 如何使用它?
### 如何使用它?
尝试键入一些无效命令:
```
$ ifconfigs
$ dates
```
示例输出:
[![一个有趣的 bash 钩子功能,嘲讽输入了错误命令的你。][3]][3]
## 自定义
### 自定义
你需要编辑 `$HOME/bash-insulter/src/bash.command-not-found`
```
$ vi $HOME/bash-insulter/src/bash.command-not-found
```
你需要编辑 $HOME/bash-insulter/src/bash.command-not-found
`$ vi $HOME/bash-insulter/src/bash.command-not-found`
示例代码:
```
command_not_found_handle () {
local INSULTS=(
@ -104,15 +122,28 @@ command_not_found_handle () {
}
```
## sudo 嘲讽
### 赠品sudo 嘲讽
编辑 `sudoers` 文件:
```
$ sudo visudo
```
编辑 sudoers 文件:
`$ sudo visudo`
追加下面这一行:
`Defaults insults`
```
Defaults insults
```
或者像下面尾行增加一句嘲讽语:
`Defaults !lecture,tty_tickets,!fqdn,insults`
```
Defaults !lecture,tty_tickets,!fqdn,insults
```
这是我的文件:
```
Defaults env_reset
Defaults mail_badpass
@ -140,19 +171,26 @@ root ALL = (ALL:ALL) ALL
#includedir /etc/sudoers.d
```
Try it out:
试一试:
```
$ sudo -k # clear old stuff so that we get a fresh prompt
$ sudo -k # 清除缓存,从头开始
$ sudo ls /root/
$ sudo -i
```
样例对话:
样例对话:
[![当输入错误密码时,你会被一个有趣的的 sudo 嘲讽语戏弄。][4]][4]
## 你好 sl
### 赠品:你好 sl
[sl 或是 UNIX 经典捣蛋软件][5] 游戏。当你错误的把 `ls` 输入成 `sl`,将会有一辆蒸汽机车穿过你的屏幕。
```
$ sl
```
[sl 或是 UNIX 经典捣蛋软件][5] 游戏。当你错误的把 “ls” 输入成 “sl”将会有一辆蒸汽机车穿过你的屏幕。
`$ sl`
[![Linux / UNIX 桌面乐趣: 蒸汽机车][6]][5]
--------------------------------------------------------------------------------
@ -161,7 +199,7 @@ via: https://www.cyberciti.biz/howto/insult-linux-unix-bash-user-when-typing-wro
作者:[Vivek Gite][a]
译者:[CYLeft](https://github.com/CYLeft)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,113 @@
chkservice在 Linux 终端管理 systemd 单元的工具
================
systemd 意即<ruby>系统守护进程<rt>system daemon</rt></ruby>,是一个新的初始化系统和系统管理工具,它现在非常流行,大部分的 Linux 发行版开始使用这种新的初始化系统。
`systemctl` 是一个 systemd 的工具,它可以帮助我们管理 systemd 守护进程。 它控制系统的启动程序和服务,使用并行化方式,为启动的服务激活套接字和 D-Bus提供守护进程的按需启动使用 Linux 控制组跟踪进程,维护挂载和自动挂载点。
此外,它还提供了日志守护进程、用于控制基本系统配置的功能,如主机名、日期、地区、维护已登录用户列表和运行容器和虚拟机、系统帐户、运行时目录和设置,以及管理简单网络配置、网络时间同步、日志转发和名称解析的守护进程。
### 什么是 chkservice
[chkservice][1] 是一个基于 ncurses 的在终端中管理 systemd 单元的工具。它提供了一个非常全面的 systemd 服务的视图,使得它们非常容易修改。
只有拥有超级管理权限才能够改变 systemd 单元的状态和 sysv 系统启动脚本。
### 在 Linux 安装 chkservice
我们可以通过两种方式安装 `chkservice`,通过包安装或者手动安装。
对于 Debian/Ubuntu使用 [APT-GET 命令][2] 或 [APT 命令][3] 安装 `chkservice`
```
$ sudo add-apt-repository ppa:linuxenko/chkservice
$ sudo apt-get update
$ sudo apt-get install chkservice
```
对于 Arch Linux 系的系统,使用 [Yaourt 命令][4] 或 [Packer 命令][5] 从 AUR 库安装 `chkservice`
```
$ yaourt -S chkservice
$ packer -S chkservice
```
对于 Fedora使用 [DNF 命令][6] 安装 `chkservice`
```
$ sudo dnf copr enable srakitnican/default
$ sudo dnf install chkservice
```
对于 Debian 系系统,使用 [DPKG 命令][7] 安装 `chkservice`
```
$ wget https://github.com/linuxenko/chkservice/releases/download/0.1/chkservice_0.1.0-amd64.deb
$ sudo dpkg -i chkservice_0.1.0-amd64.deb
```
对于 RPM 系的系统,使用 [DNF 命令][8] 安装 `chkservice`
```
$ sudo yum install https://github.com/linuxenko/chkservice/releases/download/0.1/chkservice_0.1.0-amd64.rpm
```
### 如何使用 chkservice
只需输入以下命令即可启动 `chkservice` 工具。 输出分为四部分。
* **第一部分:** 这一部分显示了守护进程的状态,比如可用的 `[X]` 或者不可用的 `[ ]` 或者静态的 `[s]` 或者被掩藏的 `-m-`
* **第二部分:** 这一部分显示守护进程的状态例如开始 `>` 或者停止 `=`
* **第三部分:** 这一部分显示单元的名称
* **第四部分:** 这一部分简短地显示了守护进程的一些信息
```
$ sudo chkservice
```
![][10]
要查看帮助页面,按下 `?`。 这将向您显示管理 systemd 服务的可用选项。
![][11]
选择要启用或禁用的守护进程,然后点击空格键。
![][12]
选择你想开始或停止的守护进程,然后按下 `s`
![][13]
选择要重新启动的守护进程,然后按下 `r`,之后,您可以在顶部看到更新的提示。
![][14]
按下 `q` 退出。
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/chkservice-a-tool-for-managing-systemd-units-from-linux-terminal/
作者:[Ramya Nuvvula][a]
译者:[amwps290](https://github.com/amwps290)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.2daygeek.com/author/ramya/
[1]:https://github.com/linuxenko/chkservice
[2]:https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
[3]:https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
[4]:https://www.2daygeek.com/install-yaourt-aur-helper-on-arch-linux/
[5]:https://www.2daygeek.com/install-packer-aur-helper-on-arch-linux/
[6]:https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
[7]:https://www.2daygeek.com/dpkg-command-to-manage-packages-on-debian-ubuntu-linux-mint-systems/
[8]:https://www.2daygeek.com/rpm-command-examples/
[9]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[10]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-1.png
[11]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-2.png
[12]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-3.png
[13]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-4.png
[14]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-5.png

View File

@ -0,0 +1,44 @@
College student reflects on getting started in open source
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA)
I just completed the first semester of my second year in college, and I'm reflecting on what I learned in my classes. One class, in particular, stood out to me: "[Foundations of an Open Source World][1]," taught by Dr. Bryan Behrenshausen at Duke University. I enrolled in the class at the last minute because it seemed interesting and, if Im being honest because it fit my schedule.
On the first day, Dr. Behrenshausen asked if we students knew or had used any open source programs. Until that day I had hardly heard [the term “open source”][2] and certainly wasn't cognizant of any products that fell into that category. As the semester went on, however, it dawned on me that the passion I have towards my career aspirations would not exist without open source.
### Audacity and GIMP
My interest in technology started at age 12. Charged with the task of cutting music for my dance team, I searched the web for hours until I found Audacity, an open source audio editor. Audacity opened doors for me; no longer was I confined to repetitive eight-counts of the same beat. I started receiving requests left and right from others who wanted unique renditions of their favorite songs.
Weeks later, I stumbled upon a GIF on the internet of a cat with a Pop-Tart torso and a rainbow trail flying through space. I searched “how to make moving images” and discovered [GIMP][3], an open source graphics editor, and used it to create a GIF of "The Simpsons" for my brothers birthday present.
My budding interest grew into a full-time obsession: creating artwork on my clunky, laggy laptop. Since I didnt have much luck with charcoal, paint, or watercolors, I used [graphic design][4] as an outlet for creative expression. I spent hours in the computer lab learning the basics of HTML and CSS on [W3Schools][5] so that I could fill an online portfolio with my childish GIFs. A few months later, I published my first website on [WordPress][6].
### Why open source
Open source allows us to not only achieve our goals but to discover interests that drive those goals.
Fast-forward nearly a decade. Many things have changed, although some have stayed consistent: I still make graphics (mostly flyers), edit music for a dance group, and design websites (sleeker, more effective ones, I hope). The products I used have gone through countless version upgrades. But the most dramatic change is my approach to open source resources.
Considering the significance of open source products in my life has made me cherish the open movement and its mission. Open source projects remind me that there are initiatives in tech that promote social good and self-learning without being exclusive to those who are socioeconomically advantaged. My middle-school self, like countless others, couldnt afford to purchase the Adobe Creative Suite, GarageBand, or Squarespace. Open source platforms allow us to not only achieve our goals but to discover interests that drive those goals by broadening our access networks.
My advice? Enroll in a class on a whim. It just might change the way you view the world.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/college-getting-started
作者:[Christine Hwang][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/christinehwang
[1]:https://ssri.duke.edu/news/new-course-explores-open-source-principles
[2]:https://opensource.com/node/42001
[3]:https://www.gimp.org/
[4]:https://opensource.com/node/30251
[5]:https://www.w3schools.com/
[6]:https://opensource.com/node/31441

View File

@ -1,3 +1,5 @@
Translating by MjSeven
How to record statistics about a Linux machines uptime
======
Linux/Unix sysadmins have a weird obsession with server uptime. There is a xkcd comic devoted to this subject where a good sysadmin is an unstoppable force that it stands between the forces of darkness and your cat blog's servers.

View File

@ -0,0 +1,153 @@
Dry An Interactive CLI Manager For Docker Containers
======
Docker is a software that allows operating-system-level virtualization also known as containerization.
It uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and others to allows independent containers to run within a single Linux instance.
Docker provides a way to run applications securely isolated in a container, packaged with all its dependencies and libraries.
### What Is Dry
[Dry][1] is a command line utility to manage & monitor Docker containers and images.
It shows information about Containers, Images, Name of the containers, Networks, Running commands in the containers, and status, and, if running a Docker Swarm, it also shows all kinds of information about the state of the Swarm cluster.
It can connect to both local or remote Docker daemons. Docker host shows `unix:///var/run/docker.sock` if the local Docker connected.
Docker host shows `tcp://IP Address:Port Number` or `tcp://Host Name:Port Number` if the remote Docker connected.
It could provide you the similar output metrics like `docker ps` but it has more verbose and colored output than “docker ps”.
It also has an additional NAME column which comes handy at times when you have many containers you are not a memory champion.
**Suggested Read :**
**(#)** [Portainer A Simple Docker Management GUI][2]
**(#)** [Rancher A Complete Container Management Platform For Production Environment][3]
**(#)** [cTop A Command-Line Tool For Container Monitoring And Management In Linux][4]
### How To Install Dry On Linux
The latest dry utility can be installed through single shell script on Linux. It does not require external libraries. Most of the Docker commands are available in dry with the same behavior.
```
$ curl -sSf https://moncho.github.io/dry/dryup.sh | sudo sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10 100 10 0 0 35 0 --:--:-- --:--:-- --:--:-- 35
dryup: downloading dry binary
######################################################################## 100.0%
dryup: Moving dry binary to its destination
dryup: dry binary was copied to /usr/local/bin, now you should 'sudo chmod 755 /usr/local/bin/dry'
```
Change the file permission to `755` using the below command.
```
$ sudo chmod 755 /usr/local/bin/dry
```
For Arch Linux users can install from AUR repository with help of **[Packer][5]** or **[Yaourt][6]** package manager.
```
$ yaourt -S dry-bin
or
$ packer -S dry-bin
```
If you wants to run dry as a Docker container, run the following command. Make sure Docker should be installed on your system for this as a prerequisites.
**Suggested Read :**
**(#)** [How to install Docker in Linux][7]
**(#)** [How to play with Docker images on Linux][8]
**(#)** [How to play with Docker containers on Linux][9]
**(#)** [How to Install, Run Applications inside Docker Containers][10]
```
$ docker run -it -v /var/run/docker.sock:/var/run/docker.sock moncho/dry
```
### How To Launch & Use Dry
Simply run the `dry` command from your terminal to launch the utility. The default output for dry is similar to below.
```
$ dry
```
![][12]
### How To Monitor Docker Using Dry
You can open the monitor mode in dry by pressing `m` key.
![][13]
### How To Manage Container Using Dry
To monitor any containers, just hit `Enter` on that. Dry allows you to perform activity such as logs, inspect, kill, remove container, stop, start, restart, stats, and image history.
![][14]
### How To Monitor Container Resource Utilization
Dry allows users to monitor particular container resource utilization using `Stats+Top` option.
We can achieve this by navigating to container management page (Follow the above steps and hit the `Stats+Top` option). Alternatively we can press `s` key to open container resource utilization page.
![][15]
### How To Check Container, Image, & Local Volume Disk Usage
We can check disk usage of containers, images, and local volumes using `F8` key.
This will clearly display the total number of containers, images, and volumes, and how many are active, and total disk usage and reclaimable size details.
![][16]
### How To Check Downloaded Images
Press `2` key to list all the downloaded images.
![][17]
### How To Show Network List
Press `3` key to list all the networks and its gateway.
![][18]
### How To List All Docker Containers
Press `F2` key to list all the containers (This output includes Running & Stopped containers).
![][19]
### Dry Keybinds
To view keybinds, navigate to help page or [dry github][1] page.
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/dry-an-interactive-cli-manager-for-docker-containers/
作者:[Magesh Maruthamuthu][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.2daygeek.com/author/magesh/
[1]:https://github.com/moncho/dry
[2]:https://www.2daygeek.com/portainer-a-simple-docker-management-gui/
[3]:https://www.2daygeek.com/rancher-a-complete-container-management-platform-for-production-environment/
[4]:https://www.2daygeek.com/ctop-a-command-line-tool-for-container-monitoring-and-management-in-linux/
[5]:https://www.2daygeek.com/install-packer-aur-helper-on-arch-linux/
[6]:https://www.2daygeek.com/install-yaourt-aur-helper-on-arch-linux/
[7]:https://www.2daygeek.com/install-docker-on-centos-rhel-fedora-ubuntu-debian-oracle-archi-scentific-linux-mint-opensuse/
[8]:https://www.2daygeek.com/list-search-pull-download-remove-docker-images-on-linux/
[9]:https://www.2daygeek.com/create-run-list-start-stop-attach-delete-interactive-daemonized-docker-containers-on-linux/
[10]:https://www.2daygeek.com/install-run-applications-inside-docker-containers/
[11]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[12]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-1.png
[13]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-2.png
[14]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-3.png
[15]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-4.png
[16]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-5.png
[17]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-6.png
[18]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-7.png
[19]:https://www.2daygeek.com/wp-content/uploads/2018/03/dry-an-interactive-cli-manager-for-docker-containers-8.png

View File

@ -0,0 +1,90 @@
Getting started with Jupyter Notebooks
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_paper_envelope_document.png?itok=uPj_kouJ)
Since the days of papyrus, publishers have struggled with formatting data in ways that engage readers. This is a particular issue in the areas of mathematics, science, and programming, where well-designed charts, illustrations, and equations can be key to helping people understand technical information.
[The Jupyter Notebook][1] is addressing this problem by reimagining how we produce instructional texts. Jupyter (which I first learned about at [All Things Open][2] in October 2017) is an open source application that enables users to create interactive, shareable notebooks that contain live code, equations, visualizations, and text.
Jupyter evolved from the [IPython Project][3], which features an interactive shell and a browser-based notebook with support for code, text, and mathematical expressions. Jupyter offers support for over 40 programming languages, including Python, R, and Julia, and its code can be exported to HTML, LaTeX, PDF, images, and videos or as [IPython][4] notebooks to be shared with other users.
Fun fact: "Jupyter" is an acronym for "Julia, Python, and R."
Some of its uses, according to Project Jupyter's website, include "data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more." Scientific institutions are using Jupyter Notebooks to explain research results. The code, which can come from actual data, can be tweaked and re-tweaked to visualize different results and scenarios. In this way, Jupyter Notebooks have become living texts and reports.
### Installing and starting Jupyter
The Jupyter software is open source, licensed under the [modified BSD license][5], and it can be [installed on Linux, MacOS, or Windows][6]. There are a number of ways to install Jupyter; I tried the PIP and the [Anaconda][7] installs on Linux and MacOS. A PIP install requires that Python is already installed on your computer; Jupyter recommends Python 3.
Since Python 3 was already installed on my computers, I installed Jupyter by running the following commands in the terminal (on Linux or Mac):
```
$ python3 -m pip install --upgrade pip
$ python3 -m pip install jupyter
```
Entering the following command at the terminal prompt started the application right away:
```
$ jupyter notebook
```
Soon my browser opened and displayed my Jupyter Notebook server at `http://localhost:8888`. (Supported browsers are Google Chrome, Firefox, and Safari.)
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_1.png?itok=UyM1GuVG)
There's a drop-down menu labeled "New" in the upper-right corner. It enabled me to quickly create a new notebook for my own instructions and code. Note that my new notebook defaults to Python 3, which is my current environment.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_2.png?itok=alDI432q)
A new notebook with some default values, which can be changed (including the name of the notebook), opened.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_3.png?itok=9zjG-5JC)
Notebooks have two different modes: Command and Edit. Command mode allows you to add or delete cells. You can enter Command mode by pressing the Escape key, and you can get into Edit mode by pressing the Enter key or by clicking in a cell.
A green highlight around a cell indicates you are in Edit mode, and a blue highlight means you're in Command mode. The following notebook is in Command mode and ready for me to execute the Python code in the cell. Note that I've changed the name of the notebook to First Notebook.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_4.png?itok=-QPxcuFX)
### Using Jupyter
A strength of Jupyter Notebooks is that besides being able to enter code, you can also add Markdown with narrative and explanatory text. I wanted to add a heading, so I added a cell above my code and typed a heading in Markdown. When I pressed `Ctrl+Enter`, my heading converted to HTML.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_5.png?itok=-sr9A8-W)
I can add output from a Bash command or script by appending an `!` to a command.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_6.png?itok=o_g38ECp)
I can also take advantage of IPython's [line magic and cell magic][8] commands. You can list the magic commands by appending a `%` or `%%` sign to commands inside a code cell. For example, `%lsmagic` produces all the magic commands that can be used in Jupyter notebooks.
![](https://opensource.com/sites/default/files/styles/panopoly_image_original/public/u128651/jupyter_7.png?itok=uit0PtND)
Examples of these magic commands include `%pwd`, which outputs the present working directory (e.g., `/Users/YourName`) and `%ls`, which lists all the files and subdirectories in the current working directory. Another magic command displays charts generated from `matplotlib` in the notebook. `%%html` renders anything in that cell as HTML, which is useful for embedding video and links. There are cell magic commands for JavaScript and Bash, also.
If you need more information about using Jupyter Notebooks and its features, the Help section is incredibly complete.
People are using Jupyter Notebooks in many interesting ways; you can find some great examples in this [gallery][9]. How are you using Jupyter notebooks? Please share your ideas in the comments below.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/getting-started-jupyter-notebooks
作者:[Don Watkins][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/don-watkins
[1]:http://jupyter.org/
[2]:https://allthingsopen.org/
[3]:http://ipython.org/
[4]:https://en.wikipedia.org/wiki/IPython
[5]:https://opensource.org/licenses/BSD-3-Clause
[6]:http://jupyter.org/install.html
[7]:https://www.anaconda.com/download/#linux
[8]:http://ipython.readthedocs.io/en/stable/interactive/magics.html
[9]:https://github.com/jupyter/jupyter/wiki/a-gallery-of-interesting-jupyter-notebooks#mathematics

View File

@ -0,0 +1,67 @@
How To Use Instagram In Terminal
======
![](https://www.ostechnix.com/wp-content/uploads/2018/03/instagram-in-terminal-720x340.png)
Instagram doesnt need introduction. It is one of a popular social network platform, like Facebook and Twitter, to share photos and videos either publicly or privately to pre-approved followers. It was launched in 2010 by two entrepreneurs namely **Kevin Systrom** and **Mike Krieger**. In 2012, the social network giant Facebook has acquired Instagram. Instagram is available for free on Android and iOS devices. We can also use it in desktop systems via a web browser. And, the cool thing is now you can use Instagram in Terminal on any Unix-like operating systems. Are you excited? Well, read on to know how to view your Instagram feed on your Terminal.
### Instagram In Terminal
First, install **pip3** as described in the following link.
Then, git clone the repository of “instagram-terminal-news-feed” script.
```
$ git clone https://github.com/billcccheng/instagram-terminal-news-feed.git
```
The above command will clone the contents of instagram script in a directory named “instagram-terminal-news-feed” in your current working directory. Cd to that directory:
```
$ cd instagram-terminal-news-feed/
```
Then, run the following command to install instagram terminal feed:
```
$ pip3 install -r requirements.txt
```
Now, run the following command to launch instagram in terminal in your Linux box.
```
$ python3 start.py
```
Enter your Instagram username and password and browse your Instagram feed right from the Terminal. Your instragram username and password will only be stored locally in the file called **credential.json**. So, you dont need to worry about it. You can also just dont save your credentials which is the default option.
Here is some screenshots of [**My Instagram page**][1].
![][3]
![][4]
![][5]
Please note that you can only view your feed. You cant follow anyone, like or comment posts. This is just a instagram feed reader.
This project is freely available on GitHub, so you can view the source code, improve it, add more features, fix any bugs if there are any.
Have fun! Cheers!!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/how-to-use-instagram-in-terminal/
作者:[SK][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.ostechnix.com/author/sk/
[1]:https://www.instagram.com/ostechnix/
[3]:http://www.ostechnix.com/wp-content/uploads/2018/03/instagram-in-terminal-1.png
[4]:http://www.ostechnix.com/wp-content/uploads/2018/03/instagram-in-terminal-2.png
[5]:http://www.ostechnix.com/wp-content/uploads/2018/03/instagram-in-terminal-3-2.png

View File

@ -0,0 +1,87 @@
Protect Your Websites with Let's Encrypt
======
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/lock-1920.jpg?itok=7sjbOYkU)
Back in the bad old days, setting up basic HTTPS with a certificate authority cost as much as several hundred dollars per year, and the process was difficult and error-prone to set up. Now we have [Let's Encrypt][1] for free, and the whole thing takes just a few minutes.
### Why Encrypt?
Why encrypt your sites? Because unencrypted HTTP sessions are wide open to multiple abuses:
+ Eavesdropping on your users
+ Capturing user logins
+ Injecting ads and "important" messages
+ Injecting spyware
+ Injecting SEO spam and links
+ Injecting cryptocurrency miners
Internet service providers lead the code-injecting offenders. How to foil their nefarious desires? Your best defense is HTTPS. Let's review how HTTPS works.
### Chain of Trust
You could set up asymmetric encryption between your site and everyone who is allowed to access it. This is very strong protection: GPG (GNU Privacy Guard, see [How to Encrypt Email in Linux][2]), and OpenSSH are common tools for asymmetric encryption. These rely on public-private key pairs. You can freely share public keys, while your private keys must be protected and never shared. The public key encrypts, and the private key decrypts.
This is a multi-step process that does not scale for random web-surfing, however, because it requires exchanging public keys before establishing a session, and you have to generate and manage key pairs. An HTTPS session automates public key distribution, and sensitive sites, such as shopping and banking, are verified by a third-party certificate authority (CA) such as Comodo, Verisign, or Thawte.
When you visit an HTTPS site, it provides a digital certificate to your web browser. This certificate verifies that your session is strongly encrypted and supplies information about the site, such as organization's name, the organization that issued the certificate, and the name of the certificate authority. You can see all of this information, and the digital certificate, by clicking on the little padlock in your web browser's address bar (Figure 1).
![page information][4]
Figure 1: Click on the padlock in your web browser's address bar for information.
[Used with permission][5]
The major web browsers, including Opera, Firefox, Chromium, and Chrome, all rely on the certificate authority to verify the authenticity of the site's digital certificate. The little padlock gives the status at a glance; green = strong SSL encryption and verified identity. Web browsers also warn you about malicious sites, sites with incorrectly configured SSL certificates, and they treat self-signed certificates as untrusted.
So how do web browsers know who to trust? Browsers include a root store, a batch of root certificates, which are stored in `/usr/share/ca-certificates/mozilla/`. Site certificates are verified against your root store. Your root store is maintained by your package manager, just like any other software on your Linux system. On Ubuntu, they are supplied by the `ca-certificates` package. The root store itself is [maintained by Mozilla][6] for Linux.
As you can see, it takes a complex infrastructure to make all of this work. If you perform any sensitive online transactions, such as shopping or banking, you are trusting a whole lot of unknown people to protect you.
### Encryption Everywhere
Let's Encrypt is a global certificate authority, similar to the commercial CAs. Let's Encrypt was founded by the non-profit Internet Security Research Group (ISRG) to make it easier to secure Websites. I don't consider it sufficient for shopping and banking sites, for reasons which I will get to shortly, but it's great for securing blogs, news, and informational sites that don't have financial transactions.
There are at least three ways to use Let's Encrypt. The best way is with the [Certbot client][7], which is maintained by the Electronic Frontier Foundation (EFF). This requires shell access to your site.
If you are on shared hosting then you probably don't have shell access. The easiest method in this case is using a [host that supports Let's Encrypt][8].
If your host does not support Let's Encrypt, but supports custom certificates, then you can [create and upload your certificate manually][8] with Certbot. It's a complex process, so you'll want to study the documentation thoroughly.
When you have installed your certificate use [SSL Server Test][9] to test your site.
Let's Encrypt digital certificates are good for 90 days. When you install Certbot it should also install a cron job for automatic renewal, and it includes a command to test that the automatic renewal works. You may use your existing private key or certificate signing request (CSR), and it supports wildcard certificates.
### Limitations
Let's Encrypt has some limitations: it performs only domain validation, that is, it issues a certificate to whoever controls the domain. This is basic SSL. It does not support Organization Validation (OV) or Extended Validation (EV) because it is not possible to automate identity validation. I would not trust a banking or shopping site that uses Let's Encrypt-- let 'em spend the bucks for a complete package that includes identity validation.
As a free-of-cost service run by a non-profit organization there is no commercial support, but only documentation and community support, both of which are quite good.
The Internet is full of malice. Everything should be encrypted. Start with [Let's Encrypt][10]to protect your site visitors.
Learn more about Linux through the free ["Introduction to Linux" ][11]course from The Linux Foundation and edX.
--------------------------------------------------------------------------------
via: https://www.linux.com/learn/intro-to-linux/2018/3/protect-your-websites-lets-encrypt
作者:[CARLA SCHRODER][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.linux.com/users/cschroder
[1]:https://letsencrypt.org
[2]:https://www.linux.com/learn/how-encrypt-email-linux
[3]:https://www.linux.com/files/images/fig-11png-0
[4]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/fig-1_1_1.png?itok=_PPiSNx6 (page information)
[5]:https://www.linux.com/licenses/category/used-permission
[6]:https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/
[7]:https://certbot.eff.org/
[8]:https://community.letsencrypt.org/t/web-hosting-who-support-lets-encrypt/6920
[9]:https://www.ssllabs.com/ssltest/
[10]:https://letsencrypt.org/
[11]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux

View File

@ -1,119 +0,0 @@
# chkservice -Linux终端管理系统单元的工具
systemd 即系统守护进程是一个新的初始化系统和系统管理工具,这个 systemd 非常流行,大部分的 Linux 发行版开始使用这种新的初始化系统。
Systemctl 是一个 systemd 的工具,它可以帮助我们管理 systemd 守护进程。 它控制系统启动和服务,使用并行化方式,套接字和 D-Bus 激活启动服务,提供按需启动守护进程,使用 Linux 控制组跟踪进程,维护挂载和自动挂载点。
此外,它还提供了守护进程日志、用于控制基本系统配置如主机名、日期、地区、维护登录用户列表和运行容器和虚拟机、系统帐户、运行时目录和设置,以及守护进程来管理简单的网络配置、网络时间同步、日志转发和名称解析。
### 什么是 chkservice
[chkservice][1] 是一个基于 ncurses 的在终端中管理系统资源的工具。它提供了一个非常全面的系统资源视图,可以使它们非常容易修改。
只有拥有超级管理权限才能够改变系统资源状态和系统启动脚本。
### 在 Linux 安装 chkservice
我们可以通过两种方式安装 chkservice通过包安装或者手动安装。
对于 `Debian/Ubuntu`,使用 [APT-GET Command][2] 或 [APT Command][3] 安装 chkservice.
```
$ sudo add-apt-repository ppa:linuxenko/chkservice
$ sudo apt-get update
$ sudo apt-get install chkservice
```
对于 `Arch Linux` 系的系统,使用 [Yaourt Command][4] 或 [Packer Command][5] 从 AUR 库安装 chkservice。
```
$ yaourt -S chkservice
or
$ packer -S chkservice
```
对于 **`Fedora`** , 使用 [DNF Command][6] 安装 chkservice。
```
$ sudo dnf copr enable srakitnican/default
$ sudo dnf install chkservice
```
对于 `Debian` 系系统,使用 [DPKG Command][7] 安装 chkservice。
```
$ wget https://github.com/linuxenko/chkservice/releases/download/0.1/chkservice_0.1.0-amd64.deb
$ sudo dpkg -i chkservice_0.1.0-amd64.deb
```
对于 `RPM` 系的系统,使用 [DNF Command][8] 安装 chkservice。
```
$ sudo yum install https://github.com/linuxenko/chkservice/releases/download/0.1/chkservice_0.1.0-amd64.rpm
```
### 如何使用 chkservice
只需输入以下命令即可启动 chkservice 工具。 输出分为四部分。
* **`第一部分:`** 这一部分显示了守护进程的状态,比如可用的 [X] 或者不可用的 [] 或者静态的 [s] 或者被掩藏的 -m-
* **`第二部分:`** 这一部分显示守护进程的状态例如开始 [ >] 或者停止 [=]
* **`第三部分:`** 这一部分显示单元的名称
* **`第四部分:`** 这一部分简短地显示了守护进程的一些信息
```
$ sudo chkservice
```
![][10]
要查看帮助页面,点击 `` 按钮。 这将向您显示管理 systemd 服务的可用选项。
![][11]
选择要启用或禁用的守护进程,然后点击`空格键`按钮。
![][12]
选择你想开始或停止的守护进程,然后点击 `s` 按钮。
![][13]
选择要重新启动的守护进程,然后按 `r` 按钮。 点击 `r` 键后,您可以在顶部看到更新的提示。
![][14]
`q` 按钮退出。
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/chkservice-a-tool-for-managing-systemd-units-from-linux-terminal/
作者:[Ramya Nuvvula][a]
译者:[amwps290](https://github.com/amwps290)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.2daygeek.com/author/ramya/
[1]:https://github.com/linuxenko/chkservice
[2]:https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
[3]:https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
[4]:https://www.2daygeek.com/install-yaourt-aur-helper-on-arch-linux/
[5]:https://www.2daygeek.com/install-packer-aur-helper-on-arch-linux/
[6]:https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
[7]:https://www.2daygeek.com/dpkg-command-to-manage-packages-on-debian-ubuntu-linux-mint-systems/
[8]:https://www.2daygeek.com/rpm-command-examples/
[9]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[10]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-1.png
[11]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-2.png
[12]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-3.png
[13]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-4.png
[14]:https://www.2daygeek.com/wp-content/uploads/2018/03/chkservice-to-manage-systemd-units-5.png