Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-01-07 09:04:26 +08:00
commit 06b744700f
12 changed files with 706 additions and 409 deletions

View File

@ -43,9 +43,9 @@ $ sudo useradd sonny
| 文件 | 描述 | 域 (加粗的表示由 useradd 命令设置) |
| ------ | ------------------------------------ | ------------------------------------------------------------ |
| `passwd` | 存储用户账号信息 | 用户名:未使用:UID:GID:备注:家目录:shell |
| `shadow` | 存储用户账号的安全信息 | 用户名:加密密码:上次修改时间:最短使用天数:最长使用天数间:修改前警示天数:过期后宽限时间:未使用 |
| `group` | 存储组信息 | 组名:未使用:GID:成员列表 |
| `passwd` | 存储用户账号信息 | **用户名**:未使用:**UID**:**GID**:**备注**:**家目录**:**shell** |
| `shadow` | 存储用户账号的安全信息 | **用户名**:加密密码:上次修改时间:最短使用天数:最长使用天数间:**修改前警示天数**:**过期后宽限时间**:未使用 |
| `group` | 存储组信息 | **组名**:未使用:**GID**:**成员列表** |
### 自定义处理

View File

@ -0,0 +1,69 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Open Source Supply Chain: A Matter of Trust)
[#]: via: (https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/)
[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/)
Open Source Supply Chain: A Matter of Trust
======
[![][1]][2]
_**Co-authored by Curtis Franklin, Jr**_
Open source software is often considered safer and more secure than proprietary software because users can, if they want, compile the software from the source code. They know the source of the code running in their environment.  Every component that they are running in their environment can be audited and the developer held accountable.  
However, users and vendors are moving away from complexity that comes with total control and embracing convenience and ease of use.
“I am often taken aback when I see a talk around security and privacy and then the presenter runs the docker run command to install and run some random binary downloaded from the internet,” said [Dirk Hohndel, Vice-President and Chief Open Source Officer at VMware.][3] “Those two things seem to be a little bit at odds with each other.”
The software supply chain — the process that takes an application from coding through packaging and distribution to its ultimate user — is complicated. If done wrong, it could be potentially risky, especially for open source software.  A malevolent player can get access to the backend and start inserting any random binary code onto a users system without that users knowledge or control.
Its not a problem specific to the cloud-native world. It can be seen in modern app development environments, including JavaScript, npm, PyPI, RubyGems, and so on.  Even Homebrew on Mac used to be provided through source code that a user would compile themselves. 
“Today, you just download the binary and install it, hoping that its built from the same source code that you have access to,” said Hohndel. “As an industry, we need to pay more attention to our supply chain.  Its something that is extremely important to me and that Im trying to get more people interested in it.” 
Its not simply a binary versus source code equation, though. There are huge advantages to just running a binary instead of having to build everything from sources.   It allows developers to be more flexible and more responsive in their turnaround. They can cycle very quickly through new development and product releases by reusing some binaries.
“It would be nice if there was a way to sign these binaries and have an on-the-fly verification mechanism so users know they can trust these,” said Hohndel.
Linux distributions have solved this problem as the distributions act as gatekeepers who check the integrity of packages that go into supported repositories. 
“Packages offered through distributions like Debian are signed with a key. It takes a lot of work to ensure that this is really the software that should be in the distribution. They have solved the supply chain problem,” said Hohndel.
But even on Linux distribution, people want to simplify things and trade correctness and security for speed. There are now projects like AppImage, Snap and Flatpack that have adopted the binary route, bringing the trust issue to Linux distributions. Its the same problem of docker containers all over again.
“The ideal solution would be to find a way for us as a community to devise a system of trust which ensures that if a binary was signed with a key that is in the network of trust, it can be trusted and provides us with the ability to reliably go back to the sources and do an audit,” suggested Hohndel.
However, all this additional steps incur costs that most projects are either unwilling or unable to afford. Some projects are trying to find ways around the problem. NPM, for example, has begun to encourage those submitting packages to properly authenticate and secure their accounts to improve trustworthiness on the platform. 
**Open Source Community Is Good At Solving Problems**
Hohndel is involved with many efforts to solve the open source supply chain problem and is spreading awareness about it. Last year, [VMware acquired Bitnami,][4] which is a great place for curating open source applications that are signed by VMware. 
“We are talking with upstream open source communities in various ecosystems to raise awareness about it. We are also discussing technical solutions that will make it easier for these communities to solve the underlying problems,” said Hohndel.
The open source community has historically been diligent at ensuring software quality, including the mechanisms for security and privacy. Still, Hohndel says, “The biggest concern that I have is that, in the excitement about the next new thing, we often ignore the underlying engineering discipline that we really need.”
Ultimately, Hohndel feels that answer will come from the open source community itself. “Open source is an engineering methodology and its a social experiment. Open source is all about people trusting each other, working with each other, collaborating across borders, between companies, amongst competitors in ways that we didnt do before,” he explains.
--------------------------------------------------------------------------------
via: https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/
作者:[Swapnil Bhartiya][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/author/swapnil/
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920-1068x801.jpg (hand-1137978_1920)
[2]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920.jpg
[3]: https://www.swapnilbhartiya.com/open-source-leaders-dirk-hohndel-brings-open-source-to-vmware/
[4]: https://techcrunch.com/2019/05/15/vmware-acquires-bitnami-to-deliver-packaged-applications-anywhere/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,185 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (7 maker gifts for kids and teens)
[#]: via: (https://opensource.com/article/19/11/maker-gifts-kids)
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
7 maker gifts for kids and teens
======
Make your holiday gift shopping easy with this guide to gifts sure to
spark creativity and innovation in babies, kids, tweens, teens, and
beyond.
![Gift box opens with colors coming out][1]
Struggling with what gifts to give the young person in your life this holiday season? Here are my top picks for open source presents that will spark creativity and inspire for years to come.
### Hummingbird Robotics Kit
![Hummingbird Robotics Kit][2]
**Ages**: 8 to adult
**What it is:** The [Hummingbird Robotics Kit][3] is a complete robotics kit with a microcontroller, motors, LEDs, and sensors. The robot brain has special ports that little hands can easily attach robot components to. The Hummingbird kits don't come with a body, empowering users to create their own.
**Why I love it:** The Hummingbird works with multiple programming languages—from visual (BirdBlox, MakeCode, Snap) to text (Python and Java)— making it scalable as users' coding skills increase. All the components are exactly as you'd find them at an electronics store, not obscured by plastic like other robot kits. This demystifies the inner workings of robots and makes it easy to source more parts if needed.
Because there is no set project, the Hummingbird is the perfect robot for creativity.
The Hummingbird Bit has open source software and firmware. It works on Linux, Windows, Mac, Chromebook, Android, and iOS.
**Cost:** Starts at US$ 99.
### Makey Makey Classic
![Makey Makey Classic][4]
**Ages:** 6 to adult
**What it is:** [Makey Makey Classic][5] turns any conductive object, from marshmallows to a friend, into a computer key.
You use alligator clips to connect the Makey Makey to the conductive object of your choice. Then, you close the circuit between the ground connection and any trigger key by touching both conductive objects at the same time. The Makey Makey is a good way to safely explore electricity at home while creating interesting ways to interact with your computer.
**Why I love it:** Makey Makey can be paired with video games made in Scratch to create unique controllers that further immerse users in the game. The possibilities are endless, from instruments made of toilet rolls and foil to interactive art and stories. It works on Linux, Windows, and Mac computers with a USB port.
**Cost:** US$ 49.95
### Arduino Uno
![Arduino Uno][6]
**Ages**: 10 to adult
**What it is:** Arduinos are microcontrollers that can be purchased with or without an electronics kit, and they come in many different flavors, though I like the [Arduino Uno][7] the best. Additional components, such as LEDs, motors, and sensors can be purchased as needed from any electronics shop.
**Why I love it:** The Arduino Uno is well-documented, so it's easy for makers to find tutorials online. The Arduino can bring a wide variety of electronic projects to life, from simple to complex. The Arduino features open source firmware and hardware. It works on Linux, Mac, and Windows.
**Cost:** Starts at US$ 22.00 for the board. The overall cost varies depending on projects and skill level.
### DIY maker kit
![A maker kit assembled in a quick trip to the hardware store][8]
**Ages**: 8 to adult
**What it is:** Many of today's makers, creators, and programmers started out tinkering with objects that happened to be lying around. You can create an awesome maker kit for the young person in your life with a quick trip to the nearest electronics store. Here's what's in my maker kit:
* Eye goggles
* Hammer
* Nails and screws
* Scraps of wood
* Screwdrivers
* Wire
* LEDs
* Piezo buzzer
* Motors
* AA battery pack with leads
* Wire cutters
* Cardboard
* Masking tape
* Scrap fabric
* Buttons
* Thread
* Needles
* Zippers
* Hooks
* A cool tackle box to store everything in
**Why I love it: **Remember when you were a kid and your parents brought home an empty cardboard box that you turned into a spaceship or a house or a supercomputer? That's what a DIY maker kit can be for older kids.
Raw components empower kids to experiment and use their imaginations. A DIY maker kit can be completely customized for the recipient. Be sure to throw in some components the giftee may have never thought to create with, like giving an avid sewer some LEDs or a woodworker fabric.
**Cost:** Variable
### Heuristic play basket
![Heuristic play kit][9]
**Ages:** 8 months to 5 years
**What it is:** Heuristic play baskets are filled with interesting objects made from natural, non-toxic materials for infants and toddlers to explore using their five senses. It's open-ended, self-directed play at its best. The idea is that an adult will supervise (but not direct) a child's use of the basket and its items for a half-hour, then put the basket away until the next time.
It's easy to create a lovely play basket with common household objects. Try to include items with varying textures, sounds, smells, shapes, and weights. Here are some ideas to get you started.
* Colander or ridged wicker basket to hold everything
* Wooden spoon
* Metal whisks and spoons
* Scrubbing brush
* Sponge
* Small egg carton
* Cardboard tubes
* Small rolling pin
* Textured washcloth
* Rocks
* Handbells
* Crochet doily
* Small tin with a lid
Play baskets should not include anything easily breakable or small enough to fit inside a paper towel roll, as these are choking hazards, and all objects should be cleaned thoroughly before being given to a child.
**Why I love it:** Play baskets are fantastic for sensory development and helping young children ask questions and explore the world around them. This is an important part of developing a maker mindset!
It's easy to obtain suitable items for a play basket; you probably already have many interesting objects in your home or at your nearest second-hand store. Toddlers will use their play baskets differently than infants. These objects will grow with children as they begin to mimic adult life and tell stories through their play.
**Cost:** Variable
### Hello Ruby
![Hello Ruby book cover][10]
**Ages**: 58
**What it is:** _[Hello Ruby][11]: Adventures in Coding_ is an illustrated book by Linda Liukas that introduces children to programming concepts through a fun narrative about a girl who encounters problems and friends, each of which represents code. Liukas' other _Hello Ruby_ books are subtitled _Expedition to the Internet_ and _Journey Inside the Computer_, and _Adventures in Coding_ has been published in more than 20 languages.
**Why I love it:** The author accompanies the book with a number of free, fun, and unplugged activities that can be downloaded and printed out from the Hello Ruby website. These activities teach coding concepts and also touch on artistic expression, communication, and even time management.
**Cost:** List price for the hardcover book is US$ 17.99, but you may find it at a lower price through local or online booksellers.
### Girls Who Code: Learn to Code and Change the World
![Girls Who Code book cover][12]
**Ages**: 10 to adult
**What it is:** Written by Reshma Saujani, the founder of Girls Who Code, _[Girls Who Code: Learn to Code and Change the World][13]_ gives practical information about the tech world for young girls (and boys). It covers a wide variety of topics, including coding languages, use-cases, terminology and vocabulary, career options, and profiles and interviews with people in the tech industry.
**Why I love it:** This book tells the story of tech in ways even most websites meant for adults miss out on. Technology encompasses so many disciplines, and it's important for young people to understand they can use it to solve real-world problems and make a difference.
**Cost:** List price for the hardcover book is US$ 17.99 and US$ 10.99 for the paperback, but you may find it at a lower price through local or online booksellers.
I can see the brightness of curiosity in my six year old niece Shuchi's eyes when she explores a...
Scratch is a free educational programming language for kids, available in 50 different languages...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/maker-gifts-kids
作者:[Jess Weichler][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/cyanide-cupcake
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out)
[2]: https://opensource.com/sites/default/files/uploads/hummingbird.png (Hummingbird Robotics Kit)
[3]: https://www.birdbraintechnologies.com/hummingbirdbit/
[4]: https://opensource.com/sites/default/files/uploads/makeymakey2.jpg (Makey Makey Classic)
[5]: https://makeymakey.com/
[6]: https://opensource.com/sites/default/files/uploads/arduinouno.jpg (Arduino Uno)
[7]: https://www.arduino.cc/
[8]: https://opensource.com/sites/default/files/makerbox-makerkit.jpg (A maker kit assembled in a quick trip to the hardware store)
[9]: https://opensource.com/sites/default/files/makerbox-sensorykit.jpg (Heuristic play kit)
[10]: https://opensource.com/sites/default/files/uploads/helloruby2.jpg (Hello Ruby book cover)
[11]: https://www.helloruby.com/
[12]: https://opensource.com/sites/default/files/uploads/girlswhocodebook.jpg (Girls Who Code book cover)
[13]: https://girlswhocode.com/book/girls-code-learn-code-change-world/

View File

@ -1,116 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (App Highlight: Open Source Disk Partitioning Tool GParted)
[#]: via: (https://itsfoss.com/gparted/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
App Highlight: Open Source Disk Partitioning Tool GParted
======
_**Brief: GParted is an incredibly popular and free partition editor available for Linux distros. Here, we take a look at what it offers in brief.**_
### GParted: A Free & Open-Source GUI-based Partition Manager
![][1]
GParted is undoubtedly one of the [best partition managers for Linux][2] out there. The user interface is very simple and gets the job done.
In some cases, you end up using [GParted][3] to fix or format your USB drive as well. I had a [USB disk which I couldnt format in Ubuntu][4] using the “Disks” app this is where GParted came to the rescue.
So, it is a quite useful tool with a lot of good features. Let me highlight them for you.
Warning!
Playing with disk partitioning is a risky task. Dont do it unless its absolutely necessary. Or else, you might just end up wiping the entire disk.
### Features of GParted
You can do a lot of things with GParted, ranging from a simple format task to important partitioning tasks. Ill highlight the key features with some screenshots to help you know more about it before installing it.
#### Create partition tables
You can create a new partition table for your new disks or erase the content of your existing disk to modify the partition table.
![][5]
You will be able to select msdos, gpt, atari, and a lot more types of partition tables.
#### Create, move, label, delete & modify partitions
You can easily create, label, delete or modify the partitions with a bunch of options available within GParted.
![][6]
Of course, you will have to be careful about what you want to do.
The good thing is that GParted makes sure that you do not directly apply any changes it queues up your selected operations/tasks and asks for another final confirmation before you hit it.
The tick mark symbol ✓on the top allows you to confirm the changes and then only your changes take into effect.
Heres another screenshot for the options you have available for the partitions:
![][7]
#### Attempt data rescue
Apart from editing partitions, you can also try to [recover your lost data in Linux][8] using the “**Attempt Data Rescue**” feature as shown in the screenshot below.
![][9]
It is worth noting that you do not have this feature installed by default you only see the option visible. So, for the data recovery feature to work, you have to install gpart separately using the following command (on Ubuntu/Debian-based distributions):
```
sudo apt install gpart
```
In addition to all the key features, it supports a wide range of storage devices and filesystems. You can learn more about it from the [list of features][10] on their official website.
### Installing GParted on Ubuntu and other Linux distributions
You might have GParted pre-installed. So, make sure to verify that. If you do not have it installed, you can head into the software center to get it installed.
In case you want to use the terminal, simply type in the following command:
```
sudo apt install gparted
```
As I mentioned above, if you want the data recovery option, you should install gpart package in addition to gparted package.
If youre using any other Linux distribution, you can either find it in the respective software manager or simply check out the [official download instructions][11].
[Download GParted][11]
**Wrapping Up**
GParted is a very useful and important tool when it comes to dealing with disk management and partitions. However, you will have to be careful while using it for the obvious reasons.
Have you tried GParted? Which other partitioning tool you use on Linux? Feel free to share your experiences in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/gparted/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-screenshot.png?ssl=1
[2]: https://itsfoss.com/partition-managers-linux/
[3]: https://gparted.org/
[4]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-create-partition-table.png?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-modify-partitions.png?ssl=1
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-partition-options.png?ssl=1
[8]: https://itsfoss.com/recover-deleted-files-linux/
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-attempt-data-rescue-feature.png?ssl=1
[10]: https://gparted.org/features.php
[11]: https://gparted.org/download.php

View File

@ -1,103 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (GNOME has a Secret Screen Recorder. Heres How to Use it!)
[#]: via: (https://itsfoss.com/gnome-screen-recorder/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
GNOME has a Secret Screen Recorder. Heres How to Use it!
======
[GNOME][1] is one of the [most popular desktop environments][2] and for good reasons. It has a modern UI and it comes with a number of GNOME-specific applications that blend well with the overall desktop appearance.
You can [tweak GNOME][3] to your liking as much as you want but I am not here to discuss that. GNOME desktop has some hidden features that you probably are not aware of.
One of such not-so-obvious feature is a built in screen recorder.
Yes, you read that right. If you are using GNOME desktop, you dont necessarily need to install other [screen recorders in Linux][4]. You just need to know the correct keyboard shortcut.
### Instantly record your screen with GNOME Screen Recorder
To quickly access the GNOME screen recorder, you have to press this [keyboard shortcut in Ubuntu][5] or other distributions using GNOME desktop:
```
Ctrl + Alt + Shift + R
```
This will immediately start recording your desktop. You can tell that the screen recording is in progress by looking at the red dot in the system tray area of the top panel:
![The red dot in the system tray area indicates that screen recording is in progress][6]
#### Increase the screencast duration
The default maximum record time is just 30 seconds. It can be increased though.
Open a terminal and use the following command:
```
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 300
```
In the above command, I have increased the maximum length of the recording to 300 seconds (i.e. 5 minutes). You can change it to any other value but it should be in seconds.
If you **dont want any limit on the maximum recording time, set it to 0** and then the recording wont stop until you manually stop it or your disk runs out of space.
#### Stop the screen recording
As I mentioned, your desktop recording will stop automatically after it reaches the maximum time limit.
To stop the recording before that, you can press the same key combination:
```
Ctrl + Alt + Shift + R
```
Your recordings are saved in [webm][7] format in the Videos folder of your Home directory.
#### Limitations
While it might be handy to record your desktop quickly with this handy little tool, it has its several limitations when compared to a full-fledged screen recording tool like [Simple Screen Recorder][8].
* There is no time delay option before the recording starts
* There is no pause and play option
* It records the entire screen. No option to record only an application window or a ceratin area or a certain monitor (if you have a multi-monitor setup).
* Videos are saved in webm format in the users Videos directory. You cannot change it. Youll have to use a tool like [HandBrake to convert the videos to other format][9].
As you can see, the secret GNOME screen recorder is no where near to the features provided by the likes of [Kazam][10] or other such tools.
But it doesnt try to be a full-fledged screen recorder. It just provides you a quick way of recording a small screencast. Thats it.
GNOME is a versatile modern desktop environments. You can [tweak GNOME][3] extensively. The [GNOME Extensions][11] provide another dimension to the desktop customization.
This screen recorder is one of the hidden features of GNOME like the suspend option that you wont easily find on your own.
_How do you like it? Do you know some other hidden GNOME features that you would like to share with us? The comment section is all yours._
--------------------------------------------------------------------------------
via: https://itsfoss.com/gnome-screen-recorder/
作者:[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://gnome.org/
[2]: https://itsfoss.com/best-linux-desktop-environments/
[3]: https://itsfoss.com/gnome-tweak-tool/
[4]: https://itsfoss.com/best-linux-screen-recorders/
[5]: https://itsfoss.com/ubuntu-shortcuts/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/gnome_screen_recording.jpg?ssl=1
[7]: https://www.webmproject.org/about/
[8]: https://itsfoss.com/record-screen-ubuntu-simplescreenrecorder/
[9]: https://itsfoss.com/handbrake/
[10]: https://itsfoss.com/kazam-screen-recorder/
[11]: https://itsfoss.com/best-gnome-extensions/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -0,0 +1,149 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Bash Script to Check How Long the High CPU/Memory Consumption Processes Runs on Linux)
[#]: via: (https://www.2daygeek.com/bash-script-to-check-how-long-the-high-cpu-memory-consumption-processes-runs-on-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
Bash Script to Check How Long the High CPU/Memory Consumption Processes Runs on Linux
======
In the past, we have written three different articles to identify this using Linux commands.
You can access them immediately by going to the relevant URLs below.
* **[How to Find High CPU Consumption Processes in Linux][1]**
* **[How to Find Out Top Memory Consuming Processes in Linux][2]**
* **[Five Ways to Check How Long a Process Has Been Running in Linux][3]**
Two scripts are included in this tutorial, which helps you to identify how long the high CPU/memory consumption processes are running on Linux.
The script will show you the process ID, the owner of the process, the name of the process and how long the processes are running.
This will help you identify which jobs are running overtime (which must be completed beforehand).
This can be achieved using the ps command.
### Whats ps Command
ps stands for processes status, it display the information about the active/running processes on the system.
It provides a snapshot of the current processes along with detailed information like username, user id, cpu usage, memory usage, process start date and time command name etc.
### 1) Bash Script to Check How Long the High CPU Consumption Processes Runs on Linux
This script will help you to identify how long the high CPU consumption processes has been running on Linux.
```
# vi /opt/scripts/long-running-cpu-proc.sh
#!/bin/bash
ps -eo pid,user,ppid,%mem,%cpu,cmd --sort=-%cpu | head | tail -n +2 | awk '{print $1}' > /tmp/long-running-processes.txt
echo "--------------------------------------------------"
echo "UName PID CMD Process_Running_Time"
echo "--------------------------------------------------"
for userid in `cat /tmp/long-running-processes.txt`
do
username=$(ps -u -p $userid | tail -1 | awk '{print $1}')
pruntime=$(ps -p $userid -o etime | tail -1)
ocmd=$(ps -p $userid | tail -1 | awk '{print $4}')
echo "$username $userid $ocmd $pruntime"
done | column -t
echo "--------------------------------------------------"
```
Set an executable **[Linux file permission][4]** to **“long-running-cpu-proc.sh”** file.
```
# chmod +x /opt/scripts/long-running-cpu-proc.sh
```
When you run this script, you will get an output like the one below.
```
# sh /opt/scripts/long-running-cpu-proc.sh
----------------------------------------------------
UName PID CMD Process_Running_Time
----------------------------------------------------
daygeek 5214 Web 01:18:48
daygeek 5748 Web 01:08:20
daygeek 8043 inkscape 22:11
daygeek 5269 Web 01:18:31
daygeek 1712 Web 10:44:50
daygeek 5335 RDD 01:17:54
daygeek 1639 firefox 10:44:51
daygeek 7793 nautilus 24:14
daygeek 6301 Web 57:40
----------------------------------------------------
```
### 2) Bash Script to Check How Long the High Memory Consumption Processes Runs on Linux
This script will help you to identify how long the top memory consumption processes has been running on Linux.
```
# sh /opt/scripts/long-running-memory-proc.sh
#!/bin/bash
ps -eo pid,user,ppid,%mem,%cpu,cmd --sort=-%mem | head | tail -n +2 | awk '{print $1}' > /tmp/long-running-processes-1.txt
echo "--------------------------------------------------"
echo "UName PID CMD Process_Running_Time"
echo "--------------------------------------------------"
for userid in `cat /tmp/long-running-processes-1.txt`
do
username=$(ps -u -p $userid | tail -1 | awk '{print $1}')
pruntime=$(ps -p $userid -o etime | tail -1)
ocmd=$(ps -p $userid | tail -1 | awk '{print $4}')
echo "$username $userid $ocmd $pruntime"
done | column -t
echo "--------------------------------------------------"
```
Set an executable Linux file permission to **“long-running-memory-proc.sh”** file.
```
# chmod +x /opt/scripts/long-running-memory-proc.sh
```
When you run this script, you will get an output like the one below.
```
# sh /opt/scripts/long-running-memory-proc.sh
----------------------------------------------------
UName PID CMD Process_Running_Time
----------------------------------------------------
daygeek 1639 firefox 10:44:56
daygeek 2997 Web 10:39:54
daygeek 5269 Web 01:18:37
daygeek 1712 Web 10:44:55
daygeek 8043 inkscape 22:17
daygeek 5214 Web 01:18:54
daygeek 1898 Web 10:44:48
daygeek 1129 Xorg 10:45:07
daygeek 6301 Web 57:45
----------------------------------------------------
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/bash-script-to-check-how-long-the-high-cpu-memory-consumption-processes-runs-on-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/how-to-find-high-cpu-consumption-processes-in-linux/
[2]: https://www.2daygeek.com/linux-find-top-memory-consuming-processes/
[3]: https://www.2daygeek.com/how-to-check-how-long-a-process-has-been-running-in-linux/
[4]: https://www.2daygeek.com/understanding-linux-file-permissions/

View File

@ -0,0 +1,87 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Kali Linux Will No Longer Have The Default Root User)
[#]: via: (https://itsfoss.com/kali-linux-root-user/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Kali Linux Will No Longer Have The Default Root User
======
Kali Linux is a specialized Linux distribution for cyber security testing and hacking related tasks.
If youve used [Kali Linux][1], you probably know that it followed a default root user policy. In other words, you are always root in Kali Linux. Whatever you do you will be accessing tools/applications as root by default.
It looks like everything back then was kind of “root for all” for everything. So, the default root user policy existed.
They also explained the history for this in their [announcement post][2]:
> A lot of those tools back then either required root access to run or ran better when ran as root. With this operating system that would be ran from a CD, never be updated, and had a lot of tools that needed root access to run it was a simple decision to have a “everything as root” security model. It made complete sense for the time.
### Kali Linux will now have a default non-root user (like most other distributions)
![][3]
A default non-root model was necessary because a lot of users now use Kali Linux as their daily driver.
Of course, they [do not recommend using Kali Linux][4] as a replacement for stable distributions like Ubuntu/Fedora/Manjaro however, with its active development, some users do consider using it on a day-to-day basis instead of just using it for its tools.
So, with a wide mainstream usage of the distro, the Kali Linux team thought of switching to a default non-root model because nowadays a lot of applications/tools do not require root access.
> While we dont encourage people to run Kali as their day to day operating system, over the last few years more and more users have started to do so _(even if they are not using it to do penetration testing full time)_, including some members of the Kali development team. When people do so, they obviously dont run as default root user. With this usage over time, there is the obvious conclusion that default root user is no longer necessary and Kali will be better off moving to a more traditional security model.
So I am reiterating that you should not consider Kali Linux to be fit for your daily tasks if you do not utilize security-related [Kali Linux tools][5]. Feel free to experiment but I wouldnt be so sure to rely on it.
So from the next release, when you install Kali Linux, youll be asked to create non-root user that will have admin privileges. Tools and commands that require root access will be run with sudo.
![][6]
#### [Pretend to be Using Windows with Kali Linux Undercover Mode][7]
The new undercover mode in Kali Linux switches the desktop layout to make it look like Windows 10. Find out how to activate the undercover mode.
### New default user and password for Kali Linux live mode
![Kali Linux has new user-password in the live system][8]
Technically, you wont find a groundbreaking difference. Just note that the default user ID and password in live mode is “**kali**“.
You can find the new non-root model implemented in the new daily/weekly builds if you want to test it early.
In either case, you can wait for the 2020.1 release scheduled for late January to take a look at the new default non-root user model.
### Getting back the old root model in Kali Linux
If you are a long time Kali Linux user, you may not find it convenient to add sudo before commands and then manually enter the password.
The good news here is that you can still get the old password-less root rights with this command:
```
sudo dpkg-reconfigure kali-grant-root
```
What do you think about the default non-root user model? Is it a good decision? Let me know your thoughts in the comments.
--------------------------------------------------------------------------------
via: https://itsfoss.com/kali-linux-root-user/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.kali.org/
[2]: https://www.kali.org/news/kali-default-non-root-user/
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/kali_linux_default_root_user.png?ssl=1
[4]: https://itsfoss.com/kali-linux-review/
[5]: https://itsfoss.com/best-kali-linux-tools/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/11/kali_linux_undercover_mode.jpg?fit=800%2C450&ssl=1
[7]: https://itsfoss.com/kali-linux-undercover-mode/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/kali-linux-live-password.png?ssl=1

View File

@ -0,0 +1,176 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (7 maker gifts for kids and teens)
[#]: via: (https://opensource.com/article/19/11/maker-gifts-kids)
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
7 个给儿童和少年的创客礼物
======
> 这份礼物指南可给婴儿、儿童、青少年及年龄更大的人们带来创造和创新能力,使你轻松完成节日礼物的采购。
![Gift box opens with colors coming out][1]
还在纠结这个假期给年轻人买什么礼物?这是我精选的开源礼物,这些礼物将激发未来的创意和灵感。
### 蜂鸟机器人套件
![Hummingbird Robotics Kit][2]
**年龄:**8 岁 - 成人
**这是什么:**[蜂鸟机器人套件][3]是一套完整的机器人套件带有微控制器、电机、LED 和传感器。机器人的大脑具有特殊的端口,小手可以轻松地将其连接到机器人的组件上。蜂鸟套件并没有身体,鼓励用户自己创建一个。
**为什么我喜欢它:**蜂鸟可以使用多种编程语言 —— 从可视化编程BirdBlox、MakeCode、Snap到代码编程Python 和 Java—— 可以随着用户编码技能的提高而可扩展。所有组件均与你在电子商店中找到的组件完全相同,没有像其他机器人套件那样被塑料所遮盖。这使机器人的内部工作不再神秘,并在你需要时易于采购更多零件。
由于没有固定组合项目,因此蜂鸟是发挥创造力的完美机器人。
蜂鸟具有开源的软件和固件。它适用于 Linux、Windows、Mac、Chromebook、Android 和 iOS。
**费用:**起价为 99 美元。
### Makey Makey 经典版
![Makey Makey Classic][4]
**年龄:** 6岁 - 成人
**这是什么:** [Makey Makey 经典版][5]可将任何导电物体(从棉花糖到朋友)变成计算机钥匙。
你可以使用鳄鱼夹将 Makey Makey 连接到你选择的导电物体上。然后通过同时触摸两个导电物体来闭合接地和任何触发键之间的电路。Makey Makey 是一种安全的方法,可以安全地在家中探索电力,同时创造与计算机进行交互的有趣方式。
**为什么我喜欢它:** Makey Makey 可以与 Scratch 开发的视频游戏搭配使用,以创建独特的控制器,使用户进一步沉浸在游戏中。从用卫生纸卷和铝箔制成的工具到互动艺术和故事,可能性是无限的。它可以在具有 USB 端口的 Linux、Windows 和 Mac 计算机上使用。
**费用:** 49.95 美金
### Arduino Uno
![Arduino Uno][6]
**年龄:** 10 岁 - 成人
**这是什么:** Arduino 是随同电子套件购买的微控制器,也可以单独购买,它们具有多种版本,尽管我最喜欢[Arduino Uno][7]。可以根据需要从任何电子商店购买其他组件,例如 LED、电机和传感器。
**为什么我喜欢它:** Arduino Uno 的文档很完善因此创客们很容易在线上找到教程。Arduino 可以实现从简单到复杂的各种电子项目。Arduino 具有开源的固件和硬件。它适用于 Linux、Mac 和 Windows。
**费用:**主板的起价为 22.00 美元。总成本取决于项目和技能水平。
### DIY 创客套件
![A maker kit assembled in a quick trip to the hardware store][8]
**年龄**8 岁 - 成人
**这是什么:**当今许多创客、发明家和程序员都是从碰巧修补附加的东西开始的。你可以快速前往最近的电子产品商店,为家里的年轻人创建一套出色的创客工具包。这是我的创客工具包中的内容:
* 护目镜
* 锤子
* 钉子和螺丝
* 碎木
* 螺丝起子
* 电线
* LED
* 压电蜂鸣器
* 马达
* 带引线的AA电池组
* 剪线钳
* 纸板
* 美纹纸胶带
* 废布
* 纽扣
* 线程
* 针
* 拉链
* 钩子
* 一个很酷的工具盒,用来存放所有东西
  
**我为什么喜欢它:**还记得小时候,你把父母带回家的空纸箱变成了宇宙飞船、房屋或超级计算机吗?这就是为大孩子们准备的 DIY 创客工具包。
原始的组件使孩子们可以尝试并运用他们的想象力。DIY 创客工具包可以完全针对接收者定制。可以放入一些接受这份礼品的人可能从未想到过用之发挥创意的某些组件,例如为下水道提供一些 LED 或木工结构。
**费用:**不等
### 启发式游戏篮
![Heuristic play kit][9]
**年龄:** 8 个月至 5 岁
**这是什么:**启发式游戏篮充满了由天然、无毒材料制成的有趣物品,可供婴幼儿使用其五种感官进行探索。这是一种开放式、自娱自乐的游戏。其想法是,成年人将监督(但不指导)儿童使用篮子及其物品半小时,然后将篮子拿走下一次再玩。
创建带有常见家用物品的可爱游戏篮很容易。尝试包括质地、声音、气味、形状和重量各不相同的物品。这里有一些想法可以帮助您入门。
* 漏勺或脊状柳条篮可容纳所有物品
* 木勺子
* 金属打蛋器和汤匙
* 板刷
* 海绵
* 小鸡蛋纸箱
* 纸板管
* 小擀面杖
* 带纹理的毛巾
* 岩石
* 手铃
* 钩针桌巾
* 带盖的小铁罐
  
游戏篮中不应包括任何容易破碎的东西或足够小到可以装入纸巾卷的东西,因为它们有窒息危险,应将所有物品彻底清洁后再交给孩子。
**我为什么喜欢它:**游戏篮非常适合感官发育,并可以帮助幼儿提出问题和探索周围的世界。这是培养创客思维方式的重要组成部分!
很容易获得适合这个游戏篮的物品。你可能已经在家中或附近的二手店里有很多有趣的物品。幼儿使用游戏篮的方式与婴儿不同。随着孩子开始模仿成人生活并通过他们的游戏讲故事,这些物品将随孩子一起成长。
**费用:**不等
### 《Hello Ruby》
![Hello Ruby book cover][10]
**年龄**5-8 岁
**这是什么:** 《[Hello Ruby][11]:编码历险记》是 Linda Liukas 的插图书通过有趣的故事讲述了一个遇到各种问题和朋友每个都用一个码代表的女孩向孩子们介绍了编程概念。Liukas 还有其他副标题为《互联网探险》和《计算机内的旅程》的《Hello Ruby》书籍而《编码历险记》已以 20 多种语言出版。
**为什么我喜欢它:**作者在书中附带了许多免费、有趣和无障碍的活动,可以从 Hello Ruby 网站下载和打印这些活动。这些活动教授编码概念、还涉及艺术表达、沟通、甚至时间安排。
**费用:**精装书的标价为 17.99 美元,但你可以通过本地或在线书店以较低的价格买到这本书。
### 《编程少女:学会编程和改变世界》
![Girls Who Code book cover][12]
**年龄**10 岁 - 成人
**内容是什么:**由《编程少女》的创始人 Reshma Saujani 撰写,《[编程少女:学会编程和改变世界][13]》为年轻女孩(以及男孩)提供了科技领域的实用信息。它涵盖了广泛的主题,包括编程语言、用例、术语和词汇、职业选择以及技术行业人士的个人简介和访谈。
**为什么我喜欢它:**本书以讲述了大多数面向成年人的网站没有的技术故事。技术涉及许多学科,对于年轻人来说,重要的是要了解他们可以使用它来解决现实世界中的问题并有所作为。
**成本:**精装书的标价为 17.99 美元,平装书的标价为 10.99 美元,但你可以通过本地或在线书店以更低的价格找到。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/maker-gifts-kids
作者:[Jess Weichler][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/cyanide-cupcake
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out)
[2]: https://opensource.com/sites/default/files/uploads/hummingbird.png (Hummingbird Robotics Kit)
[3]: https://www.birdbraintechnologies.com/hummingbirdbit/
[4]: https://opensource.com/sites/default/files/uploads/makeymakey2.jpg (Makey Makey Classic)
[5]: https://makeymakey.com/
[6]: https://opensource.com/sites/default/files/uploads/arduinouno.jpg (Arduino Uno)
[7]: https://www.arduino.cc/
[8]: https://opensource.com/sites/default/files/makerbox-makerkit.jpg (A maker kit assembled in a quick trip to the hardware store)
[9]: https://opensource.com/sites/default/files/makerbox-sensorykit.jpg (Heuristic play kit)
[10]: https://opensource.com/sites/default/files/uploads/helloruby2.jpg (Hello Ruby book cover)
[11]: https://www.helloruby.com/
[12]: https://opensource.com/sites/default/files/uploads/girlswhocodebook.jpg (Girls Who Code book cover)
[13]: https://girlswhocode.com/book/girls-code-learn-code-change-world/

View File

@ -0,0 +1,116 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (App Highlight: Open Source Disk Partitioning Tool GParted)
[#]: via: (https://itsfoss.com/gparted/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
应用程序推荐:开源磁盘分区工具 GParted
======
_**摘要GParted 是一个非常流行的自由的可用于 Linux 发行版的分区编辑器。在这里,我们简单地看看它提供了什么。**_
### GParted一个基于自由和开放源码的图形化分区管理器
![][1]
GParted 无疑是[在 Linux 下的最好的分区管理器][2]之一。用户界面非常简单,可用完成任务。
在一些情况下,你最终也需要使用 [GParted][3] 来修复或格式化你的 USB 驱动器。我有一个[我不能在 Ubuntu 中格式化的 USB 磁盘][4],使用该“磁盘”应用程序 这里是 GParted 用来救援的地方。
所以,它是非常有用的工具,有很多好的特色。让我为你们推荐一下。
警告!
玩弄磁盘分区是一件危险的工作。除非绝对必要,否则不要做。否则,你可能最终会擦除整个磁盘。
### GParted 的特色
你可以使用 GParted 做很多事,排列一下简单地格式化任务到重要的分区任务。我将使用一些屏幕截图推荐关键特色,以帮助你在安装它前了解更多信息。
#### 创建分区表
你可以为你的新的磁盘创建一个新的分区表,或者擦除你现存的磁盘内容来修改分区表。
![][5]
你将能够选择 msdos gpt atari ,以及更多类型的分区表。
#### 创建,移动,标记,删除和修改分区表
你可以使用 GParted 中一系列可用的选项来简单地创建,标记,删除或修改分区表。
![][6]
当然,你将不得不小心你想做什么。
好的一些东西是GParted 确保你不能直接应用任何更改 在你点击应用更改之前,它将排队你选择的操作/任务,并询问另外一处最后的确认。
在顶部的对号标记符号 ✓ 允许你来确认更改,只有你更改时开始生效。
这样有另一个你可用的分区选项的屏幕截图:
![][7]
#### 尝试数据救援
除了编辑分区,你也可以尝试使用“**尝试数据救援**”特色以[在Linux 中恢复你丢失的数据][8],像下面的屏幕截图所示。
![][9]
值得注意的是,默认情况下你没有安装这个功能 你仅能看到可见的选项。所以,对于数据恢复特色作业来说,你必需使用下面的命令来单独地安装 gpart (在基于 Ubuntu/Debian 的发行版上)
```
sudo apt install gpart
```
除了所有关键的特色外,它支持大量的存储设备和文件系统。在它们的官方网站上,你可以从[特色列表][10]中学到很多。
### 在 Ubuntu 和其它 Linux 发行版上安装 GParted
你可能已经预先安装 GParted 。所以,务必核实一下。如果你没有安装它,你可以前往进入软件中心安装它。
以备你想使用终端,简单地键入下面的命令:
```
sudo apt install gparted
```
像我如上所述,如果你想要数据恢复选项,除了 gparted 软件包外,你应该安装 gpart 软件包。
如果你正在使用一些其它 Linux 发行版,你可以在各自的软件管理器中找到它,或者简单地查看[官方下载操作指南][11]。
[下载 GParted][11]
**总结**
当涉及处理磁盘管理和分区时GParted 是一个非常有用和重要的工具。但是,因为显而易见的原因,当你使用它时,你将不得不小心。
你尝试过 GParted 吗?你在 Linux 上使用的其它分区工具是什么?请在下面的评论中分享你的体验。
--------------------------------------------------------------------------------
via: https://itsfoss.com/gparted/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-screenshot.png?ssl=1
[2]: https://itsfoss.com/partition-managers-linux/
[3]: https://gparted.org/
[4]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-create-partition-table.png?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-modify-partitions.png?ssl=1
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-partition-options.png?ssl=1
[8]: https://itsfoss.com/recover-deleted-files-linux/
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/gparted-attempt-data-rescue-feature.png?ssl=1
[10]: https://gparted.org/features.php
[11]: https://gparted.org/download.php

View File

@ -0,0 +1,104 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (GNOME has a Secret Screen Recorder. Heres How to Use it!)
[#]: via: (https://itsfoss.com/gnome-screen-recorder/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
GNOME 有一个“秘密”的屏幕录像机。下面是使用方法!
======
[GNOME][1]是[最受欢迎的桌面环境][2]之一。它有现代的 UI并且带有许多特定于 GNOME 的应用,这些应用与桌面整体外观完美融合。
你可以根据自己的喜好来[调整 GNOME][3]但我不在这里讨论。GNOME 桌面有一些你可能不知道的隐藏功能。
这种不太明显的功能之一是内置的屏幕录像机。
是的,你没有看错。如果你使用的是 GNOME 桌面,那么不必安装其他的 [Linux 屏幕录像机][4]。你只需要知道正确的快捷键即可。
### 立即使用 GNOME 屏幕录像机录制屏幕
要快速打开 GNOME 屏幕录像机,你需要[在 Ubuntu 或其他带有 GNOME 桌面的发行版中按下此快捷键][5]
```
Ctrl + Alt + Shift + R
```
这将会立即开始录制你的桌面。你可以通过顶部的系统托盘区域的红点了解到正在录制:
![The red dot in the system tray area indicates that screen recording is in progress][6]
#### 增加录制时间
默认的最大录制时间仅为 30 秒。但是可以增加。
打开终端并使用以下命令:
```
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 300
```
在上面的命令中,我将录音的最大长度增加到 300 秒即5分钟。你可以将其更改为任何其他值但应以秒为单位。
如果你**不希望最长录音时间有任何限制请将其设置为0**,之后它会在你手动停止或者磁盘空间不足才会停止。
#### 停止屏幕录制
如前所述,你的桌面录制将在达到最大时间限制后自动停止。
要在此之前停止录制,你可以按下相同的组合键:
```
Ctrl + Alt + Shift + R
```
你的录制内容将以 [webm][7 ]格式保存在家目录的 “Videos” 文件夹中。
#### 局限性
尽管使用这个小工具可以方便地快速录制桌面,但是与功能强大的 [Simple Screen Recorder][8] 这样的屏幕录制工具相比,它有一些局限性。
* 录制开始之前没有时间延迟选项
  * 没有暂停和播放选项
  * 它录制整个屏幕。无法仅录制应用窗口、特定区域或特定屏幕(如果你有多个屏幕)。
  * 视频以 webm 格式保存在用户的 “Videos” 目录中。你无法更改。你必须使用 [HandBrake 之类的工具将视频转换为其他格式][9]。
如你所见,秘密的 GNOME 屏幕录像机与 [Kazam][10] 之类的工具或其他此类工具所提供的功能相差很远。
但是,它并不会尝试成为全功能的屏幕录像机。它只是为你提供录制屏幕的快速方法。
GNOME 是一个多功能的现代桌面环境。你可以大量地[调整 GNOME][3]。[GNOME 扩展][11]为桌面自定义提供了另一个维度。
该屏幕录像机是 GNOME 的隐藏功能之一,就像你自己很难轻易找到的挂起选项。
_你喜欢它吗你是否还想与我们分享其他隐藏的 GNOME 功能请在评论区留言。_
--------------------------------------------------------------------------------
via: https://itsfoss.com/gnome-screen-recorder/
作者:[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://gnome.org/
[2]: https://itsfoss.com/best-linux-desktop-environments/
[3]: https://itsfoss.com/gnome-tweak-tool/
[4]: https://itsfoss.com/best-linux-screen-recorders/
[5]: https://itsfoss.com/ubuntu-shortcuts/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/gnome_screen_recording.jpg?ssl=1
[7]: https://www.webmproject.org/about/
[8]: https://itsfoss.com/record-screen-ubuntu-simplescreenrecorder/
[9]: https://itsfoss.com/handbrake/
[10]: https://itsfoss.com/kazam-screen-recorder/
[11]: https://itsfoss.com/best-gnome-extensions/