mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
5438c89035
@ -0,0 +1,263 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (nophDog)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12358-1.html)
|
||||
[#]: subject: (Make the switch from Mac to Linux easier with Homebrew)
|
||||
[#]: via: (https://opensource.com/article/20/6/homebrew-linux)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
Homebrew 让你从 Mac 切换到 Linux 更轻松
|
||||
======
|
||||
|
||||
> 不管你是想要更舒服地从 Mac 搬到 Linux,还是不满意常规的 Linux 包管理器,都可以试试 Homebrew。
|
||||
|
||||

|
||||
|
||||
[Homebrew][2] 项目最初是为了给 Mac 用户提供一个非官方的 Linux 式的包管理器。用户很快就爱上了它友好的界面以及帮助性的提示,而且,它已经被移植到 Linux 系统 —— 这看起来像是一个奇怪的命运转折。
|
||||
|
||||
一开始,有两个分开的项目分别针对 macOS 和 Linux (Homebrew 与 Linuxbrew),但是现在是由 Homebrew 核心管理着这两个操作系统。由于我正 [从 Mac 切换到 Linux][3],所以一直在研究我在 macOS 最常用的开源软件在 Linux 表现如何,最终,我很高兴地发现 Homebrew 对 Linux 的支持太赞了!
|
||||
|
||||
### 为什么要在 Linux 使用 Homebrew 呢?
|
||||
|
||||
长期使用 Linux 的用户对 Homebrew 的第一反应是:“为什么不直接使用……呢”,省略号代表他们喜欢的某个 Linux 包管理器。基于 Debian 的系统早就有了 `apt`,基于 Fedora 的系统则有 `dnf` 和 `yum`,并且像 Flatpak 跟 AppImage 这样的项目,在两种系统上都能流畅运行。我花了不少时间尝试这些技术,不得不说,它们都有其强大之处。
|
||||
|
||||
那我为什么还要 [坚持使用 Homebrew][4] 呢?首先,我对它非常熟悉。在为我过去使用的专有软件寻找开源替代品的过程中,我已经学会了许多使用方法,而保持一些熟悉的东西,比如 Homebrew,可以让我专注于一次学习一件事情,而不是被不同系统间的差异搞垮。
|
||||
|
||||
此外,我没有看到哪一个包管理器像 Homebrew 一样,对用户如此友好。正如默认的帮助命令一样,命令井然有序:
|
||||
|
||||
```
|
||||
$ brew -h
|
||||
Example usage:
|
||||
brew search [TEXT|/REGEX/]
|
||||
brew info [FORMULA...]
|
||||
brew install FORMULA...
|
||||
brew update
|
||||
brew upgrade [FORMULA...]
|
||||
brew uninstall FORMULA...
|
||||
brew list [FORMULA...]
|
||||
|
||||
Troubleshooting:
|
||||
brew config
|
||||
brew doctor
|
||||
brew install --verbose --debug FORMULA
|
||||
|
||||
Contributing:
|
||||
brew create [URL [--no-fetch]]
|
||||
brew edit [FORMULA...]
|
||||
|
||||
Further help:
|
||||
brew commands
|
||||
brew help [COMMAND]
|
||||
man brew
|
||||
<https://docs.brew.sh>
|
||||
```
|
||||
|
||||
过于简短的输出可能会被误解为它功能局限,但是你简单看看每一个子命令,都有很丰富的功能。虽然上面的列表只有短短 23 行,但对高级用户来说,光是子命令 `install` 就包含整整 79 行的帮助信息:
|
||||
|
||||
```
|
||||
$ brew --help | wc -l
|
||||
23
|
||||
$ brew install --help | wc -l
|
||||
79
|
||||
```
|
||||
|
||||
它可以选择忽略或者安装依赖关系,也可以选择用源代码编译以及用什么编译器来编译某个确切的上游 Git 提交,或者选择应用的官方 “灌装” 版。总而言之,Homebrew 即适合新手,也同样能满足老鸟。
|
||||
|
||||
### 开始在 Linux 使用 Homebrew
|
||||
|
||||
如果你想要试着使用 Homebrew,可以用这个单行脚本在 Mac 或者 Linux 上进行安装:
|
||||
|
||||
```
|
||||
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
```
|
||||
|
||||
这条命令会立即开始安装 Homebrew。如果你比较谨慎,可以使用 `curl` 将该文件下载到本地,检查完毕之后再运行。
|
||||
|
||||
```
|
||||
$ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh --output homebrew_installer.sh
|
||||
$ more homebrew_installer.sh # 审核该脚本,直到你觉得没问题了
|
||||
$ bash homebrew_installer.sh
|
||||
```
|
||||
|
||||
对 Linux 的安装步骤还包括如何配置点文件,对于 Debian 系统来说是 `~/.profile`,对于 Fedora 系统是 `~/.bash_profile`。
|
||||
|
||||
```
|
||||
$ test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
$ test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
|
||||
$ echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
|
||||
```
|
||||
|
||||
为了确认已经安装好,Homebrew 团队提供一个空的 `hello` “秘方” 供测试:
|
||||
|
||||
```
|
||||
$ brew install hello
|
||||
==> Downloading https://linuxbrew.bintray.com/bottles/hello-2.10.x86_64_linux.bottle.tar.gz
|
||||
######################################################################## 100.0%
|
||||
==> Pouring hello-2.10.x86_64_linux.bottle.tar.gz
|
||||
🍺 /home/linuxbrew/.linuxbrew/Cellar/hello/2.10: 52 files, 595.6KB
|
||||
```
|
||||
|
||||
看起来安装毫无问题,让我来试试更多操作。
|
||||
|
||||
### 命令行工具 Brew
|
||||
|
||||
Homebrew 宣称自己是一款默认只 “安装你需要而 [Linux] 没有的东西”的应用程序。
|
||||
|
||||
你可以用 `brew` 命令安装任何打包在 Homebrew 中的命令行软件。这些包的定义文件叫做 “<ruby>秘方<rt>formula</rt></ruby>”,而且它们通过“<ruby>瓶子<rt>bottle</rt></ruby>”来编译并分享。在 Homebrew 的世界里,还有许多 “啤酒方面” 的术语,但这个包管理器主要目的是让软件便于使用。
|
||||
|
||||
都有些什么样的软件呢?对我这样的技术玩家(既然你已经在读这篇文章,估计你也是)来说最方便的东西。例如,便利的 `tree` 命令,可以展示目录结构,或者 `pyenv`,我用它来 [在 Mac 管理不同版本 Python][5]。
|
||||
|
||||
你可以用 `search` 命令查看所有可以安装的“秘方”,在后面加上 `wc` 命令看看一共有多少:
|
||||
|
||||
```
|
||||
# -l 选项统计行数
|
||||
$ brew search | wc -l
|
||||
5087
|
||||
```
|
||||
|
||||
迄今为止,一共有 5000 多个 “秘方”,这囊括了很多软件。需要注意的是:并非所有 “秘方” 都能在 Linux 运行。在 `brew search --help` 输出中有一节提到可以按软件运行的操作系统来筛选软件。它会在浏览器打开用于每个操作系统的软件仓库。我运行的是 Fedora,所以我会用它来试一试:
|
||||
|
||||
```
|
||||
$ brew search --fedora tree
|
||||
```
|
||||
|
||||
浏览器打开了网址 `https://apps.fedoraproject.org/packages/s/tree`,向我展示了所有 Fedora 的可用选项。你也可以通过其它方法进行浏览。“秘方” 被集中整理到由操作系统划分的核心仓库当中(Mac 在 [Homebrew Core][6],Linux 在 [Linux Core][7])。同样也可以通过 Homebrew API [在网页显示][8]。
|
||||
|
||||
即使有这些选择,我还是通过其它用户的推荐找到很多新工具。我列出一些我最喜欢的工具,你可以在里面找点灵感:
|
||||
|
||||
* `pyenv`、`rbenv` 和 `nodenv` 用来管理(相应的) Python、Ruby 和 Node.js 版本
|
||||
* `imagemagick` 用于脚本化编辑图片
|
||||
* `pandoc` 用于脚本化转换文档格式(我通常将 .docx 文件转成 .md 或者 .html)
|
||||
* `hub` 为 GitHub 用户提供 [更好的 Git 体验][9]
|
||||
* `tldr` 展示了命令工具的使用范例
|
||||
|
||||
想要深入了解 Homebrew,可以去 [trldr 页面][10] 看看,比起应用的 man 页面,它要友好得多。使用 `search` 命令确认你可以安装:
|
||||
|
||||
```
|
||||
$ brew search tldr
|
||||
==> Formulae
|
||||
tldr ✔
|
||||
```
|
||||
|
||||
太好了!对勾说明你可以安装。那么继续吧:
|
||||
|
||||
```
|
||||
$ brew install tldr
|
||||
==> Downloading https://linuxbrew.bintray.com/bottles/tldr-1.3.0_2.x86_64_linux.bottle.1.tar.gz
|
||||
######################################################################## 100.0%
|
||||
==> Pouring tldr-1.3.0_2.x86_64_linux.bottle.1.tar.gz
|
||||
🍺 /home/linuxbrew/.linuxbrew/Cellar/tldr/1.3.0_2: 6 files, 63.2KB
|
||||
```
|
||||
|
||||
Homebrew 提供了编译好的二进制文件,所以你不必在本地机器上从源码编译。这能节省很多时间,也不用听 CPU 风扇的噪声。我很欣赏 Homebrew 的另外一点是,你不完全理解每一个选项的含义也不会影响正常使用。若你想自己编译,可以在 `brew install` 命令后面加上 `-s` 或者 `--build-from-source` 标识,这样就能从源码编译 “秘方”(即便已经有一个 “瓶子” 存在)。
|
||||
|
||||
同样,软件底层的复杂性也很有意思。使用 `info` 可以查看 `tldr` 软件的依赖管理,“秘方” 的源代码存放在磁盘上的何处,甚至还能查看公开分析。
|
||||
|
||||
```
|
||||
$ brew info tldr
|
||||
tldr: stable 1.3.0 (bottled), HEAD
|
||||
Simplified and community-driven man pages
|
||||
https://tldr.sh/
|
||||
Conflicts with:
|
||||
tealdeer (because both install `tldr` binaries)
|
||||
/home/linuxbrew/.linuxbrew/Cellar/tldr/1.3.0_2 (6 files, 63.2KB) *
|
||||
Poured from bottle on 2020-06-08 at 15:56:15
|
||||
From: https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/tldr.rb
|
||||
==> Dependencies
|
||||
Build: pkg-config ✔
|
||||
Required: libzip ✔, curl ✔
|
||||
==> Options
|
||||
--HEAD
|
||||
Install HEAD version
|
||||
==> Analytics
|
||||
install: 197 (30 days), 647 (90 days), 1,546 (365 days)
|
||||
install-on-request: 197 (30 days), 646 (90 days), 1,546 (365 days)
|
||||
build-error: 0 (30 days)
|
||||
```
|
||||
|
||||
### 从 Mac 到 Linux 的一点不足
|
||||
|
||||
在 macOS,Homebrew 的 `cask`(“酒桶”)子命令可以让用户使用命令行安装、管理整个应用软件。不幸的是,`cask` 还不能在任何 Linux 发行版上使用。我在安装一个开源工具时发现了这点:
|
||||
|
||||
```
|
||||
$ brew cask install tusk
|
||||
Error: Installing casks is supported only on macOS
|
||||
```
|
||||
|
||||
我在 [论坛上][11] 问了一下,很快得到其他用户的反馈。总结一下,方案如下:
|
||||
|
||||
* 复刻 Homebrew 项目,构建这个特性,然后像别人展示其价值
|
||||
* 给该软件写一个 “秘方”,然后从源代码编译
|
||||
* 为该软件创建一个第三方仓库
|
||||
|
||||
最后一个是我最感兴趣的。Homebrew 通过 [创建并维护 “<ruby>水龙头<rt>tap</rt></ruby>”][12] (另一个受啤酒影响的术语)管理第三方仓库。随着你对系统越来越熟悉,并想加入生态系统, “水龙头” 是值得研究的。
|
||||
|
||||
### 备份 Homebrew 的安装记录
|
||||
|
||||
我最中意的 Homebrew 特性之一就是你可以像其它任何 [用版本控制工具来备份点文件][13] 一样备份你的安装记录。为了实现这个目的,Homebrew 提供 `bundle`(“捆扎”)子命令,它可以控制一个叫 `dump`(“倾倒”)的子命令生成一个 `Brewfile`。这个文件包含你目前所有安装的工具列表,可以重复使用。进入你想使用的目录然后运行命令,它会根据你所安装的软件生成 `Brewfile`:
|
||||
|
||||
```
|
||||
$ cd ~/Development/dotfiles # This is my dotfile folder
|
||||
$ brew bundle dump
|
||||
$ ls Brewfile
|
||||
Brewfile
|
||||
```
|
||||
|
||||
当我换了一台机器,想要安装一样的软件时,进入含有 `Brewfile` 的文件夹,然后重新安装:
|
||||
|
||||
```
|
||||
$ ls Brewfile
|
||||
Brewfile
|
||||
$ brew bundle
|
||||
```
|
||||
|
||||
它会在我的新机器上安装所有列出的 “秘方”。
|
||||
|
||||
#### 在 Mac 和 Linux 同时管理 Brewfile
|
||||
|
||||
`Brewfile` 非常适合备份你目前的安装记录,但是如果某些在 Mac 上运行的软件无法运行在 Linux 呢?或者刚好相反?我发现不管是 Mac 还是 Linux,如果软件无法在当前操作系统运行,Homebrew 会优雅地忽略那一行。如果它遇到不兼容的请求(比如使用 `brew` 在 Linux 安装 “<ruby>酒桶<rt>cask</rt></ruby>” 时),它会选择跳过,继续安装过程:
|
||||
|
||||
```
|
||||
$ brew bundle --file=Brewfile.example
|
||||
|
||||
Skipping cask licecap (on Linux)
|
||||
Skipping cask macdown (on Linux)
|
||||
Installing fish
|
||||
Homebrew Bundle complete! 1 Brewfile dependency now installed.
|
||||
```
|
||||
|
||||
为了保持配置文件的简洁,我在两个操作系统上使用同一份 `Brewfile`,因为它只安装与操作系统相关的版本,所以我一直没有遇到任何问题。
|
||||
|
||||
### 使用 Homebrew 管理软件包
|
||||
|
||||
Homebrew 已经成了我必备的命令行工具,由于我很熟悉它,所以在 Linux 上的体验也充满乐趣。Homebrew 让我的工具井然有序,并且时刻保持更新,我愈发欣赏它在实用性与功能上找到的平衡点。我更喜欢将软件包管理的细节保持在用户需要了解的最小程度,大多数人都会从中受益。如果你已经很熟悉 Linux 包管理器了,Homebrew 可能会让你觉得很基础,但稍微深入一点看,就会发现它的高级选项远远超过本文的内容。
|
||||
|
||||
对 Linux 用户来说,他们有很多包管理器可以选择。如果你来自 MacOS,Homebrew 会让你宾至如归。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/6/homebrew-linux
|
||||
|
||||
作者:[Matthew Broberg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[nophDog](https://github.com/nophDog)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop)
|
||||
[2]: https://brew.sh/
|
||||
[3]: https://opensource.com/article/19/10/why-switch-mac-linux
|
||||
[4]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[5]: https://opensource.com/article/20/4/pyenv
|
||||
[6]: https://github.com/Homebrew/homebrew-core
|
||||
[7]: https://github.com/Homebrew/linuxbrew-core
|
||||
[8]: https://formulae.brew.sh/formula/
|
||||
[9]: https://opensource.com/article/20/3/github-hub
|
||||
[10]: https://github.com/tldr-pages/tldr
|
||||
[11]: https://discourse.brew.sh/t/add-linux-support-to-existing-cask/5766
|
||||
[12]: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
|
||||
[13]: https://opensource.com/article/19/3/move-your-dotfiles-version-control
|
@ -0,0 +1,112 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Mint 20 is Officially Available Now! The Performance and Visual Improvements Make it an Exciting New Release)
|
||||
[#]: via: (https://itsfoss.com/linux-mint-20-download/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Linux Mint 20 is Officially Available Now! The Performance and Visual Improvements Make it an Exciting New Release
|
||||
======
|
||||
|
||||
Linux Mint 20 “Ulyana” is finally released and available to download.
|
||||
|
||||
Linux Mint 19 was based on Ubuntu 18.04 LTS and [Mint 20][1] is based on [Ubuntu 20.04 LTS][2] — so you will find a lot of things different, improved, and potentially better.
|
||||
|
||||
Now that it’s here, let’s take a look at its new features, where to download it, and how to upgrade your system.
|
||||
|
||||
### Linux Mint 20: What’s New?
|
||||
|
||||
We have made a video about the initial visual impressions on Linux Mint 20 to give you a better idea:
|
||||
|
||||
[Subscribe to our YouTube channel for more Linux videos][3]
|
||||
|
||||
There’s a lot of things to talk about when it comes to Linux Mint 20 release. While we have already covered the new key [features in Linux Mint 20][1], I’ll mention a few points here for a quick glance:
|
||||
|
||||
* Performance improvements in Nemo file manager for thumbnail generation
|
||||
* Some re-worked color themes
|
||||
* Linux Mint 20 will forbid APT from using Snapd
|
||||
* A new GUI tool to share files using the local network
|
||||
* Improved multi-monitor support
|
||||
* Improved hybrid graphics support for laptops
|
||||
* No 32-bit releases anymore
|
||||
|
||||
|
||||
|
||||
In addition to all these changes, you will also notice some visual changes with Cinnamon 4.6 desktop update.
|
||||
|
||||
Here are some screenshots of Linux Mint 20 Cinnamon edition. Click on the images to see in full screen.
|
||||
|
||||
![Mint 20 Welcome Screen][4]
|
||||
|
||||
![Mint 20 Color Themes][5]
|
||||
|
||||
![Mint 20 Nemo File Manager][6]
|
||||
|
||||
![Mint 20 Nemo File Manager Blue Color Theme][7]
|
||||
|
||||
![Mint 20 Wallpapers][8]
|
||||
|
||||
![Mint 20 Redesigned Gdebi Installer][9]
|
||||
|
||||
![Mint 20 Warpinator Tool for Sharing Files on Local Network][10]
|
||||
|
||||
![Mint 20 Terminal][11]
|
||||
|
||||
### Upgrading to Linux Mint 20: What you need to know
|
||||
|
||||
If you are already using Linux Mint, you may have the option to upgrade to Linux Mint 20.
|
||||
|
||||
* If you are using Linux Mint 20 beta version, you can upgrade to Mint 20 stable version.
|
||||
* If you’re using Linux Mint 19.3 (which is the latest iteration of Mint 19), you can upgrade your system to Linux Mint 20 without needing to perform a clean installation.
|
||||
* There is no 32-bit version of Linux Mint 20. If you are **using 32-bit Mint 19 series, you won’t be able to upgrade to Mint 20**.
|
||||
* If you are using Linux Mint 18 series, you’ll have to upgrade through Mint 19 series first. A fresh install of Mint 20 would be less time-consuming and troublesome in my opinion.
|
||||
* If you are using Linux Mint 17, 16, 15 or lower, you must not use them anymore. These versions are not supported anymore.
|
||||
|
||||
|
||||
|
||||
It’s FOSS has a detailed guide showing the steps to [upgrade Linux Mint version][12] from 18.3 to 19. I am guessing the steps should be the same for Mint 20 as well. It’s FOSS team will be doing some tests for Mint 19.3 to Mint 20 upgrade and update this guide as applicable.
|
||||
|
||||
Before you go on upgrading make sure to backup your data and [create system snapshots using Timeshift][13].
|
||||
|
||||
### Download Linux Mint 20
|
||||
|
||||
You can simply head on to its official download page and grab the latest stable ISO for yourself. You’ll find the ISO for the officially supported desktop environments, i.e. Cinnamon, MATE and Xfce.
|
||||
|
||||
Torrent links are also available for those who have slow or inconsistent internet connection.
|
||||
|
||||
[Download Linux Mint 20][14]
|
||||
|
||||
If you just want to try it out without replacing your main system, I suggest [installing Linux Mint 20 in VirtualBox][15] first and see if this is something you would like.
|
||||
|
||||
Have you tried Linux Mint 20 yet? What do you think about the release? Let me know your thoughts in the comments section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/linux-mint-20-download/
|
||||
|
||||
作者:[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/linux-mint-20/
|
||||
[2]: https://itsfoss.com/download-ubuntu-20-04/
|
||||
[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-welcome-screen.png?fit=800%2C397&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-color-themes.png?fit=800%2C396&ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-nemo-file-manager.png?fit=800%2C397&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-nemo-file-manager-blue-color-theme.png?fit=800%2C450&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-wallpapers.png?fit=800%2C450&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-redesigned-gdebi-installer.png?fit=800%2C582&ssl=1
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-warpinator.png?fit=800%2C397&ssl=1
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/mint-20-terminal.png?fit=800%2C540&ssl=1
|
||||
[12]: https://itsfoss.com/upgrade-linux-mint-version/
|
||||
[13]: https://itsfoss.com/backup-restore-linux-timeshift/
|
||||
[14]: https://linuxmint.com/download.php
|
||||
[15]: https://itsfoss.com/install-linux-mint-in-virtualbox/
|
@ -1,107 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: 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, you’ll 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 don’t 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. Let’s 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]. You’ll 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 don’t 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 distribution’s package manager, you’ll 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.
|
||||
|
||||
Here’s 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 hasn’t 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 that’s 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 It’s 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/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,50 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (An open source browser extension to zoom in on images)
|
||||
[#]: via: (https://opensource.com/article/20/6/hoverzoom)
|
||||
[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas)
|
||||
|
||||
An open source browser extension to zoom in on images
|
||||
======
|
||||
Taking a closer look at web images isn't always straightforward, but
|
||||
Hover Zoom+ makes it as easy as a slide of your mouse.
|
||||
![Digital images of a computer desktop][1]
|
||||
|
||||
Have you ever visited a website and wanted to see the images displayed larger? That happens to me all the time, and it isn't always easy to make that happen.
|
||||
|
||||
On occasion, I sift through the source code, use **Ctrl + F** to search for the image, copy the image source address and paste it into a new window in order to see the image at its full-size glory. Or, the other option is to right-click, copy the image address, and paste into a new tab.
|
||||
|
||||
![Example image source code ][2]
|
||||
|
||||
Hover Zoom+ makes this a much simpler process. Issued under the MIT license, Hover Zoom+ is a simple Chrome extension available at the Chrome Store, and the source code is available on [GitHub.][3] It is also available for Firefox.
|
||||
|
||||
This app makes that process much easier. By simply hovering over an image, you will see a pop-up show the image in its entirety, fit to your browser window, whether it is cropped or not (or if the image was placed, sized to fit, it will look the same). This can be interesting, as sometimes, the original image may have been cropped, either to fit the space or to focus on a specific part of the image. You cannot right-click and save the image directly from the pop-up, however.
|
||||
|
||||
According to San Jose, California-based developer Oleg Anashkin, "This is an open source version of the original HoverZoom extension, which is now overrun by malware and deleted from the store. In this version, all spyware has been removed, many bugs were fixed, and new features were added. It doesn't collect any statistics by default."
|
||||
|
||||
I installed the extension in Chrome on my Windows 10 laptop and took it for a spin. With the extension installed, I simply hovered over an image, and it displayed larger-than-life in a pop-up window.
|
||||
|
||||
However, Hover Zoom+ does not work on all websites or for all images. It works great for Facebook and Twitter, but not for sponsored content on those sites. The user can easily toggle the app to enable or disable it for specific sites. It was easy to see the entire Instagram screenshot of this cute kitten by using Hover Zoom+ without having to actually read the post (convenient!):
|
||||
|
||||
![Zoomed-in image of a kitten from Facebook][4]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/6/hoverzoom
|
||||
|
||||
作者:[Jeff Macharyas][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/jeffmacharyas
|
||||
[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://opensource.com/sites/default/files/uploads/source.jpg (Example image source code)
|
||||
[3]: https://github.com/extesy/hoverzoom/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/fb-cat.jpg (HoverZoom+ enlarged image)
|
@ -1,193 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Yufei-Yan)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Learn Shell Scripting for Free With These Resources [PDF, Video Courses and Interactive Websites])
|
||||
[#]: via: (https://itsfoss.com/shell-scripting-resources/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Learn Shell Scripting for Free With These Resources [PDF, Video Courses and Interactive Websites]
|
||||
======
|
||||
|
||||
_**So, you want to learn shell scripting? Or perhaps you want to improve your existing bash knowledge? I have collected a few resources that will help you learn shell scripting for free.**_
|
||||
|
||||
A shell is a command-line interpreter that lets you type in commands to get an output. You’re already looking at a shell when you’re using the terminal.
|
||||
|
||||
Yes, a shell is a command-line interface that you can interact with to give some type of instructions to the operating system. While there are different types of shells, **[bash][1]** (GNU Bourne-Again Shell) is the popular one used by almost every Linux distro out there.
|
||||
|
||||
When talk about shell scripting, that means — a user wants to execute multiple commands to get an output using a script.
|
||||
|
||||
You may need to learn shell scripting as part of your course curriculum or as part of your job. Knowing shell scripting also helps you automate certain repeated tasks in Linux.
|
||||
|
||||
Whatever be the reason for learning shell scripting, let me show you the resources.
|
||||
|
||||
### Top Free Resources to Learn Shell Scripting
|
||||
|
||||
![][2]
|
||||
|
||||
Don’t have Linux installed on your system? No, worries. There are various [ways of using Linux terminal on Windows][3]. You may also [use online Linux terminals][4] in some cases to practice shell scripting.
|
||||
|
||||
#### 1\. Learn Shell [Interactive web portal]
|
||||
|
||||
![][5]
|
||||
|
||||
If you’re looking for an interactive web portal to learn shell scripting and also try it online, Learn Shell is a great place to start.
|
||||
|
||||
It covers the basics and offers some advanced exercises as well. The content is usually brief and to the point – hence, I’d recommend you to check this out.
|
||||
|
||||
[Learn Shell][6]
|
||||
|
||||
#### 2\. Shell Scripting Tutorial [Web portal]
|
||||
|
||||
![][7]
|
||||
|
||||
Shell scripting tutorial is web resource that’s completely dedicated for shell scripting. You can choose to read the resource for free or can opt to purchase the PDF, book, or the e-book to support it.
|
||||
|
||||
Of course, paying for the paperback edition or the e-book is optional. But, the resource should come in handy for free.
|
||||
|
||||
[Shell Scripting Tutorial][8]
|
||||
|
||||
#### 3\. Shell Scripting – Udemy (Free video course)
|
||||
|
||||
![][9]
|
||||
|
||||
[Udemy][10] is unquestionably one of the most popular platforms for online courses. And, in addition to the paid certified courses, it also offers some free stuff that does not include certifications.
|
||||
|
||||
Shell Scripting is one of the most recommended free course available on Udemy for free. You can enroll in it without spending anything.
|
||||
|
||||
[Shell Scripting – Udemy][11]
|
||||
|
||||
#### 4\. Bash Shell Scripting – Udemy (Free video course)
|
||||
|
||||
![][12]
|
||||
|
||||
Yet another interesting free course focused on bash shell scripting on Udemy. Compared to the previous one, this resource seems to be more popular. So, you can enroll in it and see what it has to offer.
|
||||
|
||||
Not to forget that the free Udemy course does not offer any certifications. But, it’s indeed an impressive free shell scripting learning resource.
|
||||
|
||||
#### 5\. Bash Academy [online portal with interactive game]
|
||||
|
||||
![][13]
|
||||
|
||||
As the name suggests, the bash academy is completely focused on educating the users about bash shell.
|
||||
|
||||
It’s suitable for both beginners and experienced users even though it does not offer a lot of content. Not just limited to the guide — but it also used to offer an interactive game to practice which no longer works.
|
||||
|
||||
Hence, if this is interesting enough, you can also check out its [GitHub page][14] and fork it to improve the existing resources if you want.
|
||||
|
||||
[Bash Academy][15]
|
||||
|
||||
#### 6\. Bash Scripting LinkedIn Learning (Free video course)
|
||||
|
||||
![][16]
|
||||
|
||||
LinkedIn offers a number of free courses to help you improve your skills and get ready for more job opportunities. You will also find a couple of courses focused on shell scripting to brush up some basic skills or gain some advanced knowledge in the process.
|
||||
|
||||
Here, I’ve linked a course for bash scripting, you can find some other similar courses for free as well.
|
||||
|
||||
[Bash Scripting (LinkedIn Learning)][17]
|
||||
|
||||
#### 7\. Advanced Bash Scripting Guide [Free PDF book]
|
||||
|
||||
![][18]
|
||||
|
||||
An impressive advanced bash scripting guide available in the form of PDF for free. This PDF resource does not enforce any copyrights and is completely free in the public domain.
|
||||
|
||||
Even though the resource is focused on providing advanced insights. It’s also suitable for beginners to refer this resource and start to learn shell scripting.
|
||||
|
||||
[Advanced Bash Scripting Guide [PDF]][19]
|
||||
|
||||
#### 8\. Bash Notes for Professionals [Free PDF book]
|
||||
|
||||
![][20]
|
||||
|
||||
This is good reference guide if you are already familiar with Bash Shell scripting or if you just want a quick summary.
|
||||
|
||||
This free downloadable book runs over 100 pages and covers a wide variety of scripting topics with the help of brief description and quick examples.
|
||||
|
||||
[Download Bash Notes for Professional][21]
|
||||
|
||||
#### 9\. Tutorialspoint [Web portal]
|
||||
|
||||
![][22]
|
||||
|
||||
Tutorialspoint is a quite popular web portal to learn a variety of [programming languages][23]. I would say this is quite good for starters to learn the fundamentals and the basics.
|
||||
|
||||
This may not be suitable as a detailed resource — but it should be a useful one for free.
|
||||
|
||||
[Tutorialspoint][24]
|
||||
|
||||
#### 10\. City College of San Francisco Online Notes [Web portal]
|
||||
|
||||
![][25]
|
||||
|
||||
This may not be the best free resource there is — but if you’re ready to explore every type of resource to learn shell scripting, why not refer to the online notes of City College of San Francisco?
|
||||
|
||||
I came across this with a random search on the Internet about shell scripting resources.
|
||||
|
||||
Again, it’s important to note that the online notes could be a bit dated. But, it should be an interesting resource to explore.
|
||||
|
||||
[City College of San Francisco Notes][26]
|
||||
|
||||
#### Honorable mention: Linux Man Page
|
||||
|
||||
![][27]
|
||||
|
||||
Not to forget, the man page for bash should also be a fantastic free resource to explore more about the commands and how it works.
|
||||
|
||||
Even if it’s not tailored as something that lets you master shell scripting, it is still an important web resource that you can use for free. You can either choose to visit the man page online or just head to the terminal and type the following command to get help:
|
||||
|
||||
```
|
||||
man bash
|
||||
```
|
||||
|
||||
#### Wrapping Up
|
||||
|
||||
There are also a lot of popular paid resources just like some of the [best Linux books][28] available out there. It’s easy to start learning about shell scripting using some free resources available across the web.
|
||||
|
||||
In addition to the ones I’ve mentioned, I’m sure there must be numerous other resources available online to help you learn shell scripting.
|
||||
|
||||
Do you like the resources mentioned above? Also, if you’re aware of a fantastic free resource that I possibly missed, feel free to tell me about it in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/shell-scripting-resources/
|
||||
|
||||
作者:[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://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Learn-Shell-Scripting.png?ssl=1
|
||||
[3]: https://itsfoss.com/run-linux-commands-in-windows/
|
||||
[4]: https://itsfoss.com/online-linux-terminals/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/learnshell.png?ssl=1
|
||||
[6]: https://www.learnshell.org/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/shell-scripting-tutorial.png?ssl=1
|
||||
[8]: https://www.shellscript.sh/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/shell-scripting-udemy.png?ssl=1
|
||||
[10]: https://www.udemy.com
|
||||
[11]: https://www.udemy.com/course/shell-scripting-i/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/bash-shell-scripting.png?ssl=1
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/the-bash-academy.png?ssl=1
|
||||
[14]: https://github.com/lhunath/guide.bash.academy
|
||||
[15]: https://guide.bash.academy/
|
||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/learn-bash-scripting-linkedin.png?ssl=1
|
||||
[17]: https://www.linkedin.com/learning/learning-bash-scripting
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/advanced-bash-scripting-pdf.png?ssl=1
|
||||
[19]: http://tldp.org/LDP/abs/abs-guide.pdf
|
||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/Bash-Notes-for-Professional.jpg?ssl=1
|
||||
[21]: https://goalkicker.com/BashBook/
|
||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/tutorialspoint-shell.png?ssl=1
|
||||
[23]: https://en.wikipedia.org/wiki/Programming_language
|
||||
[24]: https://www.tutorialspoint.com/unix/shell_scripting.htm
|
||||
[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/scripting-notes-ccsf.png?ssl=1
|
||||
[26]: https://fog.ccsf.edu/~gboyd/cs160b/online/index.html
|
||||
[27]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/bash-linux-man-page.png?ssl=1
|
||||
[28]: https://itsfoss.com/best-linux-books/
|
@ -0,0 +1,84 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to crop images in GIMP [Quick Tip])
|
||||
[#]: via: (https://itsfoss.com/crop-images-gimp/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
How to crop images in GIMP [Quick Tip]
|
||||
======
|
||||
|
||||
There are many reasons you may want to crop an image in [GIMP][1]. You may want to remove useless borders or information to improve your image, or you may want the focus of the final image to be a specific detail for example.
|
||||
|
||||
In this tutorial, I will demonstrate how to cut out an image in GIMP quickly and without compromising the precision. Let’s see.
|
||||
|
||||
### How to crop images in GIMP
|
||||
|
||||
![][2]
|
||||
|
||||
#### Method 1
|
||||
|
||||
Cropping is just an operation to trim the image down to a smaller region than the original one. The procedure to crop an image is straightforward.
|
||||
|
||||
You can get to the Crop Tool through the Tools palette like this:
|
||||
|
||||
![Use Crop Tool for cropping images in GIMP][3]
|
||||
|
||||
You can also access the crop tool through the menus:
|
||||
|
||||
**Tools → Transform Tools → Crop**
|
||||
|
||||
Once the tool is activated, you’ll notice that your mouse cursor on the canvas will change to indicate the Crop Tool is being used.
|
||||
|
||||
Now you can Left-Click anywhere on your image canvas, and drag the mouse to a location to create the cropping boundaries. You don’t have to worry about the precision at this point, as you will be able to modify the final selection before actually cropping.
|
||||
|
||||
![Crop Selection][4]
|
||||
|
||||
At this point hovering your mouse cursor over any of the four corners of the selection will change the mouse cursor, and highlight that region. This allows you to now fine-tune the selection for cropping. You can click and drag any side or corner to move that portion of the selection.
|
||||
|
||||
Once the region is good enough to be cropped, you can just press the “**Enter**” key on your keyboard to crop.
|
||||
|
||||
If at any time you’d like to start over or decide not to crop at all, you can press the “**Esc**” key on your keyboard.
|
||||
|
||||
#### Method 2
|
||||
|
||||
Another way to crop an image is to make a selection first, using the **Rectangle Select Tool**.
|
||||
|
||||
**Tools → Selection Tools → Rectangle Select**
|
||||
|
||||
![][5]
|
||||
|
||||
You can then highlight a selection the same way as the **Crop Tool**, and adjust the selection as well. Once you have a selection you like, you can crop the image to fit that selection through
|
||||
|
||||
**Image → Crop to Selection**
|
||||
|
||||
![][6]
|
||||
|
||||
#### Conclusion
|
||||
|
||||
Cropping precisely an image can be considered a fundamental asset for a GIMP user. You may choose which method fits better to your needs and explore its potential.
|
||||
|
||||
If you have any questions about the procedure, please let me know in the comments below. If you are “craving” more [GIMP tutorials][7], make sure to subscribe on your favorite social media platforms!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/crop-images-gimp/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.gimp.org/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Crop-images-in-GIMP.png?ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Crop-tool.png?ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/Crop-selection.jpg?ssl=1
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/select-1.gif?ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/crop.gif?ssl=1
|
||||
[7]: https://itsfoss.com/tag/gimp-tips/
|
@ -0,0 +1,107 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: 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/)
|
||||
|
||||
在 Linux 上缺少 Photoshop?使用 PhotoGIMP 将 GIMP 变为 Photoshop
|
||||
======
|
||||
|
||||
[Adobe Photoshop][1] 不适用于桌面 Linux。GIMP 是 [Linux 上 Adobe Photoshop 的最佳替代品][2]。
|
||||
|
||||
如果你使用过 Photoshop,那么你会注意到 [GIMP][3] 和 Photoshop 相比有不同的设置、键盘快捷键和布局。
|
||||
|
||||
这没有错。毕竟,它们都是两种不同的软件,而且它们不必看起来相同。
|
||||
|
||||
但是,习惯了 Photoshop 的人们发现在切换到 GIMP 的时很难忘记他们反复学习的肌肉记忆。这可能会使某些人感到沮丧,因为使用新的界面意味着要学习大量的键盘快捷键,并花时间在查找工具位于何处。
|
||||
|
||||
为了帮助从 Photoshop 切换到 GIMP 的人,[Diolinux][4] 介绍了一个在 GIMP 中模仿 Adobe Photoshop 的工具。
|
||||
|
||||
### PhotoGIMP:在 Linux 中为 GIMP 提供 Adobe Photoshop 的外观
|
||||
|
||||
![][5]
|
||||
|
||||
[PhotoGIMP][6] 不是独立的图形软件。它是 GIMP 2.10 的补丁。你需要在系统上安装 GIMP 才能使用 PhotoGIMP。
|
||||
|
||||
当你应用 PhotoGIMP 补丁时,它将更改 GIMP 布局以模仿 Adobe Photoshop。
|
||||
|
||||
* 默认安装数百种新字体
|
||||
* 安装新的 Python 过滤器,例如 “heal selection”
|
||||
* 添加新的启动画面
|
||||
* 添加新的默认设置以最大化画布空间
|
||||
* 添加类似于 Adobe Photoshop 的键盘快捷键
|
||||
|
||||
|
||||
|
||||
PhotoGIMP 还在自定义 .desktop 文件中添加新的图标和名称。让我们看看如何使用它。
|
||||
|
||||
### 在 Linux 上安装 PhotoGIMP (适合中级到专业用户)
|
||||
|
||||
PhotoGIMP 本质是一个补丁。在 Linux 中下载并[解压 zip 文件][7]。你将在解压的文件夹中找到以下隐藏的文件夹:
|
||||
|
||||
* icons:其中包含新的 PhotoGIMP 图标
|
||||
* .local:包含个性化的 .desktop 文件,以便你在系统菜单中看到的是 PhotoGIMP 而不是 GIMP
|
||||
* .var:包含 GIMP 补丁的主文件夹
|
||||
|
||||
|
||||
|
||||
你应该[使用 Ctrl+H 快捷键在 Ubuntu 中显示隐藏文件][8]。
|
||||
|
||||
警告:建议你备份 GIMP 配置文件,以便在不喜欢 PhotoGIMP 时可以还原。只需将 GIMP 配置文件复制到其他位置。
|
||||
|
||||
目前,PhotoGIMP 主要与通过 [Flatpak][9] 安装的 GIMP 兼容。如果你使用 Flatpak 安装了 GIMP,那么只需将这些隐藏的文件夹复制粘贴到家目录中,它将 GIMP 转换为 Adobe Photoshop 类似的设置。
|
||||
|
||||
但是,如果你通过 apt、snap 或发行版的包管理器安装了 GIMP,那么必须找到 GIMP 的配置文件夹,然后粘贴 PhotoGIMP 的 .var 目录的内容。当出现询问时,请选择合并选项并替换同名的现有文件。
|
||||
|
||||
我[使用 apt 在 Ubuntu 20.04 中安装了 GIMP][10]。对我来说,GIMP 配置文件在 \~/.config/GIMP/2.10。我复制了 .var/app/org.gimp.GIMP/config/GIMP/2.10 目录,并启动 GIMP 查看 PhotoGIMP 的启动页。
|
||||
|
||||
这是打了 PhotoGIMP 补丁后的 GIMP 界面:
|
||||
|
||||
![][11]
|
||||
|
||||
我尝试了几个 Photoshop 快捷键来检查它所做的更改,一切似乎可以正常工作。
|
||||
|
||||
[下载 PhotoGIMP][12]
|
||||
|
||||
我还找到了 [Snap 包形式的 PhotoGIMP][13],但它是 2019 年的,我不确定它是否可以在所有地方使用,或者仅适用于 snap 安装。
|
||||
|
||||
**总结**
|
||||
|
||||
这不是类似的第一个项目。几年前,我们有一个类似的项目叫 Gimpshop。Gimpshop 项目在过去的几年中没有任何进展,可以肯定地认为该项目已经死亡。有一个名为 Gimpshop 的网站,但该网站来自冒名者试图以 Gimpshop 的名义获利。
|
||||
|
||||
我不是 Adobe Photoshop 用户。我甚至不是 GIMP 专家,这就是为什么 It’s FOSS 上的 [GIMP 教程][14] 用 Dimitrios 的原因。
|
||||
|
||||
因此,我无法评论 PhotoGIMP 项目的实用性。如果你熟悉这两种软件,那么应该能够比我更好地进行判断。
|
||||
|
||||
如果你尝试使用 PhotoGIMP,请与他人分享你的经验,并告诉我们是否值得安装。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/photogimp/
|
||||
|
||||
作者:[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://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/
|
@ -1,276 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( nophDog)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Make the switch from Mac to Linux easier with Homebrew)
|
||||
[#]: via: (https://opensource.com/article/20/6/homebrew-linux)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
Homebrew 让你从 Mac 切换到 Linux 更轻松
|
||||
======
|
||||
不管你是想要更舒服地从 Mac 搬到 Linux,还是不满意常规的 Linux 包管理器,都可以试试 Homebrew。
|
||||
![Digital images of a computer desktop][1]
|
||||
|
||||
[Homebrew][2] 项目最初是为了给 Mac 用户提供一个非官方的类 Linux 包管理器。用户很快就爱上了它友好的界面以及帮助性的提示,而且 —— 真是爱恨纠缠 —— 它已经被移植到 Linux 系统。
|
||||
|
||||
一开始,macOS 和 Linux 有两个分开的项目(Homebrew 与 Linuxbrew),但是目前在两个操作系统上,都是由 Homebrew 核心管理。由于我正 [从 Mac 切换到 Linux][3],所以一直在研究我在 macOS 最常用的开源软件在 Linux 表现如何,最终,我很高兴地发现 Homebrew 也支持 Linux,太赞了!
|
||||
|
||||
### 为什么要在 Linux 使用 Homebrew 呢?
|
||||
|
||||
长期的 Linux 用户对 Homebrew 的第一反应是:“为什么不用......呢”,省略号代表他们喜欢的 Linux 包管理器。基于 Debian 的系统早就有了 `apt`,基于 Fedora 的系统则有 `dnf` 和 `yum`,并且像 Flatpak 跟 AppImage 这样的项目,在两种系统上都能流畅运行。我花了不少时间尝试这些技术,不得不说它们都很强大。
|
||||
|
||||
那我为什么还要 [坚持使用 Homebrew][4] 呢?首先,我对它非常熟悉。在为我过去使用的专利软件寻找替代品的过程中,我已经学会了许多使用方法,而且越来越熟练 —— 就像我使用 Homebrew 一样 —— 让我专注于一次学习一件事情,而不会被不同系统间的差异搞垮。
|
||||
|
||||
此外,我没有看到哪一个包管理器像 Homebrew 一样,对用户如此友好。命令井井有条,默认的帮助命令显示如下:
|
||||
|
||||
```
|
||||
$ brew -h
|
||||
Example usage:
|
||||
brew search [TEXT|/REGEX/]
|
||||
brew info [FORMULA...]
|
||||
brew install FORMULA...
|
||||
brew update
|
||||
brew upgrade [FORMULA...]
|
||||
brew uninstall FORMULA...
|
||||
brew list [FORMULA...]
|
||||
|
||||
Troubleshooting:
|
||||
brew config
|
||||
brew doctor
|
||||
brew install --verbose --debug FORMULA
|
||||
|
||||
Contributing:
|
||||
brew create [URL [--no-fetch]]
|
||||
brew edit [FORMULA...]
|
||||
|
||||
Further help:
|
||||
brew commands
|
||||
brew help [COMMAND]
|
||||
man brew
|
||||
<https://docs.brew.sh>
|
||||
```
|
||||
|
||||
过于简短的输入可能会被误解成它的缺陷,但是你仔细看看每一个子命令,都有很丰富的功能。虽然这一列只有短短 23 行,但对进阶用户来说,光是子命令 `install` 就包含整整 79 行信息量:
|
||||
|
||||
|
||||
```
|
||||
$ brew --help | wc -l
|
||||
23
|
||||
$ brew install --help | wc -l
|
||||
79
|
||||
```
|
||||
|
||||
忽视或者安装依赖,用什么编译器从源码编译,使用上游 Git 提交或者官方 “bottled” 版应用,这些你都可以选择。总而言之,Homebrew 即适合新手,也同样能满足老鸟。
|
||||
|
||||
### 开始在 Linux 使用 Homebrew
|
||||
|
||||
如果你想要试着使用 Homebrew,可以用这个一行脚本在 Mac 或者 Linux 上进行安装:
|
||||
|
||||
```
|
||||
`$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`
|
||||
```
|
||||
|
||||
这条命令会立即开始安装 Homebrew。如果你比较谨慎,可以使用 `curl` 将文件下载到本地,检查完毕之后再运行。
|
||||
|
||||
```
|
||||
$ curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/master/install.sh> \--output homebrew_installer.sh
|
||||
$ more homebrew_installer.sh # review the script until you feel comfortable
|
||||
$ bash homebrew_installer.sh
|
||||
```
|
||||
|
||||
对 Linux 的安装指导包括如何配置点文件,尤其是 Debian 系统的 `~/.profile` 和 Fedora 系统的 `~/.bash_profile`。
|
||||
|
||||
|
||||
```
|
||||
$ test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
$ test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
|
||||
$ echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
|
||||
```
|
||||
|
||||
为了确认已经安装好,Homebrew 团队提供一个空的 `hello` formulae 供测试:
|
||||
|
||||
|
||||
```
|
||||
$ brew install hello
|
||||
==> Downloading <https://linuxbrew.bintray.com/bottles/hello-2.10.x86\_64\_linux.bottle.tar.gz>
|
||||
######################################################################## 100.0%
|
||||
==> Pouring hello-2.10.x86_64_linux.bottle.tar.gz
|
||||
🍺 /home/linuxbrew/.linuxbrew/Cellar/hello/2.10: 52 files, 595.6KB
|
||||
```
|
||||
|
||||
It looks like my installation is working without any issues, so I'll explore a little more.
|
||||
看起来安装毫无问题,那我来试试。
|
||||
|
||||
### Brew for command-line utilities
|
||||
### 命令行工具 Brew
|
||||
|
||||
Homebrew 宣称自己默认只 “安装你需要但 [Linux] 不需要的东西”。
|
||||
|
||||
在 Homebrew 中,你可以用 `brew` 命令安装任何命令行软件。这些包的定义文件叫做 “formulae”,而且它们是编译好的文件,通过 “bottles” 共享。在 Homebrew 的世界里,还有许多 “beer-oriented” 术语,但这个包管理器主要目的是让软件便于使用。
|
||||
|
||||
什么样的软件呢?对我这样的技术玩家(既然你已经在读这篇文章,估计你也是)来说最方便的东西。例如,便利的 `tree` 命令,可以展示目录结构,或者 `pyenv`,我用来 [在 Mac 管理不同版本 Python][5]。
|
||||
|
||||
你可以用 `search` 命令查看所有可以安装的 formulae,在后面通过 `wc` 命令看看一共有多少:
|
||||
|
||||
|
||||
```
|
||||
# -l counts the number of lines
|
||||
$ brew search | wc -l
|
||||
5087
|
||||
```
|
||||
|
||||
迄今为止,一共有 5000 多个 formulae,这囊括了很多软件。需要注意的是:并非所有 formula 都能在 Linux 运行。在 `brew search --help` 输出中有一部分提到可以通过操作系统标识来筛选软件。它会在浏览器打开用于每一个操作系统的软件仓库。我运行的是 Fedora,所以我打算试一试:
|
||||
|
||||
|
||||
```
|
||||
`$ brew search --fedora tree`
|
||||
```
|
||||
|
||||
浏览器打开了网址 `https://apps.fedoraproject.org/packages/s/tree`,向我展示了所有 Fedora 的可用选项。你也可以通过其它方法进行浏览。Formulae 集中整理到由操作系统划分的核心仓库当中(Mac 在 [Homebrew Core][6],Linux 在 [Linux Core][7])。同样也可以通过 Homebrew API [在网页显示][8]。
|
||||
|
||||
尽管已经安装好这些软件,我又通过其它用户的推荐找到很多新工具。我列出一些我最喜欢的工具,你可以在里面找点灵感:
|
||||
|
||||
* `pyenv`、`rbenv` 和 `nodenv` 用来管理(相应的) Python、Ruby 和 Node.js 版本
|
||||
* `imagemagick` 用于脚本化编辑图片
|
||||
* `pandoc` 用于脚本化转换文档格式(我通常将 .docx 文件转成 .md 或者 .html)
|
||||
* `hub` 为 GitHub 用户提供 [更好的 Git 体验][9]
|
||||
* `tldr` 展示命令工具的用法
|
||||
|
||||
|
||||
想要深入了解 Homebrew,可以去 [trldr 页面][10] 看看,比起应用的 man 页面,它要友好得多。使用 `search` 命令确认你可以安装:
|
||||
|
||||
```
|
||||
$ brew search tldr
|
||||
==> Formulae
|
||||
tldr ✔
|
||||
```
|
||||
|
||||
太好了!勾号说明你可以安装。那么继续吧:
|
||||
|
||||
|
||||
```
|
||||
$ brew install tldr
|
||||
==> Downloading <https://linuxbrew.bintray.com/bottles/tldr-1.3.0\_2.x86\_64\_linux.bottle.1.tar.gz>
|
||||
######################################################################## 100.0%
|
||||
==> Pouring tldr-1.3.0_2.x86_64_linux.bottle.1.tar.gz
|
||||
🍺 /home/linuxbrew/.linuxbrew/Cellar/tldr/1.3.0_2: 6 files, 63.2KB
|
||||
```
|
||||
|
||||
Homebrew 提供编译好的二进制文件,所以你也不必在本地机器上编译源码。这能节省很多时间,也不用听 CPU 风扇的噪声。我同样欣赏 Homebrew 的另外一点,你不完全理解每一个选项的含义也不会影响正常使用。若你想自己编译,可以在 `brew install` 命令后面加上 `-s` 或者 `--build-from-source` 标识,这样就能从源码编译 formula(即便已经有一个 bottle 存在)。
|
||||
|
||||
同样,软件之后的复杂度也很有意思。使用 `info` 查看 `tldr` 软件的依赖管理,formula 源代码在磁盘上的分布,甚至还能查看公开数据。
|
||||
|
||||
|
||||
```
|
||||
$ brew info tldr
|
||||
tldr: stable 1.3.0 (bottled), HEAD
|
||||
Simplified and community-driven man pages
|
||||
<https://tldr.sh/>
|
||||
Conflicts with:
|
||||
tealdeer (because both install `tldr` binaries)
|
||||
/home/linuxbrew/.linuxbrew/Cellar/tldr/1.3.0_2 (6 files, 63.2KB) *
|
||||
Poured from bottle on 2020-06-08 at 15:56:15
|
||||
From: <https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/tldr.rb>
|
||||
==> Dependencies
|
||||
Build: pkg-config ✔
|
||||
Required: libzip ✔, curl ✔
|
||||
==> Options
|
||||
\--HEAD
|
||||
Install HEAD version
|
||||
==> Analytics
|
||||
install: 197 (30 days), 647 (90 days), 1,546 (365 days)
|
||||
install-on-request: 197 (30 days), 646 (90 days), 1,546 (365 days)
|
||||
build-error: 0 (30 days)
|
||||
```
|
||||
|
||||
### 从 Mac 到 Linux 的一点不足
|
||||
|
||||
在 macOS,Homebrew 的 `cask` 子命令可以让用户完全使用命令行安装、管理图形界面软件。不幸的是,`cask` 只在部分 Linux 发行版有效。我在安装一个开源工具时遇到了问题:
|
||||
|
||||
|
||||
```
|
||||
$ brew cask install tusk
|
||||
Error: Installing casks is supported only on macOS
|
||||
```
|
||||
|
||||
我在 [论坛][11] 提问,迅速得到其他用户的一些反馈。总结一下,方案如下:
|
||||
|
||||
* 复刻该项目,构建这个特性,然后告诉别人值得这样做
|
||||
* 给该软件写一个 formula,从源代码编译
|
||||
* 为该软件创建一个第三方仓库
|
||||
|
||||
|
||||
对我来说还有最后一件很有意思的事情。Homebrew 通过 [创建并维护 “taps”][12] (另一个 beer-influenced 名词)管理第三方仓库。当你对系统越来越熟悉时,你会将 Taps 加入这个生态,花点时间研究它能让你受益匪浅。
|
||||
|
||||
### 备份 Homebrew 的安装记录
|
||||
|
||||
我最中意的 Homebrew 特性之一就是你可以像其它任何 [版本控制工具备份点文件][13] 一样备份你的安装记录。为了实现这个目的,Homebrew 提供 `bundle` 子命令,它有一个子命令叫 `dump` 可以生成一份 Brewfile。这个文件包含你目前所有安装的工具列表,可以反复使用。进入你想使用的目录然后运行命令,它会根据你所安装的软件生成 Brewfile:
|
||||
|
||||
|
||||
```
|
||||
$ cd ~/Development/dotfiles # This is my dotfile folder
|
||||
$ brew bundle dump
|
||||
$ ls Brewfile
|
||||
Brewfile
|
||||
```
|
||||
|
||||
当我换了一台机器,想要安装一样的软件时,进入含有 Brewfile 的文件夹,然后重新安装:
|
||||
|
||||
|
||||
```
|
||||
$ ls Brewfile
|
||||
Brewfile
|
||||
$ brew bundle
|
||||
```
|
||||
|
||||
它会在我的新机器上安装所有列出的 formulae。
|
||||
|
||||
#### 在 Mac 和 Linux 同时管理 Brewfile
|
||||
|
||||
Brewfile 非常适合备份你目前的安装记录,但是如果某些在 Mac 上运行的软件无法运行在 Linux 呢?或者刚好相反?我发现不管是 Mac 还是 Linux,如果软件无法在当前操作系统运行,Homebrew 会优雅地忽略那一行。如果它遇到不兼容的请求(正如使用 brew 在 Linux 安装 cask),它会选择跳过,继续安装过程:
|
||||
|
||||
|
||||
```
|
||||
$ brew bundle --file=Brewfile.example
|
||||
|
||||
Skipping cask licecap (on Linux)
|
||||
Skipping cask macdown (on Linux)
|
||||
Installing fish
|
||||
Homebrew Bundle complete! 1 Brewfile dependency now installed.
|
||||
```
|
||||
|
||||
为了尽量保持配置文件的简洁,我在跨操作系统时使用同一份 Brewfile,因为它只安装与操作系统相关的版本,所以我一直没有遇到任何问题。
|
||||
|
||||
### 使用 Homebrew 管理软件包
|
||||
|
||||
Homebrew 已经成了我必备的命令行工具,由于我很熟悉它,所以在 Linux 上的体验也充满乐趣。Homebrew 让我的工具井井有条,并且时刻保持更新,我愈发欣赏它在实用性与功能上找到的平衡点。我喜欢只保留用户必要的包管理信息,大多数人能够从中受益。如果你对目前的 Linux 包管理起很满意,Homebrew 可能会让你觉得很基础,但是你要去深入研究,发掘本文没有提到的高级用法。
|
||||
|
||||
对 Linux 用户来说,他们有很多包管理器可以选择。如果你来自 MacOS,Homebrew 会让你宾至如归。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/6/homebrew-linux
|
||||
|
||||
作者:[Matthew Broberg][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/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop)
|
||||
[2]: https://brew.sh/
|
||||
[3]: https://opensource.com/article/19/10/why-switch-mac-linux
|
||||
[4]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[5]: https://opensource.com/article/20/4/pyenv
|
||||
[6]: https://github.com/Homebrew/homebrew-core
|
||||
[7]: https://github.com/Homebrew/linuxbrew-core
|
||||
[8]: https://formulae.brew.sh/formula/
|
||||
[9]: https://opensource.com/article/20/3/github-hub
|
||||
[10]: https://github.com/tldr-pages/tldr
|
||||
[11]: https://discourse.brew.sh/t/add-linux-support-to-existing-cask/5766
|
||||
[12]: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
|
||||
[13]: https://opensource.com/article/19/3/move-your-dotfiles-version-control
|
@ -0,0 +1,192 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Yufei-Yan)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Learn Shell Scripting for Free With These Resources [PDF, Video Courses and Interactive Websites])
|
||||
[#]: via: (https://itsfoss.com/shell-scripting-resources/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
通过这些资源免费学习 Shell 脚本编程——PDF,视频课程和互动网站
|
||||
======
|
||||
|
||||
_**那么, 你想学习 shell 脚本编程吗?或者你想提升现有的 bash 知识?我收集了以下免费的资源来帮助你学习 shell 脚本编程。**_
|
||||
|
||||
shell 是一个命令行解释器,它允许你输入命令并获得输出。当你在使用终端的时候,你就已经在看 shell 了。
|
||||
|
||||
是的,shell 是一个你可以和它进行交互的命令行界面,你可以通过它给操作系统某种指令。虽然有不同类型的 shell,**[bash][1]**(GNU Bourne-Again Shell)是在各 Linux 发行版中最流行的。
|
||||
|
||||
当谈到 shell 脚本编程的时候,也就意味着——用户希望使用脚本来执行多条命令来获得一个输出。
|
||||
|
||||
也许你需要学习 shell 脚本编程作为你的课程或者工作的一部分。了解 shell 脚本编程也可以帮助你在 Linux 中自动化某些重复的任务。
|
||||
|
||||
不管出于什么原因学习 shell 脚本编程,都可以看看这些我给你展示的资源。
|
||||
|
||||
### 最好的免费学习 shell 脚本编程的资源
|
||||
|
||||
![][2]
|
||||
|
||||
还没在你的系统上安装 Linux?不用担心。有很多种方法[在 Windows 上使用 Linux 终端][3]。你也可以在某些情况下[使用在线 Linux 终端][4]来练习 shell 脚本编程。
|
||||
|
||||
#### 1\. 学习 Shell——互动网站
|
||||
|
||||
![][5]
|
||||
|
||||
如果你正在找一个互动网站来学习 shell 脚本编程,并且还可以在线试试,Learn Shell 是一个不错的起点。
|
||||
|
||||
它涵盖了基础知识,并且也提供了一些高级的练习。通常,内容还是简明扼要的——因此,我建议你看看这个网站。
|
||||
|
||||
[Learn Shell][6]
|
||||
|
||||
#### 2\. Shell 脚本编程教程——门户网站
|
||||
|
||||
![][7]
|
||||
|
||||
Shell scripting tutorial 是一个完全专注于 shell 脚本编程的网站。你可以选择免费阅读其中的资源,也可以购买 PDF、实体书籍和电子书来支持他们。
|
||||
|
||||
当然,花钱买纸质的版本或者电子书不是强制的。但是,这些免费资源查看起来还是很方便的。
|
||||
|
||||
[Shell Scripting Tutorial][8]
|
||||
|
||||
#### 3\. Shell 脚本——Udemy(免费视频课程)
|
||||
|
||||
![][9]
|
||||
|
||||
毫无疑问,[Udemy][10] 是最受欢迎的在线课程平台之一。而且,除了付费认证课程之外,它还提供了不包含证书的免费内容。
|
||||
|
||||
Shell Scripting 是 Udemy 上推荐度最高的免费课程之一。你不需要花费任何费用就可以注册这门课。
|
||||
|
||||
[Shell Scripting – Udemy][11]
|
||||
|
||||
#### 4\. Bash Shell Scripting——Udemy(免费视频课程)
|
||||
|
||||
![][12]
|
||||
|
||||
Udemy 上另一个专注于 bash shell 脚本编程的有趣且免费的课程。与前面提到的课程相比,这个资源似乎更受欢迎。所以,你可以注册这门课,看看它都教些什么。
|
||||
|
||||
别忘了 Udemy 的免费课程不能提供证书。但是,它确实是一个让人印象深刻的免费 shell 脚本编程学习资源。
|
||||
|
||||
#### 5\. Bash Academy——互动游戏在线门户
|
||||
|
||||
![][13]
|
||||
|
||||
顾名思义,Bash Academy 专注于向用户提供 bash shell 的教学。
|
||||
|
||||
尽管它没有很多的内容,它还是非常适合初学者和有一定经验的用户。不仅仅局限于指导——它也可以提供交互式的游戏来练习,不过目前已经不能用了。
|
||||
|
||||
因此,如果这个足够有趣,你可以去看看这个 [Github 页面][14],并且如果你愿意的话,还可以 fork 它并对现有资源进行改进。
|
||||
|
||||
[Bash Academy][15]
|
||||
|
||||
#### 6\. Bash Scripting LinkedIn Learning(免费视频课程)
|
||||
|
||||
![][16]
|
||||
|
||||
LinkedIn 提供了大量免费课程来帮助你提成技能,并且为更多工作做好准备。你还可以找到一些专注于 shell 脚本编程的课程,这些课程有助于重温基本技能或者这个过程中获得一些高级技能。
|
||||
|
||||
在这里,我提供一个 bash 脚本编程的课程链接,你还可以发现其他类似的免费课程。
|
||||
|
||||
[Bash Scripting (LinkedIn Learning)][17]
|
||||
|
||||
#### 7\. Advanced Bash Scripting Guide (免费 PDF 书籍)
|
||||
|
||||
![][18]
|
||||
|
||||
这是一个令人印象深刻的高级 bash 脚本编程指南,并且可以获得到它的 PDF 版本。这个 PDF 资源没有版权限制,是完全免费的。
|
||||
|
||||
尽管这个资源主要是提供高级的知识,通过参考这个 PDF 并且开始学习 shell 脚本编程,它还是很适合初学者的。
|
||||
|
||||
[Advanced Bash Scripting Guide [PDF]][19]
|
||||
|
||||
#### 8\. Bash Notes for Professionals(免费 PDF 书籍)
|
||||
|
||||
![][20]
|
||||
|
||||
如果你已经对 Bash Shell 脚本编程比较熟悉或者只是想快速总结一下,那这是一个很好的参考。
|
||||
|
||||
这个可以免费下载的书有 100 多页,通过简单的描述和例子,这本书涵盖了各种各样的主题。
|
||||
|
||||
[下载 Bash Notes for Professional][21]
|
||||
|
||||
#### 9\. Tutorialspoint——门户网站
|
||||
|
||||
![][22]
|
||||
|
||||
Tutorialspoint 是一个非常流行的学习各种编程语言的门户网站。我想说这对于初学者学习基础知识非常好。
|
||||
|
||||
也许这不太适合作为一个详细的资源——但是他应该是不错的免费资源。
|
||||
|
||||
[Tutorialspoint][24]
|
||||
|
||||
#### 10\. 旧金山城市学院在线笔记——门户网站
|
||||
|
||||
![][25]
|
||||
|
||||
也许这不是最好的免费资源——但是如果你已经为学习 shell 脚本编程做好了探索每种资源的准备,为什么不看看旧金山城市学院的在线笔记呢?
|
||||
|
||||
当我在网上随便搜索关于 shell 脚本编程的资源的时候,我偶然遇到到了这个资源。
|
||||
|
||||
同样需要注意的是,在线笔记可能会有点过时。但是,这应该还是一个值得探索的有趣资源。
|
||||
|
||||
[旧金山城市学院笔记][26]
|
||||
|
||||
#### 荣誉奖: Linux 手册
|
||||
|
||||
![][27]
|
||||
|
||||
不要忘记,bash 手册也应该是一个相当不错的免费资源,可以用它来查看命令和使用方法。
|
||||
|
||||
尽管他不是专门为你掌握 shell 脚本编程而量身打造的,它依然是一个你可以免费使用的重要网络资源。你可以选择访问在线手册,或者直接打开终端然后输入以下命令:
|
||||
|
||||
```
|
||||
man bash
|
||||
```
|
||||
#### 总结
|
||||
|
||||
有很多很受欢迎的付费资源,比如这些[最好的 Linux 书籍][28]。从网络上的一些免费资源开始学习 shell 脚本编程还是很方便的。
|
||||
|
||||
除了我提到的这些,我敢肯定网上还有不计其数的资源可以帮助你学习 shell 脚本编程。
|
||||
|
||||
你喜欢换上面提到的资源吗?如果你知道我可能错过的非常棒的免费资源,记得在下面评论区告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/shell-scripting-resources/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Yufei-Yan](https://github.com/Yufei-Yan)
|
||||
校对:[校对者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://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Learn-Shell-Scripting.png?ssl=1
|
||||
[3]: https://itsfoss.com/run-linux-commands-in-windows/
|
||||
[4]: https://itsfoss.com/online-linux-terminals/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/learnshell.png?ssl=1
|
||||
[6]: https://www.learnshell.org/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/shell-scripting-tutorial.png?ssl=1
|
||||
[8]: https://www.shellscript.sh/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/shell-scripting-udemy.png?ssl=1
|
||||
[10]: https://www.udemy.com
|
||||
[11]: https://www.udemy.com/course/shell-scripting-i/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/bash-shell-scripting.png?ssl=1
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/the-bash-academy.png?ssl=1
|
||||
[14]: https://github.com/lhunath/guide.bash.academy
|
||||
[15]: https://guide.bash.academy/
|
||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/learn-bash-scripting-linkedin.png?ssl=1
|
||||
[17]: https://www.linkedin.com/learning/learning-bash-scripting
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/advanced-bash-scripting-pdf.png?ssl=1
|
||||
[19]: http://tldp.org/LDP/abs/abs-guide.pdf
|
||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/Bash-Notes-for-Professional.jpg?ssl=1
|
||||
[21]: https://goalkicker.com/BashBook/
|
||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/tutorialspoint-shell.png?ssl=1
|
||||
[23]: https://en.wikipedia.org/wiki/Programming_language
|
||||
[24]: https://www.tutorialspoint.com/unix/shell_scripting.htm
|
||||
[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/scripting-notes-ccsf.png?ssl=1
|
||||
[26]: https://fog.ccsf.edu/~gboyd/cs160b/online/index.html
|
||||
[27]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/bash-linux-man-page.png?ssl=1
|
||||
[28]: https://itsfoss.com/best-linux-books/
|
Loading…
Reference in New Issue
Block a user