Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2018-04-23 11:30:41 +08:00
commit 82bebdffc6
7 changed files with 373 additions and 360 deletions

View File

@ -0,0 +1,143 @@
开发者的最佳 GNOME 扩展
======
![](https://fedoramagazine.org/wp-content/uploads/2018/04/gnome-extensions-for-developers-816x345.jpg)
扩展给予 GNOME3 桌面环境以非常大的灵活性这种灵活性赋予了用户在定制化桌面上的优势从而使他们的工作流程变得更加舒适和有效率。Fedora Magazine 已经介绍了一些很棒的桌面扩展,例如 [EasyScreenCast][1]、 [gTile][2] 和 [OpenWeather][3] ,本文接下来会重点报道这些为开发者而改变的扩展。
如果你需要帮助来安装 GNOME 扩展,那么可以参考《[如何安装一个 GNOME Shell 扩展][4]》这篇文章。
### Docker 集成Docker Integration
![Docker Integration extension icon][5]
![Docker Integration extension status menu][6]
对于为自己的应用使用 Docker 的开发者而言,这个 [Docker 集成][7] 扩展是必不可少的。这个状态菜单提供了一个带着启动、停止、暂停、甚至删除它们的选项的 Docker 容器列表,这个列表会在新容器加入到这个系统时自动更新。
在安装完这个扩展后Fedora 用户可能会收到这么一条消息“Error occurred when fetching containers.(获取容器时发生错误)”。这是因为 Docker 命令默认需要 `sudo` 或 root 权限。要设置你的用户权限来运行 Docker可以参考 [Fedora 开发者门户网站上的 Docker 安装这一页][8]。
你可以在该[扩展的站点][9]上找到更多的信息。
### Jenkins CI 服务器指示器Jenkins CI Server Indicator
![Jenkins CI Server Indicator icon][10]
![Jenkins CI Server Indicator extension status menu][11]
[Jenkins CI 服务器指示器][12]这个扩展可以使开发者在 Jenkins CI 服务器建立应用很简单,它展示了一个菜单,包含有任务列表及那些任务的状态。它也包括了一些如轻松访问 Jenkins 网页前端、任务完成提示、以及触发和过滤任务等特性。
如果想要更多的信息,请去浏览[开发者站点][13]。
### 安卓工具android-tool
![android-tool extension icon][14]
![android-tool extension status menu][15]
[安卓工具][16]对于 Android 开发者来说会是一个非常有价值的扩展,它的特性包括捕获错误报告、设备截屏和屏幕录像。它可以通过 usb 和 tcp 连接两种方式来连接 Android 设备。
这个扩展需要 `adb` 的包,从 Fedora 官方仓库安装 `adb` 只需要[运行这条命令][17]
```
sudo dnf install android-tools
```
你可以在这个[扩展的 GitHub 网页][18]里找到更多信息。
### GnomeHub
![GnomeHub extension icon][19]
![GnomeHub extension status menu][20]
对于自己的项目使用 GitHub 的 GNOME 用户来说,[GnomeHub][21] 是一个非常好的扩展,它可以显示 GitHub 上的仓库,还可以通知用户有新提交的拉取请求。除此之外,用户可以把他们最喜欢的仓库加在这个扩展的设置里。
如果想要更多信息,可以参考一下这个[项目的 GitHub 页面][22]。
### gistnotes
![gistnotes extension icon][23]
简单地说,[gistnotes][24] 为 gist 用户提供了一种创建、存储和管理注释和代码片段的简单方式。如果想要更多的信息,可以参考这个[项目的网站][25]。
![gistnotes window][26]
### Arduino 控制器Arduino Control
![Arduino Control extension icon][27]
这个 [Arduino 控制器][28]扩展允许用户去连接或者控制他们自己的 Arduino 电路板,它同样允许用户在状态菜单里增加滑块或者开关。除此之外,开发者放在扩展目录里的脚本可以通过以太网或者 usb 来连接 Arduino 电路板。
最重要的是,这个扩展可以被定制化来适合你的项目,在器 README 文件里的提供例子是,它能够“通过网络上任意的电脑来控制你房间里的灯”。
你可以从这个[项目的 GitHub 页面][29]上得到更多的产品信息并安装这个扩展。
### Hotel Manager
![Hotel Manager extension icon][30]
![Hotel Manager extension status menu][31]
使用 Hotel 进程管理器开发网站的开发人员,应该尝试一下 [Hotel Manager][32] 这个扩展。它展示了一个增加到 Hotel 里的网页应用的列表,并给与了用户开始、停止和重启这些应用的能力。此外,还可以通过右边的电脑图标快速打开、浏览这些网页应用。这个扩展同样可以启动、停止或重启 Hotel 的后台程序。
本文发布时GNOME 3.26 版本的 Hotel Manager 版本 4 没有在该扩展的下拉式菜单里列出网页应用。版本 4 还会在 Fedora 28 (GNOME 3.28) 上安装时报错。然而,版本 3 工作在 Fedora 27 和 Fedora 28。
如果想要更多细节,可以去看这个[项目在 GitHub 上的网页][33]。
### VSCode 搜索插件VSCode Search Provider
[VSCode 搜索插件][34]是一个简单的扩展,它能够在 GNOME 综合搜索结果里展示 Visual Studio Code 项目。对于重度 VSCode 用户来说,这个扩展可以让用户快速连接到他们的项目,从而节省时间。你可以从这个[项目在 GitHub 上的页面][35]来得到更多的信息。
![GNOME Overview search results showing VSCode projects.][36]
在开发环境方面,你有没有一个最喜欢的扩展呢?发在评论区里,一起来讨论下吧。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/awesome-gnome-extensions-developers/
作者:[Shaun Assam][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[hopefully2333](https://github.com/hopefully2333)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://fedoramagazine.org/author/sassam/
[1]:https://fedoramagazine.org/screencast-gnome-extension/
[2]:https://fedoramagazine.org/must-have-gnome-extension-gtile/
[3]:https://fedoramagazine.org/weather-updates-openweather-gnome-shell-extension/
[4]:https://linux.cn/article-9447-1.html
[5]:https://fedoramagazine.org/wp-content/uploads/2017/08/dockericon.png
[6]:https://fedoramagazine.org/wp-content/uploads/2017/08/docker-extension-menu.png
[7]:https://extensions.gnome.org/extension/1065/docker-status/
[8]:https://developer.fedoraproject.org/tools/docker/docker-installation.html
[9]:https://github.com/gpouilloux/gnome-shell-extension-docker
[10]:https://fedoramagazine.org/wp-content/uploads/2017/08/jenkinsicon.png
[11]:https://fedoramagazine.org/wp-content/uploads/2017/08/jenkins-extension-menu.png
[12]:https://extensions.gnome.org/extension/399/jenkins-ci-server-indicator/
[13]:https://www.philipphoffmann.de/gnome-3-shell-extension-jenkins-ci-server-indicator/
[14]:https://fedoramagazine.org/wp-content/uploads/2017/08/androidtoolicon.png
[15]:https://fedoramagazine.org/wp-content/uploads/2017/08/android-tool-extension-menu.png
[16]:https://extensions.gnome.org/extension/1232/android-tool/
[17]:https://fedoramagazine.org/howto-use-sudo/
[18]:https://github.com/naman14/gnome-android-tool
[19]:https://fedoramagazine.org/wp-content/uploads/2017/08/gnomehubicon.png
[20]:https://fedoramagazine.org/wp-content/uploads/2017/08/gnomehub-extension-menu.png
[21]:https://extensions.gnome.org/extension/1263/gnomehub/
[22]:https://github.com/lagartoflojo/gnomehub
[23]:https://fedoramagazine.org/wp-content/uploads/2017/08/gistnotesicon.png
[24]:https://extensions.gnome.org/extension/917/gistnotes/
[25]:https://github.com/mohan43u/gistnotes
[26]:https://fedoramagazine.org/wp-content/uploads/2018/04/gistnoteswindow.png
[27]:https://fedoramagazine.org/wp-content/uploads/2017/08/arduinoicon.png
[28]:https://extensions.gnome.org/extension/894/arduino-control/
[29]:https://github.com/simonthechipmunk/arduinocontrol
[30]:https://fedoramagazine.org/wp-content/uploads/2017/08/hotelicon.png
[31]:https://fedoramagazine.org/wp-content/uploads/2017/08/hotelmanager-extension-menu.png
[32]:https://extensions.gnome.org/extension/1285/hotel-manager/
[33]:https://github.com/hardpixel/hotel-manager
[34]:https://extensions.gnome.org/extension/1207/vscode-search-provider/
[35]:https://github.com/jomik/vscode-search-provider
[36]:https://fedoramagazine.org/wp-content/uploads/2018/04/vscodesearch.png

View File

@ -1,3 +1,5 @@
translating----geekpi
How To Resume Partially Transferred Files Over SSH Using Rsync
======

View File

@ -1,111 +0,0 @@
Translating by MjSeven
How To Quickly Monitor Multiple Hosts In Linux
======
![](https://www.ostechnix.com/wp-content/uploads/2018/03/rwho-1-720x340.png)
There are plenty of monitoring tools out there to monitor local and remote Linux systems. One fine example is [**Cockpit**][1]. Those tools, however, are either bit complicated to install and use, at least for the newbie admins. The newbie admin might need to spend some time to figure out how to configure those tools to monitor the systems. If you want a quick and dirty way to monitor multiple hosts at a time in your local area network, you might need to check **“rwho”** tool. It will instantly and quickly will monitor the local and remote systems as soon as you install rwho utility. You configure nothing! All you have to do is to install “rwho” tool on the systems that you want to monitor.
Please dont think of rwho as a feature-rich, and complete monitoring tool. This is just a simple tool that monitors only the **uptime** , **load** and **logged in users** of a remote system. Using “rwho” utility, we can find who is logged in on which computer, a list of monitored computers with uptime (time since last reboot), how many users are logged in and the load averages for the past 1, 5, and 15 minutes. Nothing more! Nothing less! Also, it will only monitor the systems that are in the same subnet. hence, it is ideal for small and home office network.
### Monitor Multiple Hosts In Linux
Let me explain how rwho works. Every system that uses rwho on the network will broadcast information about itself. The other computers can access these information using rwhod-daemon. So, every computer on the network must have rwho installed. Also, the rwhod-port (e.g. Port 513/UDP) must be allowed through your firewall/router in-order to distribute or access the information of other hosts.
Alright, let us install it.
I tested in on Ubuntu 16.04 LTS server. rwho is available in the default repositories, so we can install it using the APT package manager like below.
```
$ sudo apt-get install rwho
```
On RPM based systems such as CentOS, Fedora, RHEL, use this command to install it:
```
$ sudo yum install rwho
```
Make sure you have allowed the rwhod-port 513 if you are behind a firewall/router. Also, verify if the rwhod-daemon is running or not using command:
$ sudo systemctl status rwhod
If it is not started already, run the following commands to enable and start rwhod service:
```
$ sudo systemctl enable rwhod
$ sudo systemctl start rwhod
```
Now, it is time to monitor the systems. Run the following command to find out who is logged on which computer:
```
$ rwho
ostechni ostechnix:pts/5 Mar 12 17:41
root server:pts/0 Mar 12 17:42
```
As you can see, currently there are two systems on my local area network. The local system user is **ostechnix** (Ubuntu 16.04 LTS) and remote systems user is **root** (CentOS 7). As you might guessed already, rwho is similar to “who” command, but it will monitor the remote systems too.
And, we can find the uptime of all running systems on the network, using command:
```
$ ruptime
ostechnix up 2:17, 1 user, load 0.09, 0.03, 0.01
server up 1:54, 1 user, load 0.00, 0.01, 0.05
```
Here, ruptime (similar to “uptime” command) displays the total uptime of my Ubuntu (local) and CentOS (remote) systems. Got it? Great! Here is the sample screenshot from my Ubuntu 16.04 LTS system:
![][3]
You can find the information about all other machines in the local area network in the following location:
```
$ ls /var/spool/rwho/
whod.ostechnix whod.server
```
This is a small, yet very useful to find out who is logged in on which computer and the uptime along with system load details.
**Suggested read:**
Please be mindful that this method has one serious loophole. Since information about every computer is broadcasted over the net, everyone in the subnet could potentially get this information. It is okay normally but on the other side this can be a unwanted side-effect when information about the network is distributed to non-authorized users. So, It is strongly recommended to use it in a trusted and protected local area network.
For more details, refer man pages.
```
$ man rwho
```
And, thats all for now. More good stuffs to come. Stay tuned!
Cheers!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/
作者:[SK][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.ostechnix.com/author/sk/
[1]:https://www.ostechnix.com/cockpit-monitor-administer-linux-servers-via-web-browser/
[2]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]:http://www.ostechnix.com/wp-content/uploads/2018/03/rwho.png
[4]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=reddit (Click to share on Reddit)
[5]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=twitter (Click to share on Twitter)
[6]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=facebook (Click to share on Facebook)
[7]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=google-plus-1 (Click to share on Google+)
[8]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=linkedin (Click to share on LinkedIn)
[9]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=pocket (Click to share on Pocket)
[10]:https://api.whatsapp.com/send?text=How%20To%20Quickly%20Monitor%20Multiple%20Hosts%20In%20Linux%20https%3A%2F%2Fwww.ostechnix.com%2Fhow-to-quickly-monitor-multiple-hosts-in-linux%2F (Click to share on WhatsApp)
[11]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=telegram (Click to share on Telegram)
[12]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=email (Click to email this to a friend)
[13]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/#print (Click to print)

View File

@ -1,123 +0,0 @@
translating---geekpi
How To Check User Created Date On Linux
======
Did you know, how to check user account created date on Linux system? If Yes, what are the ways to do.
Are you getting succeed on this? If yes, how to do?
Basically Linux operating system doesnt track this information so, what are the alternate ways to get this information.
You might ask why i want to check this?
Yes, in some cases you may want to check this information, at that time this will very helpful for you.
This can be verified using below 7 methods.
* Using /var/log/secure file
* Using aureport utility
* Using .bash_logout file
* Using chage Command
* Using useradd Command
* Using passwd Command
* Using last Command
### Method-1: Using /var/log/secure file
It stores all security related messages including authentication failures and authorization privileges. It also tracks sudo logins, SSH logins and other errors logged by system security services daemon.
```
# grep prakash /var/log/secure
Apr 12 04:07:18 centos.2daygeek.com useradd[21263]: new group: name=prakash, GID=501
Apr 12 04:07:18 centos.2daygeek.com useradd[21263]: new user: name=prakash, UID=501, GID=501, home=/home/prakash, shell=/bin/bash
Apr 12 04:07:34 centos.2daygeek.com passwd: pam_unix(passwd:chauthtok): password changed for prakash
Apr 12 04:08:32 centos.2daygeek.com sshd[21269]: Accepted password for prakash from 103.5.134.167 port 60554 ssh2
Apr 12 04:08:32 centos.2daygeek.com sshd[21269]: pam_unix(sshd:session): session opened for user prakash by (uid=0)
```
### Method-2: Using aureport utility
The aureport utility allows you to generate summary and columnar reports on the events recorded in Audit log files. By default, all audit.log files in the /var/log/audit/ directory are queried to create the report.
```
# aureport --auth | grep prakash
46. 04/12/2018 04:08:32 prakash 103.5.134.167 ssh /usr/sbin/sshd yes 288
47. 04/12/2018 04:08:32 prakash 103.5.134.167 ssh /usr/sbin/sshd yes 291
```
### Method-3: Using .bash_logout file
The .bash_logout file in your home directory have a special meaning to bash, it provides a way to execute commands when the user logs out of the system.
We can check for the Change date of the .bash_logout file in the users home directory. This file is created upon users first logout.
```
# stat /home/prakash/.bash_logout
File: `/home/prakash/.bash_logout'
Size: 18 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 256153 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 501/ prakash) Gid: ( 501/ prakash)
Access: 2017-03-22 20:15:00.000000000 -0400
Modify: 2017-03-22 20:15:00.000000000 -0400
Change: 2018-04-12 04:07:18.283000323 -0400
```
### Method-4: Using chage Command
chage stand for change age. This command allows user to mange password expiry information. The chage command changes the number of days between password changes and the date of the last password change.
This information is used by the system to determine when a user must change his/her password. This will work if the user does not change the password since the account creation date.
```
# chage --list prakash
Last password change : Apr 12, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
```
### Method-5: Using useradd Command
useradd command is used to create new accounts in Linux. By default, it wont add user creation date and we have to add date using “Comment” option.
```
# useradd -m prakash -c `date +%Y/%m/%d`
# grep prakash /etc/passwd
prakash:x:501:501:2018/04/12:/home/prakash:/bin/bash
```
### Method-6: Using useradd Command
passwd command used assign password to local accounts or users. If the user has not changed his password since the accounts creation date, then you can use the passwd command to find out the date of the last password reset.
```
# passwd -S prakash
prakash PS 2018-04-11 0 99999 7 -1 (Password set, MD5 crypt.)
```
### Method-7: Using last Command
last command reads the file /var/log/wtmp and displays a list of all users logged in (and out) since that file was created.
```
# last | grep "prakash"
prakash pts/2 103.5.134.167 Thu Apr 12 04:08 still logged in
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/how-to-check-user-created-date-on-linux/
作者:[Prakash Subramanian][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/prakash/

View File

@ -0,0 +1,107 @@
如何在 Linux 中快速监控多个主机
=====
![](https://www.ostechnix.com/wp-content/uploads/2018/03/rwho-1-720x340.png)
有很多监控工具可用来监控本地和远程 Linux 系统,一个很好的例子是 [**Cockpit**][1]。但是,这些工具的安装和使用比较复杂,至少对于新手管理员来说是这样。新手管理员可能需要花一些时间来弄清楚如何配置这些工具来监视系统。如果你想要以快速且粗略地在局域网中一次监控多台主机,你可能需要查看一下 **“rwho”** 工具。只要安装 rwho 实用程序,它将立即快速地监控本地和远程系统。你什么都不用配置!你所要做的就是在要监视的系统上安装 “rwho” 工具。
请不要将 rwho 视为功能丰富且完整的监控工具。这只是一个简单的工具,它只监视远程系统的**正常运行时间****加载**和**登录用户**。使用 “rwho” 使用程序,我们可以发现谁在哪台计算机上登录,一个被监视的计算机的列表,有正常运行时间(自上次重新启动以来的时间),有多少用户登录了,以及在过去的 1、5、15 分钟的平均负载。不多不少!而且,它只监视同一子网中的系统。因此,它非常适合小型和家庭办公网络。
### 在 Linux 中监控多台主机
让我来解释一下 rwho 是如何工作的。每个在网络上使用 rwho 的系统都将广播关于它自己的信息,其他计算机可以使用 rwhod-daemon 来访问这些信息。因此,网络上的每台计算机都必须安装 rwho。此外为了分发或访问其他主机的信息必须允许 rwho 端口(例如端口 513/UDP通过防火墙/路由器。
好的,让我们来安装它。
我在 Ubuntu 16.04 LTS 服务器上进行了测试rwho 在默认仓库中可用,所以,我们可以使用像下面这样的 APT 软件包管理器来安装它。
```
$ sudo apt-get install rwho
```
在基于 RPM 的系统如 CentOS, Fedora, RHEL上使用以下命令来安装它
```
$ sudo yum install rwho
```
如果你在防火墙/路由器之后,确保你已经允许使用 rwhod 513 端口。另外,使用命令验证 rwhod-daemon 是否正在运行:
$ sudo systemctl status rwhod
如果它尚未启动,运行以下命令启用并启动 rwhod 服务:
```
$ sudo systemctl enable rwhod
$ sudo systemctl start rwhod
```
现在是时候来监视系统了。运行以下命令以发现谁在哪台计算机上登录:
```
$ rwho
ostechni ostechnix:pts/5 Mar 12 17:41
root server:pts/0 Mar 12 17:42
```
正如你所看到的,目前我的局域网中有两个系统。本地系统用户是 **ostechnix** (Ubuntu 16.04 LTS),远程系统的用户是 **root** (CentOS 7)。可能你已经猜到了rwho 与 “who” 命令相似,但它会监视远程系统。
而且,我们可以使用以下命令找到网络上所有正在运行的系统的正常运行时间:
```
$ ruptime
ostechnix up 2:17, 1 user, load 0.09, 0.03, 0.01
server up 1:54, 1 user, load 0.00, 0.01, 0.05
```
这里ruptime类似于 “uptime” 命令)显示了我的 Ubuntu本地 and CentOS远程系统的总运行时间。明白了吗棒极了以下是我的 Ubuntu 16.04 LTS 系统的示例屏幕截图:
![][3]
你可以在以下位置找到有关局域网中所有其他机器的信息:
```
$ ls /var/spool/rwho/
whod.ostechnix whod.server
```
它很小,但却非常有用,可以发现谁在哪台计算机上登录,以及正常运行时间和系统负载详情。
**建议阅读:**
请注意,这种方法有一个严重的漏洞。由于有关每台计算机的信息都通过网络进行广播,因此该子网中的每个人都可能获得此信息。通常情况下可以,但另一方面,当有关网络的信息分发给非授权用户时,这可能是不必要的副作用。因此,强烈建议在受信任和受保护的局域网中使用它。
更多的信息,查找 man 手册页。
```
$ man rwho
```
好了,这就是全部了。更多好东西要来了,敬请期待!
干杯!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/
作者:[SK][a]
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.ostechnix.com/author/sk/
[1]:https://www.ostechnix.com/cockpit-monitor-administer-linux-servers-via-web-browser/
[2]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]:http://www.ostechnix.com/wp-content/uploads/2018/03/rwho.png
[4]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=reddit (Click to share on Reddit)
[5]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=twitter (Click to share on Twitter)
[6]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=facebook (Click to share on Facebook)
[7]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=google-plus-1 (Click to share on Google+)
[8]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=linkedin (Click to share on LinkedIn)
[9]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=pocket (Click to share on Pocket)
[10]:https://api.whatsapp.com/send?text=How%20To%20Quickly%20Monitor%20Multiple%20Hosts%20In%20Linux%20https%3A%2F%2Fwww.ostechnix.com%2Fhow-to-quickly-monitor-multiple-hosts-in-linux%2F (Click to share on WhatsApp)
[11]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=telegram (Click to share on Telegram)
[12]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/?share=email (Click to email this to a friend)
[13]:https://www.ostechnix.com/how-to-quickly-monitor-multiple-hosts-in-linux/#print (Click to print)

View File

@ -1,126 +0,0 @@
对开发者来说非常好的GNOME扩展
======
![](https://fedoramagazine.org/wp-content/uploads/2018/04/gnome-extensions-for-developers-816x345.jpg)
这个扩展给与了 GNOME3 桌面环境以非常大的灵活性这种灵活性赋予了用户在定制化桌面上的优势从而使他们的工作流程变得更加舒适和有效率。Fedora 系统已经已经包含了一部分例如 EasyScreenCast, gTile, 和 OpenWeather 这样很好的桌面扩展,本文接下来会重点报道这些为开发者而改变的扩展。
如果你需要帮助来安装 GNOME 扩展,那么可以参考《如何安装一个 GNOME 命令行扩展》这篇文章。
### ![Docker Integration extension icon][5] Docker Integration
![Docker Integration extension status menu][6]
对于为自己的应用使用 docker 的开发者而言,这个 docker 集成扩展是必不可少的。这个状态菜单提供了一个带着启动、停止、暂停、甚至删除的这些选项的 docker 容器的列表,这个列表会在新容器加入到这个系统时自动更新。
在安装完这些扩展后Fedora 用户可能会收到这么一条消息:“加载容器时发生错误”。这是因为 docker 命令需要在命令前加 sudo或者得到默认的 root 权限。去设置你的用户权限再去运行 docker可以参考 Fedora 门户网站上的 docker 安装这一页。
你可以在这个扩展的站点上找到更多的信息。
### ![Jenkins CI Server Indicator icon][10] Jenkins CI Server Indicator
![Jenkins CI Server Indicator extension status menu][11]
Jenkins CI 服务器指向仪这个扩展使开发者把他们的应用建立在 Jenkins CI 服务器上的这个过程更加简单,它展示了一个菜单,菜单中有一个带有进程和进程状态的列表。他同样包含了很多特点,比如很容易就能创建 Jenkins 的前端,为完整的进程做通知,而且能够触发或者过滤进程。
如果想要更多的信息,请去浏览开发者站点。
### ![android-tool extension icon][14] android-tool
Android-tool 对于 Android 开发者来说会是一个非常有价值的扩展,它的特点包括捕捉错误报告,设备截屏和屏幕录像。它可以通过 usb 和 tcp 连接两种方式来连接 Android 设备。
这个扩展需要 adb 的包,从 Fedora 官方仓库安装 adb 只需要运行这条命令:
```
sudo dnf install android-tools
```
你可以在这个扩展的 GitHub 网页里找到更多信息。
### ![GnomeHub extension icon][19] GnomeHub
对于为自己的项目使用 GitHub 的 GNOME 用户来说GnomeHub 是一个非常好的扩展,它可以显示 Github 上的仓库,还可以通知用户有新提交的 pull requests。除此之外用户可以把他们最喜欢的仓库加在这个扩展的设置里。
如果想要更多信息,可以参考一下这个项目的 GitHub 页面。
### ![gistnotes extension icon][23] gistnotes
简单地说gistnotes 为 gist 用户提供了一种简单的方式来创建、存储和管理注释和代码片段。如果想要更多的信息,可以参考这个项目的网站。
![gistnotes window][26]
### ![Arduino Control extension icon][27] Arduino Control
这个 Arduino 控制扩展允许用户去连接或者控制他们自己的单片机电路板,它同样允许用户在状态菜单里增加滑块或者开关。除此之外,开发者模式允许扩展目录里的脚本通过以太网或者 usb 来连接电路板。
最重要的是,这个扩展可以被定制化来适合你的项目,在 README 文件里的例子是,它能够“通过网络上任意的电脑来控制你房间里的灯”。
你可以从这个项目的 GitHub 页面上得到更多的产品信息并安装这个扩展。
### ![Hotel Manager extension icon][30] Hotel Manager
![Hotel Manager extension status menu.][31]
使用 Hotel process manager 开发网站的开发人员,应该尝试一下 Hotel Manager 这个扩展。它展示了一个增加到 hotel 里的网页应用的列表,并给与了用户去开始、停止和重启这些应用的能力。
此外,还可以通过电脑图标快速打开、浏览这些网页应用。这个扩展同样可以启动、停止或重启 hotel 的后台程序。
作为本文的出版物GNOME 3.26 版本的 Hotel Manager 版本 4 没有在扩展的下拉式菜单里列出网页应用。版本 4 还会在 Fedora 28 (GNOME 3.28) 上安装时报错。然而,版本 3 工作在 Fedora 27 和 Fedora 28。
如果想要更多细节,可以去看这个项目在 GitHub 上的网页。
### VSCode Search Provider
VSCode Search Provider 是一个简单的扩展,它能够在 GNOME 综合搜索结果里展示可视化工作代码项目。对于大部分的 VSCode 用户来说,这个扩展可以让用户快速连接到他们的项目,从而节省时间。你可以从这个项目在 GitHub 上的页面来得到更多的信息。
![GNOME Overview search results showing VSCode projects.][36]
在开发环境方面,你有没有一个最喜欢的扩展呢?发在评论区里,一起来讨论下吧。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/awesome-gnome-extensions-developers/
作者:[Shaun Assam][a]
译者:[hopefully2333](https://github.com/hopefully2333)
校对:[校对者ID](https://github.com/校对者ID)
选题:[lujun9972](https://github.com/lujun9972)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://fedoramagazine.org/author/sassam/
[1]:https://fedoramagazine.org/screencast-gnome-extension/
[2]:https://fedoramagazine.org/must-have-gnome-extension-gtile/
[3]:https://fedoramagazine.org/weather-updates-openweather-gnome-shell-extension/
[4]:https://fedoramagazine.org/install-gnome-shell-extension/
[5]:https://fedoramagazine.org/wp-content/uploads/2017/08/dockericon.png
[6]:https://fedoramagazine.org/wp-content/uploads/2017/08/docker-extension-menu.png
[7]:https://extensions.gnome.org/extension/1065/docker-status/
[8]:https://developer.fedoraproject.org/tools/docker/docker-installation.html
[9]:https://github.com/gpouilloux/gnome-shell-extension-docker
[10]:https://fedoramagazine.org/wp-content/uploads/2017/08/jenkinsicon.png
[11]:https://fedoramagazine.org/wp-content/uploads/2017/08/jenkins-extension-menu.png
[12]:https://extensions.gnome.org/extension/399/jenkins-ci-server-indicator/
[13]:https://www.philipphoffmann.de/gnome-3-shell-extension-jenkins-ci-server-indicator/
[14]:https://fedoramagazine.org/wp-content/uploads/2017/08/androidtoolicon.png
[15]:https://fedoramagazine.org/wp-content/uploads/2017/08/android-tool-extension-menu.png
[16]:https://extensions.gnome.org/extension/1232/android-tool/
[17]:https://fedoramagazine.org/howto-use-sudo/
[18]:https://github.com/naman14/gnome-android-tool
[19]:https://fedoramagazine.org/wp-content/uploads/2017/08/gnomehubicon.png
[20]:https://fedoramagazine.org/wp-content/uploads/2017/08/gnomehub-extension-menu.png
[21]:https://extensions.gnome.org/extension/1263/gnomehub/
[22]:https://github.com/lagartoflojo/gnomehub
[23]:https://fedoramagazine.org/wp-content/uploads/2017/08/gistnotesicon.png
[24]:https://extensions.gnome.org/extension/917/gistnotes/
[25]:https://github.com/mohan43u/gistnotes
[26]:https://fedoramagazine.org/wp-content/uploads/2018/04/gistnoteswindow.png
[27]:https://fedoramagazine.org/wp-content/uploads/2017/08/arduinoicon.png
[28]:https://extensions.gnome.org/extension/894/arduino-control/
[29]:https://github.com/simonthechipmunk/arduinocontrol
[30]:https://fedoramagazine.org/wp-content/uploads/2017/08/hotelicon.png
[31]:https://fedoramagazine.org/wp-content/uploads/2017/08/hotelmanager-extension-menu.png
[32]:https://extensions.gnome.org/extension/1285/hotel-manager/
[33]:https://github.com/hardpixel/hotel-manager
[34]:https://extensions.gnome.org/extension/1207/vscode-search-provider/
[35]:https://github.com/jomik/vscode-search-provider
[36]:https://fedoramagazine.org/wp-content/uploads/2018/04/vscodesearch.png

View File

@ -0,0 +1,121 @@
如何在 Linux 上查看用户的创建日期
======
你知道吗,如何在 Linux 系统上查看帐户的创建日期?如果知道,那么有些什么办法。
你成功了么?如果是的话,该怎么做?
基本上 Linux 系统不会跟踪这些信息,因此,获取这些信息的替代方法是什么?
你可能会问为什么我要查看这个?
是的,在某些情况下,你可能需要查看这些信息,那时就会对你会有帮助。
可以使用以下 7 种方法进行验证。
* 使用 /var/log/secure
* 使用 aureport 工具
* 使用 .bash_logout
* 使用 chage 命令
* 使用 useradd 命令
* 使用 passwd 命令
* 使用 last 命令
### 方式 1使用 /var/log/secure
它存储所有安全相关的消息,包括身份验证失败和授权特权。它还会通过系统安全守护进程跟踪 sudo 登录、SSH 登录和其他错误记录。
```
# grep prakash /var/log/secure
Apr 12 04:07:18 centos.2daygeek.com useradd[21263]: new group: name=prakash, GID=501
Apr 12 04:07:18 centos.2daygeek.com useradd[21263]: new user: name=prakash, UID=501, GID=501, home=/home/prakash, shell=/bin/bash
Apr 12 04:07:34 centos.2daygeek.com passwd: pam_unix(passwd:chauthtok): password changed for prakash
Apr 12 04:08:32 centos.2daygeek.com sshd[21269]: Accepted password for prakash from 103.5.134.167 port 60554 ssh2
Apr 12 04:08:32 centos.2daygeek.com sshd[21269]: pam_unix(sshd:session): session opened for user prakash by (uid=0)
```
### 方式 2使用 aureport 工具
aureport 工具可以根据记录在审计日志中的事件记录生成汇总和柱状报告。默认情况下,它会查询 /var/log/audit/ 目录中的所有 audit.log 文件来创建报告。
```
# aureport --auth | grep prakash
46. 04/12/2018 04:08:32 prakash 103.5.134.167 ssh /usr/sbin/sshd yes 288
47. 04/12/2018 04:08:32 prakash 103.5.134.167 ssh /usr/sbin/sshd yes 291
```
### 方式 3使用 .bash_logout
家目录中的 .bash_logout 对 bash 有特殊的含义,它提供了一种在用户退出系统时执行命令的方式。
我们可以查看用户家目录中 .bash_logout 的更改日期。该文件是在用户第一次注销时创建的。
```
# stat /home/prakash/.bash_logout
File: `/home/prakash/.bash_logout'
Size: 18 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 256153 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 501/ prakash) Gid: ( 501/ prakash)
Access: 2017-03-22 20:15:00.000000000 -0400
Modify: 2017-03-22 20:15:00.000000000 -0400
Change: 2018-04-12 04:07:18.283000323 -0400
```
### 方式 4使用 chage 命令
chage 代表 change age。该命令让用户管理密码过期信息。chage 命令更改密码更改时和上次密码更改日期之间的天数。
系统使用此信息来确定用户何时必须更改其密码。如果用户自帐户创建日期以来没有更改密码,这个就有用。
```
# chage --list prakash
Last password change : Apr 12, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
```
### 方式 5使用 useradd 命令
useradd 命令用于在 Linux 中创建新帐户。默认情况下,它不会添加用户创建日期,我们必须使用 “Comment” 选项添加日期。
```
# useradd -m prakash -c `date +%Y/%m/%d`
# grep prakash /etc/passwd
prakash:x:501:501:2018/04/12:/home/prakash:/bin/bash
```
### 方式 6使用 passwd 命令
passwd 命令用于将密码分配给本地帐户或用户。如果用户在帐户创建后没有修改密码,那么可以使用 passwd 命令查看最后一次密码修改的日期。
```
# passwd -S prakash
prakash PS 2018-04-11 0 99999 7 -1 (Password set, MD5 crypt.)
```
### 方式 7使用 last 命令
last 命令读取 /var/log/wtmp并显示自该文件创建以来所有登录和退出用户的列表。
```
# last | grep "prakash"
prakash pts/2 103.5.134.167 Thu Apr 12 04:08 still logged in
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/how-to-check-user-created-date-on-linux/
作者:[Prakash Subramanian][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者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/prakash/