Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-06-22 22:02:30 +08:00
commit c62ae7e404
9 changed files with 584 additions and 483 deletions

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: ( )
[#]: url: ( )
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12338-1.html)
[#]: subject: (Introduction to Homebrew: the painless way to install anything on a Mac)
[#]: via: (https://opensource.com/article/20/6/homebrew-mac)
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
@ -13,7 +13,7 @@ Homebrew :在 Mac 上无痛安装软件
> Homebrew 软件包管理器可以让你轻松地在 Mac 上安装和更新应用程序和实用程序。
![Gift box opens with colors coming out][1]
![](https://img.linux.net.cn/data/attachment/album/202006/22/102739xum6zqmoh6sso0n6.jpg)
在我追求“万物自动化”的过程中,我一直坚持走在用代码来管理我的 Mac 笔记本电脑的路上。与其用鼠标或触控板手动管理我的应用程序和实用程序,我更喜欢使用软件包管理软件来安装、更新和删除不需要的软件。
@ -21,6 +21,8 @@ Homebrew :在 Mac 上无痛安装软件
这就是 [Homebrew][3] 的作用。Homebrew自酿填补了 MacOS 事实上的软件包管理器的空白(它也是 Linux 上的又一个可选的包管理器)。它为任何熟悉命令行的人提供了令人难以置信的流畅而直接的体验,如果你是新手,它是学习命令行的好方法。
LCTT 译注Homebrew 系统中采用了大量针对自酿啤酒相关的比喻,大家在使用过程中会发现这些有趣的形容。)
如果你在 Mac 上还没有 Homebrew你可以这样来安装
```

View File

@ -1,147 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to know if you're ready to switch from Mac to Linux)
[#]: via: (https://opensource.com/article/20/6/mac-to-linux)
[#]: author: (Marko Saric https://opensource.com/users/markosaric)
How to know if you're ready to switch from Mac to Linux
======
You can do nearly anything on Linux that you can do on a Mac—with the
freedom of an open source operating system.
![Digital images of a computer desktop][1]
It's been almost two years since I switched [from Mac to Linux][2]. I used Apple for about 15 years before my move and was a complete Linux newbie when I installed my first distribution in summer 2018.
These days, I run Linux exclusively. I can do anything I want on it. Regular internet browsing and watching Netflix, writing and editing content for my [WordPress blog][3], and even running my [open source web analytics][4] startup.
And I'm not even a developer! Long gone are the days when Linux was considered not ready for everyday usage nor friendly enough for non-technical people.
There's been a lot of discussions lately about the current state of Macs, with an increasing number of people considering making the switch to Linux. I'll share some of my Mac-to-Linux transition tips, so other newbies can make a more comfortable move.
### Should you switch?
Before you switch from Mac to Linux, it's helpful to think about when Linux won't work for you. If your main concerns about switching to Linux are how to pair your Apple Watch, make calls on FaceTime, or use iMovie, this move may not be right for you. These are all proprietary products that Apple keeps under lock and key in its walled garden. If you love Apple's ecosystem, Linux is probably not the right solution for you.
I wasn't very locked into the Apple ecosystem. I didn't have an iPhone, so phone integration was not necessary. I didn't use iCloud, FaceTime, or Siri, either. I was already "open source curious," but I hadn't made the leap.
### Check your favorite apps
I started exploring open source software when I was still on macOS, and I discovered most of the applications I use will run in both environments.
Familiar with Firefox for web browsing? It runs on Linux, too. Use VLC to play media? It's on Linux, too. Use Audacity for audio recording and editing? It's waiting for you on Linux. Live-streaming using OBS Studio? There's a Linux app. Keeping in touch with your family and friends on Telegram messenger? It's also available on Linux.
Also, Linux is not only about open source software. Most (perhaps all) of your favorite non-Apple proprietary apps can be found on Linux, too. Spotify, Slack, Zoom, Steam, Discord, Skype, Chrome, and many other closed source apps are available. In addition, pretty much anything you can run in your browser on macOS can run in your browser on Linux.
It's a good idea to double-check if your must-have apps are available on Linux or if there are adequate or even better Linux alternatives. Do some research using your favorite search engine. Search for "your favorite app + Linux" or "your favorite app + Linux alternatives," and look at [Flathub][5] for proprietary applications you can install on Linux using Flatpak.
### Remember Linux is not Mac
If you want to be comfortable with your move from Mac to Linux, I believe it's important to be open-minded and willing to learn a new operating system. Linux is not macOS, and you need to give yourself some time to get to know it.
If you want Linux to look and work the same way you're used to on macOS, Linux may not be the right solution. Even though there are ways to create a Linux desktop environment with a similar look and feel as macOS, I believe that the best way to have a successful transition to Linux is to start by embracing Linux.
Give its workflow a chance, and use it as it is intended. Do not try to turn Linux into something that it isn't. You may find that you enjoy it as much (or more) than your Mac, as I did.
Remember the first time you used a Mac; you needed some time to get used to the workflow. Give Linux the same time and care.
### Choose a Linux distribution
Unlike Windows and macOS, Linux doesn't have just one, single OS. The different Linux operating systems are called distributions, and I've used and tested several since I've been on Linux. I've also used multiple desktop environments, or graphical user interfaces, too. They differ a lot in terms of aesthetics, usability, workflow, and integrated apps.
While [ElementaryOS][6] and [Pop!_OS][7] come up quite often as Mac alternatives, I recommend starting with [Fedora Workstation][8] for the following reasons:
* It is simple to install to a USB using [Fedora Media Writer][9].
* It is likely to support all of your hardware out of the box.
* It supports the latest Linux software.
* It runs the GNOME desktop environment without any additional customization.
* It has a big community and a large development team behind it.
In my opinion, [GNOME][10] is the best Linux desktop environment in terms of usability, consistency, fluidity, and user experience for newbies coming from macOS. It has the most development resources and the most users in the Linux world, so your chances are good that everything will work great.
Fedora can open the doors of Linux for you, and as you get more comfortable, you can start exploring the world of distributions, desktop environments, and even window managers further.
### Get familiar with GNOME
GNOME is the default window manager for Fedora and many other Linux distributions. Its recent [update to GNOME 3.36][11] brings a modern aesthetic that Mac users will appreciate.
Be prepared that Linux, Fedora Workstation, and GNOME are not Apple and macOS. GNOME is very clean, minimal, modern, and original. There are no distractions. There are no desktop icons. There's no visible dock. There are not even minimize and maximize buttons on your windows. But don't panic. If you give it a chance, it may prove to be the best and most productive operating system you've ever used.
GNOME gets out of your way. When you start it up, the only things you see are the top panel and the background image. The top panel consists of **Activities** on the left, the time and date in the center (which also serves as your notifications center), and tray icons for the network, Bluetooth, VPN, sound, brightness, battery, and such on the right-hand side.
#### How GNOME is like Mac
You'll notice some similarities with macOS, such as window snapping and seeing previews of documents by hitting the **Spacebar** (it works exactly like Quick Look).
If you drag your mouse icon to the top-left, click on **Activities** in the top panel, or press the **Super** key (i.e., the Apple key) on your keyboard, you will get the **Activities Overview**. Activities Overview is kind of like the macOS Mission Control and Spotlight Search in one. It gives you an overview of all the open applications and windows in the center. On the left-hand side, you see the dock, which features all your favorite and open applications. There's an indicator under all the open applications, and on the right-hand side, you can see the different workspaces.
In the top-center, there is a search box. As soon as you start typing, the focus is on that search box. It searches your installed applications and file contents, finds specific apps in the software center, does calculations, gives you the time and weather, and does so much more. It acts pretty much like Spotlight. Simply start typing whatever you're looking for, and press **Enter** to open an application or file.
You can also see a list of all your installed applications (much like Launchpad on Mac). Click on the **Show Applications** icon in the dock or press **Super + A**.
In general, Linux is very lightweight, runs fast even on older hardware, and takes very little disk space compared to macOS. And unlike macOS, you can delete any of the preinstalled apps that you don't want or need.
#### Customize your GNOME settings
Go through GNOME Settings to get more familiar with its options and make changes that may make it more comfortable for you. Here are some of the things I do as soon as I install GNOME:
* In **Mouse & Touchpad**, I disable natural scrolling and enable tap-to-click.
* In **Displays**, I enable night light, which makes the screen color warmer in the evenings to help prevent eye strain.
* I also install [**GNOME Tweaks**][12] to get access to additional settings.
* In Tweaks, I enable **Over-Amplification**, so I can raise the volume above 100%.
* In Tweaks, I enable the **Adwaita Dark** theme, which I prefer to the default, light theme.
#### Get used to working with the keyboard
GNOME is a very keyboard-centric OS, so try to use your keyboard more. In the **Keyboard Shortcut** section of GNOME Settings, you can find a list of the different keyboard shortcuts.
You can also set your keyboard shortcuts to fit your ideal workflow. I set my most-used apps to open using the **Super** key. For example, **Super + B** for my browser, **Super + F** for files, **Super + T** for the terminal, and so on. I also set **Ctrl + Q** to close windows.
I switch between open applications using **Super + Tab**. I use **Super + H** to hide a window. I press **F11** to open an app in full screen. **Super + Left arrow** to snap the current application to the left side of the screen. **Super + Right arrow** to snap it to the right side of the screen. And so on.
### Try Linux on your Mac before committing
You can try Fedora out on your Mac before doing a full installation. Simply download the ISO image file from [Fedora's website][9]. Flash the ISO image file on a USB drive using [Etcher][13], and boot from that drive by pressing the **Option** key when the computer starts so that you can try it live.
Now you can explore the live Fedora Workstation without having to install anything on your Mac. Test different things to see if they work: Can you connect to WiFi? Does your touchpad work? How about audio? And so on.
Spend some time exploring GNOME, too. Test the different features I discussed above. Open some of the installed applications. If everything seems fine, if you like the look and feel of Fedora Workstation and GNOME, and if you are sure that this is what you want, then you can install it on your Mac.
Have fun exploring the world of Linux!
* * *
_This article is an update of [How I switched from macOS to Linux after 15 years of Apple][2] originally published on Marko Saric's website._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/mac-to-linux
作者:[Marko Saric][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/markosaric
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop)
[2]: https://markosaric.com/linux/
[3]: https://markosaric.com/how-start-blog/
[4]: https://plausible.io/open-source-website-analytics
[5]: https://flathub.org/apps
[6]: https://opensource.com/article/20/2/macbook-linux-elementary
[7]: https://support.system76.com/articles/pop-basics/
[8]: https://getfedora.org/
[9]: https://getfedora.org/en/workstation/download/
[10]: https://www.gnome.org/
[11]: https://www.gnome.org/news/2020/03/gnome-3-36-released/
[12]: https://wiki.gnome.org/Apps/Tweaks
[13]: https://www.balena.io/etcher/

View File

@ -1,173 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Ubuntu MATE 20.04 LTS Review: Better Than Ever)
[#]: via: (https://itsfoss.com/ubuntu-mate-20-04-review/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Ubuntu MATE 20.04 LTS Review: Better Than Ever
======
Ubuntu MATE 20.04 LTS is undoubtedly one of the most popular [official flavors of Ubuntu][1].
Its not just me, but [Ubuntu 20.04 survey results][2] also pointed out the same. Popular or not, it is indeed an impressive Linux distribution specially for older hardware. As a matter of fact, it is also one of the [best lightweight Linux distros][3] available out there.
So, I thought of trying it out for a while in a virtual machine setting to provide you an overview of what you can expect out of it. And, whether its worth trying out.
### Whats New In Ubuntu MATE 20.04 LTS?
[Subscribe to our YouTube channel for more Linux videos][4]
The primary highlight on Ubuntu MATE 20.04 LTS would be the addition of MATE Desktop 1.24.
You can expect all the new features of the MATE Desktop 1.24 to come packed in with Ubuntu MATE 20.04. In addition to that, there have been many significant changes, improvements, and additions.
Heres an overview of what has changed in Ubuntu MATE 20.04:
* Addition of MATE Desktop 1.24
* Numerous visual improvements
* Dozens of bugs fixed
* Based on [Linux Kernel 5.4][5] series
* Addition of experimental [ZFS][6] support
* Addition of GameMode from [Feral Interactive][7].
* Several package updates
Now, to get a better idea on Ubuntu MATE 20.04, Ill give you some more details.
### User Experience Improvements
![][8]
Considering that more users are leaning towards Linux on Desktop, the user experience plays a vital role in that.
If its something easy to use and pleasant to look at that makes all the difference as the first impression.
With Ubuntu MATE 20.04 LTS, I wasnt disappointed either. Personally, Im a fan of the latest [GNOME 3.36][9]. I like it on my [Pop OS 20.04][10] but with the presence of [MATE 1.24][11], it Ubuntu MATE was also a good experience.
You will see some significant changes to the window manager including the addition of **invisible resize borders**, **icons rendering in HiDPI**, **rework of ALT+TAB workspace switcher pop ups**, and a couple of other changes that comes as part of the latest MATE 1.24 desktop.
![][12]
Also, **MATE Tweak** has got some sweet improvements where you get to preserve user preferences even if you change the layout of the desktop. The new **MATE Welcome screen** also informs the user about the ability to change the desktop layout, so they dont have to fiddle around to know about it.
Among other things, one of my favorite additions would be the **minimized app preview feature**.
For instance, you have an app minimized but want to get a preview of it before launching it now you can do that by simply hovering your mouse over the taskbar as shown in the image below.
![][13]
Now, I must mention that it does not work as expected for every application. So, Id still say **this feature is buggy and needs improvements**.
### App Additions or Upgrades
![][14]
With MATE 20.04, you will notice a new **Firmware updater** which is a GTK frontend for [fwupd][15]. You can manage your drivers easily using the updater.
This release also **replaces** **Thunderbird with the Evolution** email client. While [Thunderbird][16] is a quite popular desktop email client, [Evolution][17] integrates better with the MATE desktop and proves to be more useful.
![][18]
Considering that we have MATE 1.24 on board, you will also find a **new time and date manager app**. Not just that, if you need a magnifier, [Magnus][19] comes baked in with Ubuntu MATE 20.04.
![][20]
Ubuntu MATE 20.04 also includes upgrades to numerous packages/apps that come pre-installed.
![][21]
While these are small additions but help in a big way to make the distro more useful.
### Linux Kernel 5.4
Ubuntu MATE 20.04 ships with the last major stable kernel release of 2019 i.e [Linux Kernel 5.4][5].
With this, you will be getting the native [exFAT support][22] and improved hardware support as well. Not to mention, the support for [WireGuard][23] VPN is also a nice thing to have.
So, you will be noticing numerous benefits of Linux Kernel 5.4 including the kernel lock down feature. In case youre curious, you can read our coverage on [Linux Kernel 5.4][5] to get more details on it.
### Adding GameMode by Feral Interactive
Feral Interactive popularly known for bringing games to Linux platform came up with a useful command-line tool i.e. [GameMode][7].
You wont get a GUI but using the command-line you can apply temporary system optimizations before launching a game.
While this may not make a big difference for every system but its best to have more resources available for gaming and the GameMode ensures that you get the necessary optimizations.
### Experimental ZFS Install Option
You get the support for ZFS as your root file system. It is worth noting that it is an experimental feature and should not be used if youre not sure what youre doing.
To get a better idea of ZFS, I recommend you reading one of our articles on [What is ZFS][6] by [John Paul][24].
### Performance & Other Improvements
Ubuntu MATE is perfectly tailored as a lightweight distro and also something fit for modern desktops.
![][25]
In this case, I didnt run any specific benchmark tools- but for an average user, I didnt find any performance issues in my virtual machine setting. If it helps, I tested this on a host system with an i5-7400 processor with a GTX 1050 graphics card coupled with 16 Gigs of RAM. And, 7 GB of RAM + 768 MB of graphics memory + 2 cores of my processor was allocated for the virtual machine.
![][26]
When you test it out yourself, feel free to let me know how it was for you.
Overall, along with all the major improvements, there are subtle changes/fixes/improvements here and there that makes Ubuntu MATE 20.04 LTS a good upgrade.
### Should You Upgrade?
If you are running Ubuntu MATE 19.10, you should proceed upgrading it immediately as the support for it ends in **June 2020.**
For Ubuntu MATE 18.04 users (**supported until April 2021**) it depends on what works for you. If you need the features of the latest release, you should choose to upgrade it immediately.
But, if you dont necessarily need the new stuff, you can look around for the [list of existing bugs][27] and join the [Ubuntu MATE community][28] to know more about the issues revolving the latest release.
Once you do the research needed, you can then proceed to upgrade your system to Ubuntu MATE 20.04 LTS which will be **supported until April 2023**.
_**Have you tried the latest Ubuntu MATE 20.04 yet? What do you think about it? Let me know your thoughts in the comments.**_
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-mate-20-04-review/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/which-ubuntu-install/
[2]: https://ubuntu.com/blog/ubuntu-20-04-survey-results
[3]: https://itsfoss.com/lightweight-linux-beginners/
[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
[5]: https://itsfoss.com/linux-kernel-5-4/
[6]: https://itsfoss.com/what-is-zfs/
[7]: https://github.com/FeralInteractive/gamemode
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-20-04.jpg?ssl=1
[9]: https://itsfoss.com/gnome-3-36-release/
[10]: https://itsfoss.com/pop-os-20-04-review/
[11]: https://mate-desktop.org/blog/2020-02-10-mate-1-24-released/
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-desktop-layout.png?ssl=1
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-minimized-app.png?ssl=1
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-20-04-firmware.png?ssl=1
[15]: https://fwupd.org
[16]: https://www.thunderbird.net/en-US/
[17]: https://wiki.gnome.org/Apps/Evolution
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-evolution.png?ssl=1
[19]: https://kryogenix.org/code/magnus/
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-magnus.jpg?ssl=1
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-apps.png?ssl=1
[22]: https://cloudblogs.microsoft.com/opensource/2019/08/28/exfat-linux-kernel/
[23]: https://wiki.ubuntu.com/WireGuard
[24]: https://itsfoss.com/author/john/
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-system-reosource.jpg?ssl=1
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-focal-neofetch.png?ssl=1
[27]: https://bugs.launchpad.net/ubuntu-mate
[28]: https://ubuntu-mate.community/

View File

@ -1,159 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to use Bash history commands)
[#]: via: (https://opensource.com/article/20/6/bash-history-commands)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
How to use Bash history commands
======
Bash's history command surpasses all other Linux shell history
interfaces in the number of features it offers.
![Person typing on a 1980's computer][1]
Bash has a rich history. That is, it's an old shell with an even older ancestor (the Bourne shell), but it also has a great `history` command that surpasses all other shell history interfaces based on its number of features. The [Bash][2] version of `history` allows for reverse searches, quick recall, rewriting history, and more.
The `history` command isn't like many other commands. You might be used to commands being executable files placed in common system-level locations like `/usr/bin`, `/usr/local/bin`, or `~/bin`. The built-in `history` command isn't in your `PATH` and has no physical location:
```
$ which history
which: no history in [PATH]
```
Instead, `history` is a built-in function of the shell itself:
```
$ type history
history is a shell builtin
$ help history
history: history [-c] [-d offset] [n] or
history -anrw [filename] or
history -ps arg [arg...]
Display or manipulate the history list.
[...]
```
For that reason, the history function in each shell is unique, so what you use in Bash may not work in Tcsh or Fish or Dash, and what you use in those may not work in Bash. In some cases, knowing what Bash can do may inspire users of other shells to create interesting hacks to clone Bash behavior, and it may unlock Bash features that you never knew existed.
### View your Bash history
The most basic and frequent use of the `history` command is to view a history of your shell session:
```
$ echo "hello"
hello
$ echo "world"
world
$ history
  1  echo "hello"
  2  echo "world"
  3  history
```
### Event designators
Event designators search through your history by event. An _event_ in this context is a command logged in your history, delineated by a newline character. In other words, it's one line, marked by an index number for reference.
Event designators mostly start with an exclamation point, sometimes also called a _bang_ (`!`).
To rerun a command from your history, use the exclamation point followed immediately (no spaces) by the index number of the command you want. For instance, assume line 1 contains the command `echo "hello"`, and you want to run it again:
```
$ !1
echo "hello"
hello
```
You can use relative positioning by providing a negative number of lines back from your current position in history. For example, to go back three entries in history:
```
$ echo "foo"
foo
$ echo "bar"
bar
$ echo "baz"
baz
$ !-3
echo "foo"
foo
```
If you're just going back one line, you can use the shorthand `!!` instead of `!-1`. That's a savings of one whole keystroke!
```
$ echo "foo"
$ !!
echo "foo"
foo
```
### String search
You can also search for a specific string through the entries, in reverse, for a command to run. To search for a command _starting_ with a specific string, use an exclamation point followed immediately (no space) by the string you want to search for:
```
$ echo "foo"
$ true
$ false
$ !echo
echo "foo"
foo
```
You can also search for a command containing a string in any position (not just at the start). To do that, use `!` plus the string you're searching for, as usual, but surround the string with question marks on either end. You may omit the trailing question mark if you know that the string is immediately followed by a newline character (meaning it's the last thing you typed before you pressed **Return**):
```
$ echo "foo"
$ true
$ false
$ !?foo?
echo "foo"
foo
```
### String substitution
Similar to searching for strings at the start of a line, you can search for a string and replace it with a new string, changing the command:
```
$ echo "hello"
hello
$ echo "world"
world
$ ^hello^foo
echo "foo"
foo
```
### Make history useful
In Bash, the history command is capable of much more than what's been covered here, but this is a good start for getting used to _using_ your history instead of just treating it as a reference. Use the `history` command often, and see how much you can do without having to type commands. You might surprise yourself!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/bash-history-commands
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: https://opensource.com/resources/what-bash

View File

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

View File

@ -0,0 +1,107 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Missing Photoshop on Linux? Use PhotoGIMP and Convert GIMP into Photoshop)
[#]: via: (https://itsfoss.com/photogimp/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Missing Photoshop on Linux? Use PhotoGIMP and Convert GIMP into Photoshop
======
[Adobe Photoshop][1] is not available for desktop Linux. GIMP is the [best alternative to Adobe Photoshop on Linux][2].
If you have used Photoshop for sometime, youll notice that the [GIMP][3] has different settings, different keyboard shortcuts and layout than Photoshop.
And there is absolutely nothing wrong with it. After all, both are two different software, and they dont have to look the same.
However, people who are used to Photoshop find it difficult to forget their hard learned muscle memory while switching to GIMP. This could frustrate some because using a new interface means learning numerous keyboard shortcuts and spending time on finding which tool is located where.
To help such Photoshop to GIMP switchers, [Diolinux][4] has introduced a tool that mimics Adobe Photoshop in GIMP.
### PhotoGIMP: Give Adobe Photoshop like look and feel to GIMP in Linux
![][5]
[PhotoGIMP][6] is not a standalone graphics software. It is a patch for GIMP 2.10. You need to have GIMP installed on your system to use PhotoGIMP.
When you apply the PhotoGIMP patch, it changes GIMP layout to mimic Adobe Photoshop.
* Installs hundreds of new fonts by default
* Installs new Python filters such as “heal selection”
* Adds new splash screen
* Adds new default settings to maximize space on the canvas
* Adds keyboard shortcuts similar to Adobe Photoshop
PhotoGIMP also adds new icon and name from custom .desktop file. Lets see how to use it.
### Installing PhotoGIMP on Linux [for intermediate to expert users]
PhotoGIMP is essentially a patch. You download and [extract the zip file in Linux][7]. Youll find the following hidden folders in the extracted folder:
* icons: which have a new PhotoGIMP icon
* .local: which contain the personalized .desktop file so that you see PhotoGIMP instead of GIMP in system menu
* .var : the main folder containing the patch for GIMP
You should [use Ctrl+H keyboard shortcut to show hidden files in Ubuntu][8].
Warning: I suggest making backup of GIMP config files so that you can revert if you dont like PhotoGIMP. Simply copy the content of GIMP config files into some other location.
At present, PhotoGIMP is mainly compatible with GIMP installed via [Flatpak][9]. If you installed GIMP using Flatpak, you can simply copy-paste these hidden folders in your home directory and it will convert your GIMP into Adobe Photoshop like settings.
However, if you installed GIMP via apt or snap or your distributions package manager, youll have to find the GIMP config folder and paste the content of the .var directory of PhotoGIMP. When asked, opt for merge option and replace existing files of the same name.
I [installed GIMP in Ubuntu 20.04 using apt][10]. The location for GIMP config file for me was ~/.config/GIMP/2.10. I copied the content of the .var/app/org.gimp.GIMP/config/GIMP/2.10 directory here and started GIMP to see the PhotoGIMP splash.
Heres the interface of GIMP after being patched by PhotoGIMP:
![][11]
I tried a couple of Photoshop keyboard shortcuts to check the changes it made and it seemed to be working.
[Download PhotoGIMP][12]
I also found [PhotoGIMP available as Snap package][13] but its from 2019, and I am not sure if it works everywhere or just with snap install.
**Conclusion**
This is not the first project of this kind. Some years ago, we had a similar project called Gimpshop. The Gimpshop project hasnt seen any development in past several years and it is safe to assume that the project is dead. There is a website in the name of Gimpshop but thats from imposters trying to cash in on Gimpshop name.
I am not an Adobe Photoshop user. I am not even a GIMP expert this is why the [GIMP tutorials][14] on Its FOSS are covered by Dimitrios.
For this reason, I cannot comment on how useful the PhotoGIMP project is. If you are familiar with both software, you should be able to judge it better than me.
If you try PhotoGIMP, do share your experience with it and let us know if it is worth the installation or not.
--------------------------------------------------------------------------------
via: https://itsfoss.com/photogimp/
作者:[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://www.adobe.com/in/products/photoshop.html
[2]: https://itsfoss.com/open-source-photoshop-alternatives/
[3]: https://www.gimp.org/
[4]: https://diolinux.com.br/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/photogimp-feature.jpg?ssl=1
[6]: https://github.com/Diolinux/PhotoGIMP
[7]: https://itsfoss.com/unzip-linux/
[8]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
[9]: https://flatpak.org/
[10]: https://itsfoss.com/gimp-2-10-release/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/photogimp-editor-interface.jpg?resize=800%2C538&ssl=1
[12]: https://github.com/Diolinux/PhotoGIMP/releases
[13]: https://snapcraft.io/photogimp
[14]: https://itsfoss.com/tag/gimp-tips/

View File

@ -0,0 +1,141 @@
[#]: collector: (lujun9972)
[#]: translator: (nophDog)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to know if you're ready to switch from Mac to Linux)
[#]: via: (https://opensource.com/article/20/6/mac-to-linux)
[#]: author: (Marko Saric https://opensource.com/users/markosaric)
如何确定你已经准备好从 Mac 切换到 Linux
======
在开源操作系统的帮助下Linux 可以帮你完成绝大部分你在 Mac 上能做的事情。
![Digital images of a computer desktop][1]
我[从 Mac 切换到 Linux][2] 已经两年了。在 Linux 之前,我用的一直是 Apple 系统,而且 2018 年我安装第一个发行版时,还只是一个纯粹的新手。
最近,我只用 Linux我可以用它完成任何任务。浏览网页、观看 Netflix 影片、写作以及编辑[博客][3],甚至还在上面跑我的[开源网页分析项目][4]。
我可不是开发者!但是很久以前,普通人根本无法轻松玩转 Linux。
最近关于 Mac 的讨论越来越多,许多人已经在考虑从 Mac 切换到 Linux。我打算分享一些切换过程中的经验帮助其它新手也能实现无痛转移。
### 你该不该换?
在换系统之前,最好想清楚,因为有时候 Linux 可能跟你预期不一样。如果你仍希望跟 Apple Watch 无缝配对、可以用 FaceTime 给朋友打电话、或者你想打开 iMovie 看视频,那最好还是不要换了。这些都是 Apple 的专利软件,你只能在 Apple 的『围墙花园』里面使用。如果离不开 Apple 的生态系统,那么 Linux 可能不太适合你。
我对 Apple 生态没有太多挂念,我不用 iPhone所以跟手机的协作没那么必要。我也不用 iCloud、FaceTime当然也包括 Siri。我早就对开源充满兴趣只是一直没有行动。
### 检查你的必备软件清单
我还在使用 Mac 的时候,就已经开始探索开源软件,我发现大部分在 Mac 上使用的软件,在 Linux 也可以运行。
怀念用火狐浏览网页吗?在 Linux 上它也可以运行。想用 VLC 看视频?它也有 Linux 版本。喜欢用 Audacity 录制、编辑音频?它正在 Linux 上等着你呢。你用 OBS Studio 直播?在 Linux 直接下载安装吧。一直用 Telegram 跟朋友和家人保持联系吗Linux 上当然少不了它。
此外Linux 不仅仅意味着开源软件。大部分(也可能所有)你最喜欢的非 Apple 专利软件,都能在 Linux 见到它们的身影。Spotify、Slack、Zoom、Stream、Discord、Skype、Chrome 以及很多闭源软件,都可以使用。而且,在你 Mac 浏览器里面运行的任何东西,同样能够运行在 Linux 浏览器。
你能在 Linux 找到你的必备软件,或者更好的替代品吗?请再三确认,做到有备无患。用你最常用的搜索引擎,在网上检索一下。搜索『软件名 + Linux』 或者 『软件名 + Linux 替代品』,然后再去 [Flathub][5] 网站查看你能在 Linux 用 Flatpak 安装的专利软件有哪些。
### 请牢记Linux 不等于 Mac
如果你希望能够从 Mac 轻松转移到 Linux我相信有一点很重要你需要保持包容的思想以及愿意学习新操作系统的心态。Linux 并不等于 Mac所以你需要给自己一些时间去接触并了解它。
如果你想让 Linux 用起来、看起来跟你习惯的 macOS 一模一样,那么 Linux 可能也不适合你。尽管你可以通过各种方法把 Linux 桌面环境打造得跟 macOS 相似,但我觉得要想成功转移到 Linux最好的办法是接受它。
试试新的工作流,该怎么用就怎么用。不要总想着把 Linux 变成其它东西。你会跟我一样,像享受 Mac 一样享受 Linux甚至能有更好的体验感。
还记得你第一次使用 Mac 吧;你肯定花了不少时间去习惯它的用法。那么请给 Linux 同样多的时间和关怀。
### 选择一个 Linux 发行版
有别于 Windows 和 macOSLinux 不止一个单一的操作系统。不同的 Linux 操作系统被称作发行版,开始使用 Linux 之后,我尝试过好几个不同的发行版。我也用过不同的桌面环境,或者图形界面。在美观度、易用性、工作流以及集成软件上,它们有很大差异。
尽管作为 Mac 的替代品,被提及最多的是 [ElementaryOS][6] 和 [Pop!_OS][7],但我仍建议从 [Fedora Workstation] 开始,理由如下:
- 使用 [Fedora Media Writer][9],容易安装
- 开箱即支持你所有的硬件
- 支持最新的 Linux 软件
- 运行原生无改动的 GNOME 桌面环境
- 有大型开发团队以及一个庞大的社区
在我看来,从易用性、连贯性、流畅性和来自 macOS 用户的用户体验来看,[GNOME][10] 是最好用的桌面环境。在 Linux 世界,它拥有大量开发资源和用户基数,所以你的使用体验会很好。
Fedora 可以为你打开一扇 Linux 的大门,当你适应之后,就可以开始探索各个发行版、桌面环境,甚至窗口管理器之类的玩意了。
### 熟悉 GNOME
GNOME 是 Fedora 和许多其它 Linux 发行版的默认窗口管理器。它最近的升级 [升级到 GNOME 3.36][11] 带来了 Mac 用户欣赏的现代设计。
一定要做好心理准备Linux、Fedora Workstation 和 GNOME 并不是 Apple 和 macOS。GNOME 非常干净、简单、现代,新颖。它不会分散你的注意力。它没有桌面图标。没有可见的 dock 栏。窗口上甚至没有最小化、最大化按钮。但是不要慌张。如果你去尝试,它会证明这是你用过最好、最有生产力的操作系统。
GNOME 不会给你带来困扰。启动之后,你唯一能看到的东西只有顶栏和背景图片。顶栏由这几样东西组成, **Activities** 在左边时间和日期在中间这也是你的通知栏中心右边是网络、蓝牙、VPN、声音、亮度、电池托盘图标之类的东西。
#### 为什么 GNOME 像 Mac
你会注意到一些跟 macOS 的相似性,例如窗口吸附,空格预览(用起来跟 Quick Look 一模一样)。
如果你把鼠标光标移动到左上角,点击顶栏的 **Activities**,或者按下键盘上 **Super** 键(也就是 Apple 键),你会看到 **Activities Overview**。Activities Overview 有点像 macOS 系统上 Mission Control 和 Spotlite Search 的结合体。它会在屏幕中间展示已打开软件和窗口的概览。在左手边,你可以看到 dock 栏,上面有你打开的软件和常用软件。所有打开的软件下面会有一个指示标志,在右手边,你可以看到不同的工作区。
在顶栏中间,有一个搜索框。只要你开始输入,焦点就会转移到搜索框。它能搜索你已经安装的软件和文件内容,在软件中心搜索指定的软件,作计算器,向你展示时间或者天气,当然它能做的还有很多。它就像 Spotlight 一样。只需要开始输入你要搜索的内容,然后按下 **Enter** 打开软件或者文件。
你能看到一列安装好的软件(更像 Mac 上的 Launchpad。点击 dock 栏 **Show Applications** 图标,或者按 **Super + A**
总体来说Linux 是一个轻量级的系统,即使在很老的硬件上也能跑得很顺畅,跟 macOS 比起来仅仅占用很少的磁盘空间。并且不像 macOS你可以删除任何你不想要或不需要的预装软件。
#### 自定义你的 GNOME 设置
浏览一下 GNOME 设置,熟悉它的选项,做一些更改,让它用起来更舒服。下面是一些我装好 GNOME 必须做的事情。
- 在 **Mouse Touchpad** 中,我禁用 natural scrolling、启用 tap-to-click。
- 在 **Display** 中,我打开 night light在晚上屏幕会让颜色变暖减少眼睛疲劳。
- 我安装 [**GNOME Tweaks**][12],因为它可以更改额外的设置选项。
- 在 Tweaks 中,我启用了 **Over-Amplification** 选项,这样就能获得更高的音量。
- 在 Tweaks 中,相比默认的亮色主题,我更喜欢 **Adwaita Dark** 主题。
#### 习惯使用键盘操作
GNOME 是以一个鼠标为中心的操作系统,所以尽量多使用键盘。在 GNOME 设置中的**键盘快捷键**部分,你可以找到很多不同的快捷键。
你也可以自定义键盘快捷键,来形成自己的工作流。我设置 **Super** 键设置成打开我必须使用的软件。比如说,**Super + B** 打开我的浏览器,**Super + F** 打开文件,**Super + T** 打开终端。我把 **Ctrl + Q** 设置成关闭窗口。
我使用 **Super + Tab** 切换软件,**Super + H** 隐藏一个窗口。**F11** 全屏打开软件。**Super + Left arrow** 把窗口吸附到屏幕左边。**Super + Right arrow** 把窗口吸附到屏幕左边。等等。
### 在 Mac 上尝试 Linux 之后再做决定
在完全安装 Linux 之前,在你的 Mac 上先尝试 Fedora。从 [Fefora's website][9] 下载 ISO 镜像。[Etcher][13] 能够帮你把 ISO 镜像写入 USB然后在启动时点击 **option** 选项,这样你就可以在 live 模式尝试了。
现在你已经可以随意探索 live 模式的 Fedora Workstation而不用在你的 Mac 上安装任何东西。试试不一样的东西,能否正常工作:能不能连接 WiFi触控板是否正常有没有声音等等。
也记得花时间尝试 GNOME。测试我上面提到的不同功能。打开一些安装好的软件。一切看起来都很还不错如果你喜欢这样的 Fedora Workstation 和 GNOME并且很肯定这就是你想要的那么把它安装到你的 Mac 吧。
尽情探索 Linux 世界吧!
* * *
_This article is an update of [How I switched from macOS to Linux after 15 years of Apple][2] originally published on Marko Saric's website._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/mac-to-linux
作者:[Marko Saric][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/nophDog)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/markosaric
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop)
[2]: https://markosaric.com/linux/
[3]: https://markosaric.com/how-start-blog/
[4]: https://plausible.io/open-source-website-analytics
[5]: https://flathub.org/apps
[6]: https://opensource.com/article/20/2/macbook-linux-elementary
[7]: https://support.system76.com/articles/pop-basics/
[8]: https://getfedora.org/
[9]: https://getfedora.org/en/workstation/download/
[10]: https://www.gnome.org/
[11]: https://www.gnome.org/news/2020/03/gnome-3-36-released/
[12]: https://wiki.gnome.org/Apps/Tweaks
[13]: https://www.balena.io/etcher/

View File

@ -0,0 +1,172 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Ubuntu MATE 20.04 LTS Review: Better Than Ever)
[#]: via: (https://itsfoss.com/ubuntu-mate-20-04-review/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Ubuntu MATE 20.04 LTS 评论:比以往任何时候都要好(士别三日,当刮目相待)
======
Ubuntu MATE 20.04 LTS 无疑是最流行的 [ Ubuntu 官方特色版本 ][1]之一。
不仅仅是我,[Ubuntu 20.04 调查结果][2] 也指出相同的问题。不管流行与否,它的确是一个令人印象深刻的 Linux 发行版,尤其是其所针对较旧的硬件 。事实上,它也是可获得的 [最轻量的 Linux 发行版][3] 之一。
所以,我想在一个虚拟机中尝试它一会儿,来为你提供一个可以从中有所期盼的概述。和它是否值得尝试。
### 在 Ubuntu MATE 20.04 LTS 中有什么新功能 ?
[更多 Linux 视频请订阅我们的 YouTube 频道][4]
在 Ubuntu MATE 20.04 LTS 上的主要亮点应该是 MATE Desktop 1.24 的添加。
你可以期待的 MATE Desktop 1.24 的所有的新特色都被打包到 Ubuntu MATE 20.04 中。除此之外,这里有很多显著的变化,改善和增补。
这里是在 Ubuntu MATE 20.04 中所做更改的概述:
* 添加 MATE Desktop 1.24
* 大量可视改善
* 修复几十个错误
* 基于 [Linux Kernel 5.4][5] 系列
* 添加实验性 [ZFS][6] 支持
* 添加来自 [Feral Interactive][7] 的 GameMode
* 一些软件包更新
现在,为了更好地了解 Ubuntu MATE 20.04 ,我将给你更多的详细信息。
### 用户体验改善
![][8]
考虑到越来越多的用户倾向于桌面 Linux ,用户体验在其中起着至关重要的作用。
如果它是一个易于使用和讨好眼睛的东西,这将使第一印象有所不同。
随着 Ubuntu MATE 20.04 LTS 的发布,我没有失望, 就我个人而言,我是最新版 [GNOME 3.36][9] 的粉丝。我喜欢在我 [Pop OS 20.04][10] 上使用它,但是随着 [MATE 1.24][11] 的出现,它使 Ubuntu MATE 也有一个很好的体验。
你将看到窗口管理器的一些重大更改,包括 **不可见的重新调整边框大小**, **在 HiDPI 中图标渲染**, **重新设计 ALT+TAB 工作区切换弹出窗口** 和一些其它的更改, 这作为最新的 MATE 1.24 desktop 的一部分出现.
![][12]
此外, **MATE Tweak** 也获得一些惹人喜爱的改善,在其中,即使你更改桌面的布局,你也可以保留用户的首选项。新的 **MATE 欢迎屏幕** 也会告知用户更改桌面布局的能力,因此,他们不需要不断摸索来了解它。
此外,我最喜欢的附加功能之一是 **最小化应用程序预览功能**
例如,你已经最小化了一个应用程序,但是你想在启动它之前获得它的预览- 现在您只需将鼠标悬停在任务栏上就可以做到这一点,如下图所示。
![][13]
现在,我必需指出,并不是每个应用程序都如所预期的那样工作。因此,我还要说一句 **这个功能有缺陷,需要改进**
### 应用程序新增或升级
![][14]
随着 MATE 20.04 的到来,你将注意到一个新的 **固件更新器** ,它是 [fwupd][15] 的一个 GTK 前端。你可以使用这个更新器来轻松地管理你的驱动器。
这个发布版本也 **使用 Evolution 替换了 Thunderbird** 电子邮件客户端。尽管 [Thunderbird][16] 是一个非常流行的电子邮件客户端,但是 [Evolution][17] 与 MATE desktop 集成得更好,并且结果是更有用。
![][18]
考虑到我们已经有公开的 MATE 1.24 ,你也将发现一个 **新的时间和日期管理应用程序** 。不仅如此,如果你需要一个放大镜, [Magnus][19] 与 Ubuntu MATE 20.04 一起新鲜出炉。
![][20]
Ubuntu MATE 20.04 也包括对预先安装的众多软件包/应用程序的升级。
![][21]
尽管这些是小的增补 但是这在很大程度上帮助发行版更有用。
### Linux Kernel 5.4
Ubuntu MATE 20.04 运行 2019 年最新的主要的稳定内核版本,即 [Linux Kernel 5.4][5]。
使用该内核版本,你将获得本机的 [exFAT 支持][22] ,和改善硬件的支持。更不用说,拥有 [WireGuard][23] VPN 的支持也是一件极好的事。
所以,你将注意到 Linux Kernel 5.4 的众多好处,包括内核锁定功能。如果你好奇,你可以阅读我们关于 [Linux Kernel 5.4][5] 的新闻报道,以获取更多关于它的详细内容。
### 通过 Feral Interactive 添加 GameMode
Feral Interactive 以将游戏带到 Linux 平台而闻名,带来了一个有用的命令行工具,即 [GameMode][7] 。
你将不会得到一个 GUI 但是在启动一个游戏前,你可以使用命令行请求临时性的系统优化。
虽然这可能不对每个系统都产生太大影响但是它能够有更多的游戏资源GameMode 将确保你获得必要的优化。
### 实验性 ZFS 安装选项
你获得 ZFS 对你的 root 文件系统的支持。值得注意的是,它是一个实验性的功能,如果你不确定自己在做什么,那么就不应该使用它。
为了更好地了解 ZFS ,我建议你阅读我们的一篇文章,[John Paul][24] 所写的 [ZFS 是什么][6] 的文章.
### 性能和其它的改进
Ubuntu MATE 是十分适合于轻量级发行版,并且也适合现代桌面环境。
![][25]
在这种情况下。我没有运行任何特殊的基准测试工具 - 但对于普通用户来说,我没有发现任何在虚拟机设置中的性能问题。我在一个使用一颗 i5-7400 处理器、一个 GTX 1050 显卡和 16 GB 的内存条上的主机系统上测试它。并且,如果有帮忙的话,将 7 GB 的 RAM + 768 MB 的显卡 + 2 核心的处理器分配给虚拟机。
![][26]
当你自己测试它的时候,请随时告诉我你对它的感觉如何。
总的来说,除了所有的主要改进,在各处的细微的改变/修复/改进,使得 Ubuntu MATE 20.04 LTS 做出了很好的升级。
### 我应该升级吗?
如果你正在运行 Ubuntu MATE 19.10,你应该立即升级它,因为它的支持将在 **2020年6月** 结束。
对于 Ubuntu MATE 18.04 用户(**支持到2021年4月**) 来说 这取决于你从事的工作。如果你需要最新发布版本的特色功能,你可以选择立即更新它。
但是,如果你不需要新的东西,你可以浏览 [现存错误列表][27] 并加入 [Ubuntu MATE 社区][28] 来知道更多关于最新发布版本的问题。
在你做完必要的研究后,你可以继续升级你的系统到 Ubuntu MATE 20.04 LTS ,它将被 **支持到2013年4月**
_**你试过最新的 Ubuntu MATE 20.04 吗?你认为它怎么样?在评论中让我知道你的想法。**_
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-mate-20-04-review/
作者:[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://itsfoss.com/which-ubuntu-install/
[2]: https://ubuntu.com/blog/ubuntu-20-04-survey-results
[3]: https://itsfoss.com/lightweight-linux-beginners/
[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
[5]: https://itsfoss.com/linux-kernel-5-4/
[6]: https://itsfoss.com/what-is-zfs/
[7]: https://github.com/FeralInteractive/gamemode
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-20-04.jpg?ssl=1
[9]: https://itsfoss.com/gnome-3-36-release/
[10]: https://itsfoss.com/pop-os-20-04-review/
[11]: https://mate-desktop.org/blog/2020-02-10-mate-1-24-released/
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-desktop-layout.png?ssl=1
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-minimized-app.png?ssl=1
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-20-04-firmware.png?ssl=1
[15]: https://fwupd.org
[16]: https://www.thunderbird.net/en-US/
[17]: https://wiki.gnome.org/Apps/Evolution
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-evolution.png?ssl=1
[19]: https://kryogenix.org/code/magnus/
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-magnus.jpg?ssl=1
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-apps.png?ssl=1
[22]: https://cloudblogs.microsoft.com/opensource/2019/08/28/exfat-linux-kernel/
[23]: https://wiki.ubuntu.com/WireGuard
[24]: https://itsfoss.com/author/john/
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-system-reosource.jpg?ssl=1
[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-mate-focal-neofetch.png?ssl=1
[27]: https://bugs.launchpad.net/ubuntu-mate
[28]: https://ubuntu-mate.community/

View File

@ -0,0 +1,158 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to use Bash history commands)
[#]: via: (https://opensource.com/article/20/6/bash-history-commands)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
如何使用 Bash history 命令
======
Bash 的 history 命令超过了所有其他 Linux Shell history 接口提供的功能数量。
![Person typing on a 1980's computer][1]
Bash 有丰富的历史。 也就是说,它是一个久远的 shellBourne shell但是它还有一个很棒的 `history` 命令,它的功能数量超过了所有其他 shell 的 history 接口。 [Bash][2]版本的 `history` 可进行反向搜索、快速调用、重写历史记录等。
`history` 命令与许多其他命令不同。 你可能习惯于将命令作为可执行文件放在常见的系统级位置,例如 `/usr/bin`、`/usr/local/bin` 或者 `~/bin`。 内置的 `history` 命令不在你的 `PATH` 中并且没有物理位置:
```
$ which history
which: no history in [PATH]
```
相反,`history` 是 shell 本身的内置函数:
```
$ type history
history is a shell builtin
$ help history
history: history [-c] [-d offset] [n] or
history -anrw [filename] or
history -ps arg [arg...]
Display or manipulate the history list.
[...]
```
因此,每个 shell 中的历史功能都是唯一的,因此你在 Bash 中使用的内容可能无法在 Tcsh 或 Fish 或 Dash 中使用,而在这些 shell 中使用的内容可能也无法在 Bash 中使用。在某些情况下,了解 Bash 可以做什么可能会激发其他 shell 的用户创建有趣的改造来复制 Bash 行为,并且可能会解锁你从未知道的 Bash 功能。
### 查看你的 Bash 历史
`history` 命令最基本,最频繁的用法是查看 shell 会话的历史记录:
```
$ echo "hello"
hello
$ echo "world"
world
$ history
  1  echo "hello"
  2  echo "world"
  3  history
```
### 事件指示器
事件指示器 Event designator 按事件搜索你的历史记录。在这里_事件_ enent 是记录在历史中的命令,以换行符表示。换句话说,它是一行,以索引号来标记。
事件指示器大多以感叹号开头,有时也称为 _bang_`!`)。
要从你的历史记录中重新运行命令,请使用感叹号,之后紧跟(无空格)所需命令的索引号。例如,假设第 1 行包含命令 `echo "hello"`,你想要想再次运行它:
```
$ !1
echo "hello"
hello
```
你可以在 history 中使用基于你当前位置的负数行号进行相对定位。例如,返回到倒数第三个条目:
```
$ echo "foo"
foo
$ echo "bar"
bar
$ echo "baz"
baz
$ !-3
echo "foo"
foo
```
如果只想回去一行,那么可以使用速记 `!!` 代替 `!-1`。这节省了按键时间!
```
$ echo "foo"
$ !!
echo "foo"
foo
```
### 字符串搜索
你也可以反过来通过条目搜索特定的字符串来运行命令。要搜索以指定字符串_开始_的命令请使用感叹号之后紧跟无空格要搜索的字符串
```
$ echo "foo"
$ true
$ false
$ !echo
echo "foo"
foo
```
你还可以搜索在任意位置(不仅是开头)包含该字符串的命令。为此,请像之前一样使用 `!` 加上要搜索的字符串,但在字符串的两端都用问号围绕起来。如果你知道该字符串后紧跟一个换行符,那么可以省略最后的问号(就是在按**回车**之前输入的最后字符):
```
$ echo "foo"
$ true
$ false
$ !?foo?
echo "foo"
foo
```
### 字符串替换
类似于在行首搜索字符串,你可以搜索字符串并用新字符串替换它,更改命令:
```
$ echo "hello"
hello
$ echo "world"
world
$ ^hello^foo
echo "foo"
foo
```
### 让 history 有用
在 Bash 中history 命令的功能远远超过此处介绍的内容但这是让你习惯_使用_ history 而不仅仅是作为参考的良好起点。 经常使用 `history` 命令,并试试无需输入命令即可执行的操作。 你可能会感到惊讶!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/bash-history-commands
作者:[Seth Kenlon][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://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: https://opensource.com/resources/what-bash