mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
1ddd3e0402
@ -0,0 +1,70 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Student Linux club refurbishes computers to support distance learning)
|
||||
[#]: via: (https://opensource.com/article/20/7/donate-linux)
|
||||
[#]: author: (Cam Citrowske https://opensource.com/users/camcitrowske)
|
||||
|
||||
Student Linux club refurbishes computers to support distance learning
|
||||
======
|
||||
Open source helps bridge the digital divide for families in need of
|
||||
computers for distance learning during the pandemic.
|
||||
![][1]
|
||||
|
||||
_This article is co-written by Cam Citrowske, a member of the Penguin Corps._
|
||||
|
||||
It was March 17, 2020, and I was in my classroom at Aspen Academy. The clock was ticking. This was to be the last day of school before we, along with every other public school in Minnesota, would close due to the outbreak of the new coronavirus. I had students in my room during lunch, advisory periods, and my elective classes all doing the same thing—installing Linux onto old computers so we could give them to students who would use them for school at home during the shelter in place order. I was only going to have the kids' help until dismissal time, but in the end, we had 17 computers ready to go. It was a start.
|
||||
|
||||
Hi, I'm Stu Keroff. I'm a social studies and technology teacher at Aspen Academy in Savage, MN. I am also the director of the Penguin Corps, our school's Linux club. When we started the club back in September of 2019, I wanted the kids at my new school to take on the same type of mission that the kids at my last school had: using Linux to close the "digital divide" (see this [article][2] about the Community School of Excellence Asian Penguins for more information). The Penguin Corps gave away a few computers during the year, but nothing had prepared us for what was coming.
|
||||
|
||||
It was in January that I first heard about COVID-19. At the time, it was making people sick in other countries, and while it was a topic of discussion in my social studies classes, I wasn't concerned because it wasn't in Minnesota.
|
||||
|
||||
![Linux club donating computers][3]
|
||||
|
||||
(Stu Keroff, [CC BY-SA 4.0][4])
|
||||
|
||||
By March, that had changed. Businesses were talking about how they would respond to the pandemic, and it raised the conversation about how it would affect schools. Fast forward to March 18, when all the schools in Minnesota were closed and converted to distance learning—teachers provide lessons online, and kids attend school in their homes over the internet. It was a huge change for all of us!
|
||||
|
||||
While it was tough for many of my students to go to school from their bedrooms or dining rooms, at least most of them had computers to use. But what about the kids at school who didn't have computers? Or the families who didn't have enough computers for all of the kids in the house? What were they supposed to do?
|
||||
|
||||
Our school's administrators reached out to me and the Penguin Corps to create a solution. We surveyed parents to find out how many families needed a computer and then got to work. We started by putting Linux on computers the school was no longer using, and then we gave those away. More responses started to pour in. We realized that the supply we had would not even be close to enough. This became a serious problem that was in need of a bigger solution.
|
||||
|
||||
Once we realized that, we started to ask for more. With help from the school, we reached out over social media and in the local newspaper, asking people to donate their old computers to us. A number of people and even some businesses like Caribou Coffee and St. Vincent de Paul of the Twin Cities responded. Laptops started to pour in. Most of them worked, but some needed minor repairs, such as new batteries, a charger, or a hard drive. All of the computers needed new software. Linux and open source apps were the solution. We got the computers up and running, tested them, and left them with the school to distribute.
|
||||
|
||||
The school continued to take referrals, and people came in to pick up laptops. The office receptionist eventually joined our team, walking parents through the software before they left with their laptops. Even though she had no previous experience with Linux, she was able to jump right in and contribute.
|
||||
|
||||
Prior to the shutdown, the Penguin Corps gave away six computers. Between March 16 and the first week of May, we gave away 60 computers. This effectively closed our school's digital divide.
|
||||
|
||||
And at what cost? Since we chose to go with used computers instead of buying new ones, the only thing we had to pay for were batteries, chargers, a couple of hard drives, and a keyboard. Total cost: approximately $900.00, or an average of $12.33 per computer, including the computers we had left over, which we're saving for the fall term.
|
||||
|
||||
The program even gave us the opportunity to help people outside of our school. Reverend Tim Christopher, a pastor in North Minneapolis, reached out to me and the Penguin Corps to ask for our help. A single mother in Minneapolis with two school-aged children needed computers for her kids to do distance learning from their home. Thanks to the Penguin Corps, both kids got one to use for school, for free.
|
||||
|
||||
Aspen Academy principal Melanie Jiskra said, "It was through this group of change agents that all Aspen Academy families had enough devices to continue their education through distance learning. Without the generosity of the people and companies who donated the laptops, the hard work and commitment of Mr. Keroff, and the talent, drive, and passion of the students to serve others, Aspen Academy would not have as successfully bridged the digital divide during this pandemic."
|
||||
|
||||
COVID-19 presented all schools with a challenge, and Aspen Academy's Penguin Corps demonstrated that open source software could be used to meet it. Our biggest challenge became our biggest victory.
|
||||
|
||||
Do you want to know more about how a Linux club can help your school or a school near you? You can email me at [studoeslinux@gmail.com][5]. You can also get ideas for starting your own program at [www.linuxclubguide.com][6].
|
||||
|
||||
The Asian Penguins Linux users group for middle school students is improving people’s lives through...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/donate-linux
|
||||
|
||||
作者:[Cam Citrowske][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/camcitrowske
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/penguin_corps_group_photo.jpg?itok=_uQlfxDa
|
||||
[2]: https://opensource.com/education/15/3/asian-penguins-Linux-middle-school-club
|
||||
[3]: https://opensource.com/sites/default/files/pictures/linux-club-donating-computers.jpg (Middle school Linux club donating computers)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: mailto:studoeslinux@gmail.com
|
||||
[6]: http://www.linuxclubguide.com
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (this-is-name-right)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (Sky0Master)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,6 @@
|
||||
translating
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (this-is-name-right)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -112,7 +113,7 @@ via: https://itsfoss.com/open-source-video-conferencing-tools/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[this-is-name-right](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,110 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!)
|
||||
[#]: via: (https://itsfoss.com/ubuntu-19-10-end-of-life/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!
|
||||
======
|
||||
|
||||
_**Ubuntu 19.10 Eoan Ermine**_ _**has reached end of life. That it means it won’t get any security or maintenance updates. Continue using Ubuntu 19.10 would be risky as your system may be vulnerable in future for the lack of security updates. You should upgrade to Ubuntu 20.04.**_
|
||||
|
||||
[Ubuntu 19.10 was released in October 2019][1] bringing some new features that prepared a base for [Ubuntu 20.04][2].
|
||||
|
||||
As a non-LTS release, it had a lifespan of nine months. It has completed its life cycle and as of 17th July 2020, it won’t be getting any updates.
|
||||
|
||||
### End of life for Ubuntu 19.10
|
||||
|
||||
![][3]
|
||||
|
||||
I have [explained Ubuntu release cycle and end of life][4] in detail earlier. I’ll reiterate what it means to you and your system if continue using Ubuntu 19.10 beyond this point.
|
||||
|
||||
[Software usually hav][5][e][5] [a predefined life cycle][5] and once a software version reaches end of life, it stops getting updates and support.
|
||||
|
||||
Beyond the end of life, Ubuntu 19.10 won’t get system updates, security updates or application updates from Ubuntu anymore.
|
||||
|
||||
If you continue using it, your system may fell victim to potential cyberattacks as hackers tend to exploit vulnerable system.
|
||||
|
||||
Later, you might not be able to install new software using apt command as Ubuntu will archive the repository for 19.10.
|
||||
|
||||
### What to do if you are using Ubuntu 19.10?
|
||||
|
||||
First, [check which version of Ubuntu you are using][6]. This can be done quickly by entering this command in the terminal:
|
||||
|
||||
```
|
||||
lsb_release -a
|
||||
```
|
||||
|
||||
```
|
||||
No LSB modules are available.
|
||||
Distributor ID: Ubuntu
|
||||
Description: Ubuntu 19.10
|
||||
Release: 19.10
|
||||
Codename: Eoan
|
||||
```
|
||||
|
||||
If you see Ubuntu 19.10, you should do either of these two things:
|
||||
|
||||
* If you have a good speed, consistent internet connection, upgrade to Ubuntu 20.04 from within 19.10. Your personal files and most software remain untouched.
|
||||
* If you have a slow or inconsistent internet connection, you should do a [fresh installation of Ubuntu 20.04][7]. Your files and everything else on the disk will be erased so you should make backup of your important data on an external disk.
|
||||
|
||||
|
||||
|
||||
#### How to upgrade to Ubuntu 20.04 from 19.10 (if you have good internet connection)
|
||||
|
||||
I have discussed the Ubuntu version upgrade in details previously. I’ll quickly mention the steps here as well.
|
||||
|
||||
First, make sure that your system is set to be notified of new version in Software & Updates.
|
||||
|
||||
Go to Software & Updates:
|
||||
|
||||
![][8]
|
||||
|
||||
Go to Updates tab and set “Notify me of a new Ubuntu version” to “For any new version”:
|
||||
|
||||
![][9]
|
||||
|
||||
Now, install any pending updates.
|
||||
|
||||
Now, run Update Manager tool again. You should be given the option to upgrade to Ubuntu 20.04. Hit the upgrade button and follow the instructions.
|
||||
|
||||
It installs packages of around 1.2 GB. This is why you need a good and consistent internet connection.
|
||||
|
||||
![][10]
|
||||
|
||||
Upgrading this way keeps your home directory as it is. Having a backup on external disk is still suggested, though.
|
||||
|
||||
### Are you still using Ubuntu 19.10?
|
||||
|
||||
If you are still using Ubuntu 19.10, you must prepare for the upgrade or fresh installation. You must not ignore it.
|
||||
|
||||
If you don’t like frequent version upgrades like this, you should stick with LTS versions that are supported for five years. The current LTS version is Ubuntu 20.04 which you’ll be upgrading to anyway.
|
||||
|
||||
Were/are you using Ubuntu 19.10? Have you already upgraded to Ubuntu 20.04? Let me know if you face any issue or if you have any questions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-19-10-end-of-life/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-19-10-released/
|
||||
[2]: https://itsfoss.com/download-ubuntu-20-04/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/ubuntu-19-10-end-of-life.jpg?ssl=1
|
||||
[4]: https://itsfoss.com/end-of-life-ubuntu/
|
||||
[5]: https://en.wikipedia.org/wiki/Systems_development_life_cycle
|
||||
[6]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||
[7]: https://itsfoss.com/install-ubuntu/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/03/upgrade-ubuntu-1.jpeg?ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/11/software-update-any-new-version.jpeg?resize=800%2C378&ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-focal.jpg?ssl=1
|
@ -0,0 +1,325 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Manage network connections from the Linux command line with nmcli)
|
||||
[#]: via: (https://opensource.com/article/20/7/nmcli)
|
||||
[#]: author: (Dave McKay https://opensource.com/users/davemckay)
|
||||
|
||||
Manage network connections from the Linux command line with nmcli
|
||||
======
|
||||
Tap into the power of the NetworkManager tool directly from the Linux
|
||||
command line with nmcli.
|
||||
![Business woman on laptop sitting in front of window][1]
|
||||
|
||||
The [nmcli][2] command lets you tap into the power of the NetworkManager tool directly from the Linux command line. It's an integral part of the NetworkManager package that makes use of an [application programmer's interface][3] (API) to access NetworkManager's functionality.
|
||||
|
||||
nmcli was released in 2010 and replaces other modes of configuring network interfaces and connections, such as [ifconfig][4]. Because it is a [command-line interface][5] (CLI) tool designed to be used in terminal windows and scripts, it is ideal for system administrators working on systems without a [graphical user interface][6] (GUI).
|
||||
|
||||
### ncmli syntax
|
||||
|
||||
The nmcli command accepts _options_ that modify nmcli's behavior, _sections_ that tell nmcli which of its capabilities you want to use, and _actions_ that tell it what you want it to do:
|
||||
|
||||
|
||||
```
|
||||
`$ nmcli <options> <section> <action>`
|
||||
```
|
||||
|
||||
There are eight sections, each related to a specific set of network actions:
|
||||
|
||||
* **Help** provides help about ncmcli's commands and usage.
|
||||
* **General** retrieves NetworkManager's status and global configuration.
|
||||
* **Networking** provides commands to query a network connection's status and enable or disable connections.
|
||||
* **Radio** provides commands to query a WiFi network connection's status and enable or disable connections.
|
||||
* **Monitor** provides commands to monitor NetworkManager activity and observe network connections' status changes.
|
||||
* **Connection** provides commands to bring network interfaces up and down, to add new connections, and to delete existing connections.
|
||||
* **Device** is mainly used to modify parameters associated with a device (e.g., the interface name) or to connect a device using an existing connection.
|
||||
* **Secret** registers nmcli as a NetworkManager secret agent listening for secret messages. This is very rarely required because nmcli does this automatically when connecting to networks.
|
||||
|
||||
|
||||
|
||||
### Simple examples
|
||||
|
||||
As a first check, verify NetworkManager is running and nmcli can communicate with it:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli general
|
||||
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
|
||||
connected full enabled enabled enabled enabled
|
||||
```
|
||||
|
||||
Reconnaissance is often the first part of administering a system. To list all in-memory and on-disk network connection profiles:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection show
|
||||
NAME UUID TYPE DEVICE
|
||||
Wired connection 1 ac3241e4-b424-35d6-aaa7-07498561688d ethernet enp0s3
|
||||
Wired connection 2 2279d917-fa02-390c-8603-3083ec5a1d3e ethernet enp0s8
|
||||
Wired connection 3 52d89737-de92-35ec-b082-8cf2e5ac36e6 ethernet enp0s9
|
||||
```
|
||||
|
||||
This command uses the `show` action from the `connection` section.
|
||||
|
||||
The test machine used for this example is running Ubuntu 20.04. It has three network adaptors installed: `enp0s3`, `enp0s8`, and `enp0s9`.
|
||||
|
||||
### Connection management
|
||||
|
||||
It's important to understand nmcli's nomenclature. A network **connection** is something that holds all the information about a connection. You can think of it as a network **configuration**. A connection encapsulates all the information related to a connection, including the [data-link layer][7] and the [IP-addressing information][8]. That's layer 2 and layer 3 in the [OSI networking model][9].
|
||||
|
||||
When you are configuring networking on Linux, you're usually configuring connections that will eventually bind to networking devices, which are the network interfaces installed in a computer. When a connection is used by a device, the connection is said to be **active** or **up**. The opposite of active is **inactive** or **down**.
|
||||
|
||||
#### Adding network connections
|
||||
|
||||
The ncmli command allows you to quickly create network connections and specify elements of their configuration at the same time. To add a new connection using wired connection 2, `enp0s8`, you need to use `sudo`:
|
||||
|
||||
|
||||
```
|
||||
$ sudo nmcli connection add type ethernet ifname enp0s8
|
||||
Connection 'ethernet-enp0s8' (09d26960-25a0-440f-8b20-c684d7adc2f5) successfully added.
|
||||
```
|
||||
|
||||
The `type` option requests an [Ethernet][10] connection, and the `ifname` (interface name) option specifies the network interface device you want the connection to use.
|
||||
|
||||
Check what happened:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection show
|
||||
NAME UUID TYPE DEVICE
|
||||
Wired connection 1 ac3241e4-b424-35d6-aaa7-07498561688d ethernet enp0s3
|
||||
Wired connection 2 2279d917-fa02-390c-8603-3083ec5a1d3e ethernet enp0s8
|
||||
Wired connection 3 52d89737-de92-35ec-b082-8cf2e5ac36e6 ethernet enp0s9
|
||||
ethernet-enp0s8 09d26960-25a0-440f-8b20-c684d7adc2f5 ethernet --
|
||||
```
|
||||
|
||||
Your new connection, `ethernet-enp0s8`, was created. Its [universally unique identifier][11] (UUID) was assigned, and the connection type is Ethernet. Make it active with the `up` command followed by the connection name (or the UUID):
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection up ethernet-enp0s8
|
||||
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
|
||||
```
|
||||
|
||||
Check your active connections once more:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection show --active
|
||||
NAME UUID TYPE DEVICE
|
||||
Wired connection 1 ac3241e4-b424-35d6-aaa7-07498561688d ethernet enp0s3
|
||||
ethernet-enp0s8 09d26960-25a0-440f-8b20-c684d7adc2f5 ethernet enp0s8
|
||||
Wired connection 3 52d89737-de92-35ec-b082-8cf2e5ac36e6 ethernet enp0s9
|
||||
```
|
||||
|
||||
Your new connection, `ethernet-enp0s8`, is now active and bound to the `enp0s8` network interface device.
|
||||
|
||||
#### Adjusting connections
|
||||
|
||||
The ncmli command makes it easy to adjust existing connections' parameters. Perhaps you want to switch one network interface from [Dynamic Host Configuration Protocol][12] (DHCP) to a static IP address.
|
||||
|
||||
Suppose you need a fixed IP address of `192.168.4.26` for your new connection. To achieve that, you need to issue two commands. One to set the IP address, and one to set the connection's method of obtaining an IP address to `manual`:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection modify ethernet-enp0s8 ipv4.address 192.168.4.26/24
|
||||
$ nmcli connection modify ethernet-enp0s8 ipv4.method manual
|
||||
```
|
||||
|
||||
Remember to specify the [subnet mask][13]. On this test network, it is `255.255.255.0`, or `/24` in [Classless Inter-Domain Routing][14] (CIDR).
|
||||
|
||||
For your changes to take effect, you need to _bounce_ the connection by stopping it and bringing it back up again. The first command takes the connection down and the second brings it back up:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli connection down ethernet-enp0s8
|
||||
Connection 'ethernet-enp0s8' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
|
||||
$ nmcli connection up ethernet-enp0s8
|
||||
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
|
||||
```
|
||||
|
||||
If you want to set the connection to use DHCP, use `auto` instead of `manual`:
|
||||
|
||||
|
||||
```
|
||||
`$ nmcli connection modify ethernet-enp0s8 ipv4.method auto`
|
||||
```
|
||||
|
||||
### Device management
|
||||
|
||||
The commands in the `device` section of the nmcli command allow you to manage the network interfaces installed on your computer.
|
||||
|
||||
#### Checking device status
|
||||
|
||||
To quickly check the status of all the network interfaces:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli device status
|
||||
DEVICE TYPE STATE CONNECTION
|
||||
enp0s3 ethernet connected Wired connection 1
|
||||
enp0s8 ethernet connected ethernet-enp0s8
|
||||
enp0s9 ethernet connected Wired connection 3
|
||||
lo loopback unmanaged --
|
||||
```
|
||||
|
||||
#### Showing device details
|
||||
|
||||
To examine the details of a network interface, use the `show` action from the `device` section. If you do not provide a device name, the details of all devices are retrieved and displayed. You can scroll and page up and down to review them.
|
||||
|
||||
Take a look at `enp0s8`, the device your new connection is using. Verify that the IP address in use is the address that you previously requested:
|
||||
|
||||
|
||||
```
|
||||
$ nmcli device show enp0s8
|
||||
GENERAL.DEVICE: enp0s8
|
||||
GENERAL.TYPE: ethernet
|
||||
GENERAL.HWADDR: 08:00:27:81:16:20
|
||||
GENERAL.MTU: 1500
|
||||
GENERAL.STATE: 100 (connected)
|
||||
GENERAL.CONNECTION: ethernet-enp0s8
|
||||
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/6
|
||||
WIRED-PROPERTIES.CARRIER: on
|
||||
IP4.ADDRESS[1]: 192.168.4.26/24
|
||||
IP4.GATEWAY: --
|
||||
IP4.ROUTE[1]: dst = 192.168.4.0/24, nh = 0.0.0.0, mt = 103
|
||||
IP6.ADDRESS[1]: fe80::6d70:90de:cb83:4491/64
|
||||
IP6.GATEWAY: --
|
||||
IP6.ROUTE[1]: dst = fe80::/64, nh = ::, mt = 103
|
||||
IP6.ROUTE[2]: dst = ff00::/8, nh = ::, mt = 256, table=255
|
||||
```
|
||||
|
||||
The response is quite detailed. Among other things, it shows:
|
||||
|
||||
* The **network interface name**, which in this case is `enp0s8`, which is assigned to it by [udev][15].
|
||||
* The **network connection type**, which in this case is a physical Ethernet connection.
|
||||
* The device's **[media access control][16] (MAC) address**, which identifies the device on the network.
|
||||
* The [maximum transmission unit][17], which is the size of the largest protocol data unit that can be transmitted in a single transaction. Anything larger than this is split into several packets.
|
||||
* This device is **currently connected**.
|
||||
* The **name of the connection** using this device is `ethernet-enp0s8`.
|
||||
* The **IP address of the connection** using this device. As requested, it is set to `192.168.4.26/24`.
|
||||
|
||||
|
||||
|
||||
The other information relates to the default routing and gateway settings that were applied to this connection, according to the network it is connected to.
|
||||
|
||||
#### nmcli's interactive editor
|
||||
|
||||
Although it is a command-line tool, nmcli includes an elementary interactive editor. The `edit` action will open the interactive editor on the connection you specify:
|
||||
|
||||
|
||||
```
|
||||
`$ nmcli connection edit ethernet-enp0s8`
|
||||
```
|
||||
|
||||
It displays a small amount of help text, then the nmcli command prompt:
|
||||
|
||||
|
||||
```
|
||||
===| nmcli interactive connection editor |===
|
||||
|
||||
Editing existing '802-3-ethernet' connection: 'ethernet-enp0s8'
|
||||
|
||||
Type 'help' or '?' for available commands.
|
||||
Type 'print' to show all the connection properties.
|
||||
Type 'describe [<setting>.<prop>]' for detailed property description.
|
||||
|
||||
You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, dcb, sriov, ethtool, match, ipv4, ipv6, tc, proxy
|
||||
nmcli>
|
||||
```
|
||||
|
||||
If you type `print` and hit **Enter**, nmcli will list all the properties associated with the connection. There are many properties. You can scroll up and down through the list:
|
||||
|
||||
|
||||
```
|
||||
===============================================================================
|
||||
Connection profile details (ethernet-enp0s8)
|
||||
===============================================================================
|
||||
connection.id: ethernet-enp0s8
|
||||
connection.uuid: 09d26960-25a0-440f-8b20-c684d7adc2f5
|
||||
connection.stable-id: --
|
||||
connection.type: 802-3-ethernet
|
||||
connection.interface-name: enp0s8
|
||||
connection.autoconnect: yes
|
||||
connection.autoconnect-priority: 0
|
||||
connection.autoconnect-retries: -1 (default)
|
||||
connection.multi-connect: 0 (default)
|
||||
connection.auth-retries: -1
|
||||
connection.timestamp: 1593967212
|
||||
connection.read-only: no
|
||||
connection.permissions: --
|
||||
connection.zone: --
|
||||
connection.master: --
|
||||
connection.slave-type: --
|
||||
connection.autoconnect-slaves: -1 (default)
|
||||
connection.secondaries: --
|
||||
```
|
||||
|
||||
Change your connection back to use DHCP. Type `goto ipv4` and hit **Enter**:
|
||||
|
||||
|
||||
```
|
||||
nmcli> goto ipv4
|
||||
You may edit the following properties: method, dns, dns-search, dns-options, dns-priority, addresses, gateway, routes, route-metric, route-table, routing-rules, ignore-auto-routes, ignore-auto-dns, dhcp-client-id, dhcp-iaid, dhcp-timeout, dhcp-send-hostname, dhcp-hostname, dhcp-fqdn, dhcp-hostname-flags, never-default, may-fail, dad-timeout
|
||||
nmcli ipv4>
|
||||
```
|
||||
|
||||
The property you want to change is `method`. Type `set method auto` and hit **Enter**:
|
||||
|
||||
|
||||
```
|
||||
nmcli ipv4> set method auto
|
||||
Do you also want to clear 'ipv4.addresses'? [yes]:
|
||||
```
|
||||
|
||||
If you want the connection to purge the static IP address, press **Enter**. To keep it, type `no` and hit **Enter**. You can keep it if you think you might use it again in the future. Even with a stored static IP address, if `method` is set to `auto`, it will use DHCP.
|
||||
|
||||
Type `save` to save your changes:
|
||||
|
||||
|
||||
```
|
||||
nmcli ipv4> save
|
||||
Connection 'ethernet-enp0s8' (09d26960-25a0-440f-8b20-c684d7adc2f5) successfully updated.
|
||||
nmcli ipv4>
|
||||
```
|
||||
|
||||
Type `quit` to exit the nmcli interactive editor. If you don't want to quit, type `back` to go back to the main level, and carry on using the editor.
|
||||
|
||||
### There's much more to nmcli
|
||||
|
||||
Browse around the interactive editor and see just how many settings there are and how many properties each setting has. The interactive editor is a neat tool, but for nifty one-liners or to use nmcli in scripts, you'll need the regular command-line version.
|
||||
|
||||
Now that you have the basics in hand, check out the nmcli [man page][2] to see what else it can offer.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/nmcli
|
||||
|
||||
作者:[Dave McKay][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/davemckay
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
|
||||
[2]: https://developer.gnome.org/NetworkManager/stable/nmcli.html
|
||||
[3]: https://en.wikipedia.org/wiki/Application_programming_interface
|
||||
[4]: https://man7.org/linux/man-pages/man8/ifconfig.8.html
|
||||
[5]: https://en.wikipedia.org/wiki/Command-line_interface
|
||||
[6]: https://en.wikipedia.org/wiki/Graphical_user_interface
|
||||
[7]: https://en.wikipedia.org/wiki/Data_link_layer
|
||||
[8]: https://en.wikipedia.org/wiki/IP_address
|
||||
[9]: https://en.wikipedia.org/wiki/OSI_model
|
||||
[10]: https://en.wikipedia.org/wiki/Ethernet
|
||||
[11]: https://en.wikipedia.org/wiki/Universally_unique_identifier
|
||||
[12]: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
|
||||
[13]: https://en.wikipedia.org/wiki/Subnetwork
|
||||
[14]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|
||||
[15]: https://en.wikipedia.org/wiki/Udev
|
||||
[16]: https://en.wikipedia.org/wiki/MAC_address
|
||||
[17]: https://en.wikipedia.org/wiki/Maximum_transmission_unit
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,190 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (6 ways to contribute to an open source alternative to Slack)
|
||||
[#]: via: (https://opensource.com/article/20/7/mattermost)
|
||||
[#]: author: (Jason Blais https://opensource.com/users/jasonblais)
|
||||
|
||||
6 ways to contribute to an open source alternative to Slack
|
||||
======
|
||||
Join thousands who have contributed code, translations, documentation,
|
||||
and more to Mattermost, an open source messaging platform.
|
||||
![Chat bubbles][1]
|
||||
|
||||
[Mattermost][2] is a messaging platform built in Go and React for DevOps teams. You can discuss topics in channels, private groups, or one-to-one with rich [Markdown][3] formatting and easily share code snippets with syntax highlighting in more than 50 programming languages. You can self-host or deploy on a private cloud to connect in-house systems with plugins, Slack-compatible integrations, and extensive API support. And you can collaborate with your team using the [Linux desktop application][4].
|
||||
|
||||
![Mattermost user interface on Linux Desktop App][5]
|
||||
|
||||
(Mattermost, [CC BY-SA 4.0][6])
|
||||
|
||||
The platform's open source nature offers three direct benefits over proprietary messaging platforms like Slack, Microsoft Teams, and Discord:
|
||||
|
||||
1. **No vendor lock-in:** With open source software, the code is available to everyone. Users, third-party vendors, and organizations have access to the code at all times, free of cost. Moreover, users get peace of mind with full control over their data, security, and infrastructure.
|
||||
2. **Stronger security:** With a large community of developers, security flaws are detected, fixed, and communicated quickly to all users, often before a flaw ships in the product. As highlighted in Red Hat's report on [The State of Enterprise Open Source][7], high-quality software and better security are top benefits of enterprise open source software.
|
||||
3. **Community-powered:** A growing community accelerates innovation by collaborating on problems, finding solutions, and creating new use cases, all leading to rapid feature development not possible with proprietary solutions. A thriving community is a force-multiplier for open source projects.
|
||||
|
||||
|
||||
|
||||
Mattermost is no different, and the community has been a major driving force behind the project. From the 100 most popular features to the 700,000-plus translations contributed to Mattermost, the open source community's impact on the project has been enormous. We've sent swag (such as a customized mug to all first-time contributors) to more than 1,000 contributors, and our [Contributor Wall of Fame][8] keeps growing every month.
|
||||
|
||||
If you are interested in contributing to open source, DevOps, or the Go and React technologies, consider joining the Mattermost community. We have [good first help-wanted issues][9] for new contributors, [contribution guidelines][10] to help get you started, and other resources at [developers.mattermost.com][11]. Moreover, you don't have to be a developer to contribute. You can help with translations, documentation, and more.
|
||||
|
||||
Interested in contributing to Mattermost? To make it easier to learn about all the ways to get involved with our community, we've gathered some information from our [Handbook][12], [Contribute page][13], [Security page][14], and more to help you get started.
|
||||
|
||||
### Platform
|
||||
|
||||
Build new features, improve existing ones, and fix bugs across the Mattermost platform. There are a variety of technologies and frameworks to choose from:
|
||||
|
||||
* **Server:** Written in Go, includes the API, data model, logging, and more
|
||||
* **Webapp:** Written in React (JavaScript library), includes all components and actions of the Mattermost user interface
|
||||
* **Mobile apps:** Written in React Native (JavaScript library), includes all components and actions of the mobile apps on iOS and Android
|
||||
* **Desktop apps:** Written on top of the Electron framework for Windows, macOS, and Linux clients
|
||||
* **Redux:** Written in JavaScript and TypeScript, includes storage, web utilities, and logic for webapp and React Native mobile clients
|
||||
|
||||
|
||||
|
||||
Contribute in four steps:
|
||||
|
||||
1. Sign up to our Mattermost community site and join the Contributors channel for questions.
|
||||
2. Set up your developer environment by following our instructions. If you're working on mobile apps, you'll also need a mobile dev environment.
|
||||
3. Choose a [help-wanted ticket][15] and comment to let people know you're working on it. If there's no ticket for what you want to work on, follow the contributions without tickets process.
|
||||
4. Start developing! Check out our [developer flow][16] for tips, and review our [checklist for pull requests][17] when your changes are ready. If it's your first contribution, there is a standard contributor license agreement ([CLA][18]) to sign.
|
||||
|
||||
|
||||
|
||||
### Integrations
|
||||
|
||||
Create a host of technologies to empower Mattermost to solve real-world problems. These include:
|
||||
|
||||
* **Self-hosted integration solutions:** Include connectivity and integration with third-party applications such as Jira, Jitsi, GitLab, Jenkins, and other tools
|
||||
* **SaaS-based integration solutions:** Include connectivity and integration with services like Twitter, Zendesk, Salesforce, and hundreds of other extensions with services like Zapier
|
||||
* **Federated experiences:** Include bridges with IRC, Slack, and other messaging applications through solutions like [Matterbridge][19]
|
||||
* **Programming solutions:** Include language-specific drivers and connectors to simplify the work of other developers
|
||||
* **Mattermost user-experience plugins:** Include server- and client-side plugins that enhance the native capabilities of a Mattermost server, such as voice, video, and screen sharing
|
||||
* **Custom user experiences:** Include integrations into Terminal like [Matterhorn][20] and [Pidgin][21] built off the same core [Mattermost APIs][22]
|
||||
|
||||
|
||||
|
||||
Contribute in four steps:
|
||||
|
||||
1. Sign up to our Mattermost community site and join the [Developer Toolkit channel][23] for questions.
|
||||
2. Visit the Mattermost Integrations Directory for a current list of open source integrations and projects to get ideas on how to get started.
|
||||
3. Start developing! Read our [integrations guide][24] for tips on how to integrate with the Mattermost server.
|
||||
4. Have you built something for Mattermost? We want to hear about it! [Let us know here][25].
|
||||
|
||||
|
||||
|
||||
### Localization
|
||||
|
||||
Today, Mattermost ships in 16 languages, and 26 other languages are in progress by hundreds of contributors. If you're interested in translating, here's how to get involved:
|
||||
|
||||
1. Sign up to our Mattermost community site and join the Localization channel for questions.
|
||||
2. Sign up to our translations server.
|
||||
3. Choose your language. If the language is already listed in the translations server, you can offer help by translating, reviewing, or making suggestions to existing strings. If it's not listed, ask in the Localization channel to set up your language.
|
||||
4. Start translating! Read our Localization documentation for more information on the translation rules and maintenance process.
|
||||
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
Write software and troubleshooting documentation used by thousands of people across the world. These include:
|
||||
|
||||
* **[Product documentation][26]:** Includes feature documentation for users and administrators, including troubleshooting notes and frequently asked questions
|
||||
* **[Developer documentation][11]:** Includes documentation for contributor and developer workflows, integrations, and extensions
|
||||
* **[API documentation][22]:** Includes documentation of the RESTful API used by the Mattermost platform
|
||||
|
||||
|
||||
|
||||
Contribute in three steps:
|
||||
|
||||
1. Sign up to our Mattermost community site and join the [Documentation channel][27] for questions.
|
||||
2. Choose a [ticket][15] and comment to let people know you're working on it. See the [process][28] for contributing.
|
||||
3. Review our [documentation guidelines][29] for tips on how to create effective docs. Note that if it is your first pull request, you will be asked to sign a standard [CLA][18].
|
||||
|
||||
|
||||
|
||||
### Peer-to-peer support and feedback
|
||||
|
||||
Not a developer but still want to contribute to open source? No problem! In addition to localization and documentation mentioned above, you can:
|
||||
|
||||
* **Report bugs:** Sign up to our Mattermost community site and join the [Bugs channel][30] for questions. Then, go to our [GitHub page][2] and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31].
|
||||
* **Test and find issues:** Go to our [community test server][32] or any of Mattermost's open source codebases to test and find issues. If you find a bug, go to our GitHub page and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31].
|
||||
* **Troubleshoot issues:** Sign up to our Mattermost community site and join the [Peer-to-Peer Help channel][33] to help answer questions. Follow questions in Mattermost [Forums][34] and GitHub Issues to help others.
|
||||
* **Suggest new features:** Sign up to our Mattermost community site and join the [Feature Proposals channel][35] to ask questions. Then, go to [Uservoice][36] to propose new features. Read our docs on [contributing feature proposals][37].
|
||||
* **Share feedback:** Sign up to our Mattermost community site and join the Peer-to-Peer Help channel to ask questions and share feedback about Mattermost.
|
||||
|
||||
|
||||
|
||||
### Security vulnerabilities
|
||||
|
||||
Safety and data security are top priorities for the Mattermost community. If you are a security researcher and discover a security vulnerability in our codebase, we appreciate your help in disclosing it to us in a responsible manner.
|
||||
|
||||
If the security bug you found is valid, the fix will be posted on our [Security Updates][38] page 30 days after its release, and you will be added to our [Security Research Hall of Fame][14]. If you'd like, we will publicly acknowledge your responsible disclosure. If not, you can remain anonymous.
|
||||
|
||||
Here's how to contribute through our [responsible disclosure policy][14]:
|
||||
|
||||
1. Contact us to report any security vulnerabilities found in any of Mattermost's open source codebases or any of our commercial offerings.
|
||||
2. We will let you know if your report is reproducible as an exploit and results in a change to a Mattermost product's codebase or documentation.
|
||||
|
||||
|
||||
|
||||
After a fix is made, we ask security researchers to wait 30 days after a release before announcing the specific details of a vulnerability and to provide Mattermost with a link to any such announcements.
|
||||
|
||||
### Getting help
|
||||
|
||||
If you have any questions or need help getting started, join our [Mattermost Contributors channel][39]. You can reach me at @jason.blais. See you there!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/mattermost
|
||||
|
||||
作者:[Jason Blais][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/jasonblais
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles)
|
||||
[2]: https://github.com/mattermost
|
||||
[3]: https://opensource.com/downloads/cheat-sheet-markdown
|
||||
[4]: https://mattermost.com/download/#mattermostApps
|
||||
[5]: https://opensource.com/sites/default/files/uploads/mattermostui.png (Mattermost user interface on Linux Desktop App)
|
||||
[6]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[7]: https://www.redhat.com/en/enterprise-open-source-report/2020
|
||||
[8]: https://developers.mattermost.com/contribute/team_contributions/
|
||||
[9]: https://github.com/mattermost/mattermost-server/issues?q=label%3A%22Help+Wanted%22+label%3A%22Good+First+Issue%22+label%3A%22Up+For+Grabs%22+is%3Aopen+is%3Aissue+
|
||||
[10]: https://developers.mattermost.com/contribute/getting-started/
|
||||
[11]: https://developers.mattermost.com/
|
||||
[12]: https://handbook.mattermost.com/contributors/contributors/community
|
||||
[13]: https://mattermost.com/contribute/
|
||||
[14]: https://mattermost.com/security-vulnerability-report/
|
||||
[15]: https://github.com/mattermost/mattermost-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22Up+For+Grabs%22
|
||||
[16]: https://developers.mattermost.com/contribute/server/developer-workflow/
|
||||
[17]: https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
|
||||
[18]: https://www.mattermost.org/mattermost-contributor-agreement/
|
||||
[19]: https://github.com/42wim/matterbridge
|
||||
[20]: https://github.com/matterhorn-chat/matterhorn
|
||||
[21]: https://github.com/EionRobb/purple-mattermost/
|
||||
[22]: https://api.mattermost.com/
|
||||
[23]: https://community.mattermost.com/core/channels/developer-toolkit
|
||||
[24]: https://developers.mattermost.com/integrate/getting-started/
|
||||
[25]: https://www.mattermost.org/share-your-mattermost-projects/
|
||||
[26]: http://docs.mattermost.com/
|
||||
[27]: https://community.mattermost.com/core/channels/documentation
|
||||
[28]: https://github.com/mattermost/docs#contributing
|
||||
[29]: https://handbook.mattermost.com/operations/operations/publishing/publishing-guidelines/voice-tone-and-writing-style-guidelines
|
||||
[30]: https://community.mattermost.com/core/channels/bugs
|
||||
[31]: https://www.mattermost.org/filing-issues/
|
||||
[32]: https://rc.test.mattermost.com/
|
||||
[33]: https://community.mattermost.com/core/channels/peer-to-peer-help
|
||||
[34]: https://forum.mattermost.org/
|
||||
[35]: https://community.mattermost.com/core/channels/feature-ideas
|
||||
[36]: https://mattermost.uservoice.com/forums/306457-general
|
||||
[37]: https://www.mattermost.org/feature-ideas/
|
||||
[38]: https://mattermost.com/security-updates/
|
||||
[39]: https://community-release.mattermost.com/core/channels/tickets
|
182
sources/tech/20200722 SCP user-s migration guide to rsync.md
Normal file
182
sources/tech/20200722 SCP user-s migration guide to rsync.md
Normal file
@ -0,0 +1,182 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (SCP user’s migration guide to rsync)
|
||||
[#]: via: (https://fedoramagazine.org/scp-users-migration-guide-to-rsync/)
|
||||
[#]: author: (chasinglogic https://fedoramagazine.org/author/chasinglogic/)
|
||||
|
||||
SCP user’s migration guide to rsync
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
As part of the [8.0 pre-release announcement,][2] the OpenSSH project stated that they consider the scp protocol outdated, inflexible, and not readily fixed. They then go on to recommend the use of sftp or rsync for file transfer instead.
|
||||
|
||||
Many users grew up on the _scp_ command, however, and so are not familiar with rsync. Additionally, rsync can do much more than just copy files, which can give a beginner the impression that it’s complicated and opaque. Especially when broadly the scp flags map directly to the cp flags while the rsync flags do not.
|
||||
|
||||
This article will provide an introduction and transition guide for anyone familiar with scp. Let’s jump into the most common scenarios: Copying Files and Copying Directories.
|
||||
|
||||
### Copying files
|
||||
|
||||
For copying a single file, the scp and rsync commands are effectively equivalent. Let’s say you need to ship _foo.txt_ to your home directory on a server named _server._
|
||||
|
||||
```
|
||||
$ scp foo.txt me@server:/home/me/
|
||||
```
|
||||
|
||||
The equivalent rsync command requires only that you type rsync instead of scp:
|
||||
|
||||
```
|
||||
$ rsync foo.txt me@server:/home/me/
|
||||
```
|
||||
|
||||
### Copying directories
|
||||
|
||||
For copying directories, things do diverge quite a bit and probably explains why rsync is seen as more complex than scp. If you want to copy the directory _bar_ to _server_ the corresponding scp command looks exactly like the cp command except for specifying ssh information:
|
||||
|
||||
```
|
||||
$ scp -r bar/ me@server:/home/me/
|
||||
```
|
||||
|
||||
With rsync, there are more considerations, as it’s a more powerful tool. First, let’s look at the simplest form:
|
||||
|
||||
```
|
||||
$ rsync -r bar/ me@server:/home/me/
|
||||
```
|
||||
|
||||
Looks simple right? For the simple case of a directory that contains only directories and regular files, this will work. However, rsync cares a lot about sending files exactly as they are on the host system. Let’s create a slightly more complex, but not uncommon, example.
|
||||
|
||||
```
|
||||
# Create a multi-level directory structure
|
||||
$ mkdir -p bar/baz
|
||||
# Create a file at the root directory
|
||||
$ touch bar/foo.txt
|
||||
# Now create a symlink which points back up to this file
|
||||
$ cd bar/baz
|
||||
$ ln -s ../foo.txt link.txt
|
||||
# Return to our original location
|
||||
$ cd -
|
||||
```
|
||||
|
||||
We now have a directory tree that looks like the following:
|
||||
|
||||
```
|
||||
bar
|
||||
├── baz
|
||||
│ └── link.txt -> ../foo.txt
|
||||
└── foo.txt
|
||||
|
||||
1 directory, 2 files
|
||||
```
|
||||
|
||||
If we try the commands from above to copy bar, we’ll notice very different (and surprising) results. First, let’s give scp a go:
|
||||
|
||||
```
|
||||
$ scp -r bar/ me@server:/home/me/
|
||||
```
|
||||
|
||||
If you ssh into your server and look at the directory tree of bar you’ll notice an important and subtle difference from your host system:
|
||||
|
||||
```
|
||||
bar
|
||||
├── baz
|
||||
│ └── link.txt
|
||||
└── foo.txt
|
||||
|
||||
1 directory, 2 files
|
||||
```
|
||||
|
||||
Note that _link.txt_ is no longer a symlink. It is now a full-blown copy of _foo.txt_. This might be surprising behavior if you’re used to _cp_. If you did try to copy the _bar_ directory using _cp -r_, you would get a new directory with the exact symlinks that _bar_ had. Now if we try the same rsync command from before we’ll get a warning:
|
||||
|
||||
```
|
||||
$ rsync -r bar/ me@server:/home/me/
|
||||
skipping non-regular file "bar/baz/link.txt"
|
||||
```
|
||||
|
||||
Rsync has warned us that it found a non-regular file and is skipping it. Because you didn’t tell it to copy symlinks, it’s ignoring them. Rsync has an extensive manual section titled “SYMBOLIC LINKS” that explains all of the possible behavior options available to you. For our example, we need to add the –links flag.
|
||||
|
||||
```
|
||||
$ rsync -r --links bar/ me@server:/home/me/
|
||||
```
|
||||
|
||||
On the remote server we see that the symlink was copied over as a symlink. Note that this is different from how scp copied the symlink.
|
||||
|
||||
```
|
||||
bar/
|
||||
├── baz
|
||||
│ └── link.txt -> ../foo.txt
|
||||
└── foo.txt
|
||||
|
||||
1 directory, 2 files
|
||||
```
|
||||
|
||||
To save some typing and take advantage of more file-preserving options, use the –archive (-a for short) flag whenever copying a directory. The archive flag will do what most people expect as it enables recursive copy, symlink copy, and many other options.
|
||||
|
||||
```
|
||||
$ rsync -a bar/ me@server:/home/me/
|
||||
```
|
||||
|
||||
The rsync man page has in-depth explanations of what the archive flag enables if you’re curious.
|
||||
|
||||
### Caveats
|
||||
|
||||
There is one caveat, however, to using rsync. It’s much easier to specify a non-standard ssh port with scp than with rsync. If _server_ was using port 8022 SSH connections, for instance, then those commands would look like this:
|
||||
|
||||
```
|
||||
$ scp -P 8022 foo.txt me@server:/home/me/
|
||||
```
|
||||
|
||||
With rsync, you have to specify the “remote shell” command to use. This defaults to _ssh_. You do so using the **-e flag.
|
||||
|
||||
```
|
||||
$ rsync -e 'ssh -p 8022' foo.txt me@server:/home/me/
|
||||
```
|
||||
|
||||
Rsync does use your ssh config; however, so if you are connecting to this server frequently, you can add the following snippet to your _~/.ssh/config_ file. Then you no longer need to specify the port for the rsync or ssh commands!
|
||||
|
||||
```
|
||||
Host server
|
||||
Port 8022
|
||||
```
|
||||
|
||||
Alternatively, if every server you connect to runs on the same non-standard port, you can configure the _RSYNC_RSH_ environment variable.
|
||||
|
||||
### Why else should you switch to rsync?
|
||||
|
||||
Now that we’ve covered the everyday use cases and caveats for switching from scp to rsync, let’s take some time to explore why you probably want to use rsync on its own merits. Many people have made the switch to rsync long before now on these merits alone.
|
||||
|
||||
#### In-flight compression
|
||||
|
||||
If you have a slow or otherwise limited network connection between you and your server, rsync can spend more CPU cycles to save network bandwidth. It does this by compressing data before sending it. Compression can be enabled with the -z flag.
|
||||
|
||||
#### Delta transfers
|
||||
|
||||
Rsync also only copies a file if the target file is different than the source file. This works recursively through directories. For instance, if you took our final bar example above and re-ran that rsync command multiple times, it would do no work after the initial transfer. Using rsync even for local copies is worth it if you know you will repeat them, such as backing up to a USB drive, for this feature alone as it can save a lot of time with large data sets.
|
||||
|
||||
#### Syncing
|
||||
|
||||
As the name implies, rsync can do more than just copy data. So far, we’ve only demonstrated how to copy files with rsync. If you instead want rsync to make the target directory look like your source directory, you can add the –delete flag to rsync. The delete flag makes it so rsync will copy files from the source directory which don’t exist on the target directory. Then it will remove files on the target directory which do not exist in the source directory. The result is the target directory is identical to the source directory. By contrast, scp will only ever add files to the target directory.
|
||||
|
||||
### Conclusion
|
||||
|
||||
For simple use cases, rsync is not significantly more complicated than the venerable scp tool. The only significant difference being the use of -a instead of -r for recursive copying of directories. However, as we saw rsync’s -a flag behaves more like cp’s -r flag than scp’s -r flag does.
|
||||
|
||||
Hopefully, with these new commands, you can speed up your file transfer workflow!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/scp-users-migration-guide-to-rsync/
|
||||
|
||||
作者:[chasinglogic][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://fedoramagazine.org/author/chasinglogic/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/scp-rsync-816x345.png
|
||||
[2]: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html
|
@ -0,0 +1,156 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The feature that makes D my favorite programming language)
|
||||
[#]: via: (https://opensource.com/article/20/7/d-programming)
|
||||
[#]: author: (Lawrence Aberba https://opensource.com/users/aberba)
|
||||
|
||||
The feature that makes D my favorite programming language
|
||||
======
|
||||
UFCS gives you the power to compose reusable code that has a natural
|
||||
flow without sacrificing convenience.
|
||||
![Coding on a computer][1]
|
||||
|
||||
Back in 2017, I wrote about why the [D programming language is a great choice for development][2]. But there is one outstanding feature in D I didn't expand enough on: the [Universal Function Call Syntax][3] (UFCS). UFCS is a [syntactic sugar][4] in D that enables chaining any regular function on a type (string, number, boolean, etc.) like its member function of that type.
|
||||
|
||||
If you don't already have D installed, [install a D compiler][5] so you can [run the D code][6] in this article yourself.
|
||||
|
||||
Consider this example code:
|
||||
|
||||
|
||||
```
|
||||
// file: ufcs_demo.d
|
||||
|
||||
module ufcs_demo;
|
||||
|
||||
import std.stdio : writeln;
|
||||
|
||||
int[] evenNumbers(int[] numbers)
|
||||
{
|
||||
import std.array : array;
|
||||
import std.algorithm : filter;
|
||||
|
||||
return numbers.filter!(n => n % 2 == 0).array;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
writeln(evenNumbers([1, 2, 3, 4]));
|
||||
}
|
||||
```
|
||||
|
||||
Compile this with your favorite D compiler to see what this simple example application does:
|
||||
|
||||
|
||||
```
|
||||
$ dmd ufcs_demo.d
|
||||
$ ./ufcs_demo
|
||||
[2, 4]
|
||||
```
|
||||
|
||||
But with UFCS as a built-in feature of D, you can also write your code in a natural way:
|
||||
|
||||
|
||||
```
|
||||
...
|
||||
writeln([1, 2, 3, 4].evenNumbers());
|
||||
...
|
||||
```
|
||||
|
||||
or completely remove the now-redundant parenthesis to make it feel like `evenNumbers` is a property:
|
||||
|
||||
|
||||
```
|
||||
...
|
||||
writeln([1, 2, 3, 4].evenNumbers); // prints 2, 4
|
||||
...
|
||||
```
|
||||
|
||||
So the complete code now becomes:
|
||||
|
||||
|
||||
```
|
||||
// file: ufcs_demo.d
|
||||
|
||||
module ufcs_demo;
|
||||
|
||||
import std.stdio : writeln;
|
||||
|
||||
int[] evenNumbers(int[] numbers)
|
||||
{
|
||||
import std.array : array;
|
||||
import std.algorithm : filter;
|
||||
|
||||
return numbers.filter!(n => n % 2 == 0).array;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
writeln([1, 2, 3, 4].evenNumbers);
|
||||
}
|
||||
```
|
||||
|
||||
Compile it with your favorite D compiler and try it out. As expected, it produces the same output:
|
||||
|
||||
|
||||
```
|
||||
$ dmd ufcs_demo.d
|
||||
$ ./ufcs_demo
|
||||
[2, 4]
|
||||
```
|
||||
|
||||
During compilation, the compiler _automatically_ places the array as the first argument to the function. This is a regular pattern that makes using D such a joy, so it very much feels the same as you naturally think about your code. The result is functional-style programming.
|
||||
|
||||
You can probably guess what this prints:
|
||||
|
||||
|
||||
```
|
||||
//file: cool.d
|
||||
import std.stdio : writeln;
|
||||
import std.uni : asLowerCase, asCapitalized;
|
||||
|
||||
void main()
|
||||
{
|
||||
string mySentence = "D IS COOL";
|
||||
writeln(mySentence.asLowerCase.asCapitalized);
|
||||
}
|
||||
```
|
||||
|
||||
But just to confirm:
|
||||
|
||||
|
||||
```
|
||||
$ dmd cool.d
|
||||
$ ./cool
|
||||
D is cool
|
||||
```
|
||||
|
||||
Combined with [other D features][7], UFCS gives you the power to compose reusable code that has a natural flow to it without sacrificing convenience.
|
||||
|
||||
### Time to try D
|
||||
|
||||
As I've written before, D is a great language for development. It's easy to install from [the D download page][8], so download the compiler, take a look at the examples, and experience D for yourself.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/d-programming
|
||||
|
||||
作者:[Lawrence Aberba][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/aberba
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://opensource.com/article/17/5/d-open-source-software-development
|
||||
[3]: http://ddili.org/ders/d.en/ufcs.html
|
||||
[4]: https://en.wikipedia.org/wiki/Syntactic_sugar
|
||||
[5]: https://tour.dlang.org/tour/en/welcome/install-d-locally
|
||||
[6]: https://tour.dlang.org/tour/en/welcome/run-d-program-locally
|
||||
[7]: https://dlang.org/comparison.html
|
||||
[8]: https://dlang.org/download.html
|
@ -0,0 +1,109 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!)
|
||||
[#]: via: (https://itsfoss.com/ubuntu-19-10-end-of-life/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Ubuntu 19.10 产品寿命结束。尽快升级到 Ubuntu 20.04!
|
||||
======
|
||||
|
||||
_**Ubuntu 19.10 Eoan Ermine 产品寿命结束。这意味着它不会获得任何安全或维护更新。继续使用 Ubuntu 19.10 将很危险,因为你的系统将来可能会因为缺少安全更新而变得脆弱。你应该升级到 Ubuntu 20.04。**_
|
||||
|
||||
[2019 年 10 月发布的 Ubuntu 19.10][1] 带来了一些为 [Ubuntu 20.04][2] 做准备的新功能。
|
||||
|
||||
作为非 LTS 版本,它有 9 个月的寿命。截至 2020 年 7 月 17 日,它的生命周期结束,并不会再收到任何更新。
|
||||
|
||||
### Ubuntu 19.10 生命周期结束
|
||||
|
||||
![][3]
|
||||
|
||||
我之前已经[详细解释了 Ubuntu 的发布周期和产品寿命结束][4]。如果此后继续使用 Ubuntu 19.10,我会重申这对你和你的系统意味着什么。
|
||||
|
||||
[软件通常有预定义的生命周期][5],一旦软件版本到达生命周期结束,它将停止获取更新和支持。
|
||||
|
||||
生命周期结束后,Ubuntu 19.10 不再会从 Ubuntu 获得系统更新、安全更新或应用更新。
|
||||
|
||||
如果你继续使用它,你的系统可能会成为潜在的网络攻击的受害者,因为黑客往往会利用脆弱的系统。
|
||||
|
||||
之后,你可能无法使用 apt 命令安装新软件,因为 Ubuntu 将归档 19.10 的仓库。
|
||||
|
||||
### 如果你使用的是 Ubuntu 19.10,该怎么办?
|
||||
|
||||
首先,[检查你使用的 Ubuntu 版本][6]。这可以在终端中输入此命令完成:
|
||||
|
||||
```
|
||||
lsb_release -a
|
||||
```
|
||||
|
||||
```
|
||||
No LSB modules are available.
|
||||
Distributor ID: Ubuntu
|
||||
Description: Ubuntu 19.10
|
||||
Release: 19.10
|
||||
Codename: Eoan
|
||||
```
|
||||
|
||||
如果你看到 Ubuntu 19.10,你应该做以下两项工作之一:
|
||||
|
||||
* 如果你有良好,稳定的互联网连接,从 Ubuntu 19.10 升级到 20.04。你的个人文件和大多数软件保持不变。
|
||||
* 如果你有着缓慢或不稳定的互联网连接,你应该[全新安装的 Ubuntu 20.04][7]。你的文件和磁盘上的所有内容将被擦除,因此你应该在外部磁盘上备份重要数据。
|
||||
|
||||
|
||||
#### 如何从 19.10 升级到 20.04 (如果你有良好的互联网连接)
|
||||
|
||||
我之前已经详细讨论了 Ubuntu 版本升级。我会在这里快速说下步骤。
|
||||
|
||||
首先,请确保在“软件和更新”中已设置接收新版本通知。
|
||||
|
||||
进入“软件和更新”:
|
||||
|
||||
![][8]
|
||||
|
||||
进入“更新”选项卡,将“通知我新的 Ubuntu 版本”设置为“对于任何新版本”:
|
||||
|
||||
![][9]
|
||||
|
||||
现在,安装所有挂起的更新。
|
||||
|
||||
现在,再次运行更新管理器工具。你应该可以选择升级到 Ubuntu 20.04。点击升级按钮并按照说明操作。
|
||||
|
||||
它会安装大约 1.2GB 的软件包。这就是为什么你需要一个良好和稳定的互联网连接。
|
||||
|
||||
![][10]
|
||||
|
||||
这样升级会保持你的家目录。不过,仍建议在外部磁盘进行备份。
|
||||
|
||||
### 你仍在使用 Ubuntu 19.10 吗?
|
||||
|
||||
如果你仍在使用 Ubuntu 19.10,那么必须为升级或全新安装做好准备。你不能忽视它。
|
||||
|
||||
如果你不喜欢这样的频繁版本升级,你应该使用支持五年的 LTS 版本。当前的 LTS 版本是 Ubuntu 20.04,你无论如何都要升级到它。
|
||||
|
||||
你是否正在使用 Ubuntu 19.10?你是否已升级到 Ubuntu 20.04?如果你面临任何问题,或者如果你有任何问题,请让我知道。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-19-10-end-of-life/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-19-10-released/
|
||||
[2]: https://itsfoss.com/download-ubuntu-20-04/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/ubuntu-19-10-end-of-life.jpg?ssl=1
|
||||
[4]: https://itsfoss.com/end-of-life-ubuntu/
|
||||
[5]: https://en.wikipedia.org/wiki/Systems_development_life_cycle
|
||||
[6]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||
[7]: https://itsfoss.com/install-ubuntu/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/03/upgrade-ubuntu-1.jpeg?ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/11/software-update-any-new-version.jpeg?resize=800%2C378&ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-focal.jpg?ssl=1
|
Loading…
Reference in New Issue
Block a user