Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2019-03-14 11:27:14 +08:00
commit 0e85075750
2 changed files with 110 additions and 22 deletions

View File

@ -1,18 +1,18 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10618-1.html)
[#]: subject: (How To SSH Into A Particular Directory On Linux)
[#]: via: (https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/)
[#]: author: (SK https://www.ostechnix.com/author/sk/)
如何在 Linux 上 SSH 登录到特定目录
如何 SSH 登录到 Linux 上的特定目录
======
![](https://www.ostechnix.com/wp-content/uploads/2019/02/SSH-Into-A-Particular-Directory-720x340.png)
你是否遇到过需要 SSH 登录到远程服务器并立即 cd 到一个目录来继续交互式作业?你找对地方了!这个简短的教程描述了如何直接 SSH 登录到远程 Linux 系统的特定目录。而且不仅是SSH 登录到特定目录,你还可以在连接到 SSH 服务器后立即运行任何命令。这些没有你想的那么难。请继续阅读。
你是否遇到过需要 SSH 登录到远程服务器并立即 `cd` 到一个目录来继续交互式作业?你找对地方了!这个简短的教程描述了如何直接 SSH 登录到远程 Linux 系统的特定目录。而且不仅是 SSH 登录到特定目录,你还可以在连接到 SSH 服务器后立即运行任何命令。这些没有你想的那么难。请继续阅读。
### SSH 登录到远程系统的特定目录
@ -22,7 +22,7 @@
$ ssh user@remote-system
```
然后如下 cd 进入某个目录:
然后如下 `cd` 进入某个目录:
```
$ cd <some-directory>
@ -36,15 +36,15 @@ $ cd <some-directory>
$ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix ; bash'
```
上面的命令将通过 SSH 连接到远程系统 192.168.225.22 并立即进入名为 **“/home/sk/ostechnix/”** 的目录,并停留在提示符中。
上面的命令将通过 SSH 连接到远程系统 192.168.225.22 并立即进入名为 `/home/sk/ostechnix/` 的目录,并停留在提示符中。
这里,**-t** 标志用于强制分配伪终端,这是一个必要的交互式 shell。
这里,`-t` 标志用于强制分配伪终端,这是一个必要的交互式 shell。
以下是上面命令的输出:
![](https://www.ostechnix.com/wp-content/uploads/2019/02/ssh-1.gif)
你也可以使用此命令
你也可以使用此命令
```
$ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix ; exec bash'
@ -56,25 +56,23 @@ $ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix ; exec bash'
$ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix && exec bash -l'
```
这里,**-l** 标志将 bash 设置为登录 shell。
这里,`-l` 标志将 bash 设置为登录 shell。
在上面的例子中,我在最后一个参数中使用了 **bash**。它是我的远程系统中的默认 shell。如果你不知道远程系统上的 shell 类型,请使用以下命令:
在上面的例子中,我在最后一个参数中使用了 `bash`。它是我的远程系统中的默认 shell。如果你不知道远程系统上的 shell 类型,请使用以下命令:
```
$ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix && exec $SHELL'
```
Like I already said, this is not just for cd into directory after connecting to an remote system. You can use this trick to run other commands as well. For example, the following command will land you inside /home/sk/ostechnix/ directory and then execute uname -a command.
就像我已经说过的,它不仅仅是连接到远程系统后 cd 进入目录。你也可以使用此技巧运行其他命令。例如,以下命令将进入 “/home/sk/ostechnix/”,然后执行命令 “uname -a” 。
就像我已经说过的,它不仅仅是连接到远程系统后 `cd` 进入目录。你也可以使用此技巧运行其他命令。例如,以下命令将进入 `/home/sk/ostechnix/`,然后执行命令 `uname -a`
```
$ ssh -t sk@192.168.225.22 'cd /home/sk/ostechnix && uname -a && exec $SHELL'
```
或者,你可以在远程系统上的 **.bash_profile** 文件中添加你想在 SSH 登录后执行的命令。
或者,你可以在远程系统上的 `.bash_profile` 文件中添加你想在 SSH 登录后执行的命令。
编辑 **.bash_profile** 文件:
编辑 `.bash_profile` 文件:
```
$ nano ~/.bash_profile
@ -92,15 +90,12 @@ cd /home/sk/ostechnix >& /dev/null
$ source ~/.bash_profile
```
请注意,你应该在远程系统的 **.bash_profile** 或 **.bashrc** 文件中添加此行,而不是在本地系统中。从现在开始,无论何时登录(无论是通过 SSH 还是直接登录cd 命令都将执行,你将自动进入 “/home/sk/ostechnix/” 目录。
请注意,你应该在远程系统的 `.bash_profile``.bashrc` 文件中添加此行,而不是在本地系统中。从现在开始,无论何时登录(无论是通过 SSH 还是直接登录),`cd` 命令都将执行,你将自动进入 `/home/sk/ostechnix/` 目录。
就是这些了。希望这篇文章有用。还有更多好东西。敬请关注!
干杯!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/
@ -108,7 +103,7 @@ via: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/
作者:[SK][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,93 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Star LabTop Mk III Open Source Edition: An Interesting Laptop)
[#]: via: (https://itsfoss.com/star-labtop-open-source-edition)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Star LabTop Mk III Open Source Edition: An Interesting Laptop
======
[Star Labs Systems][1] have been producing Laptops tailored for Linux for some time. While you can purchase other variants available on their website, they have recently launched a [Kickstarter campaign][2] for their upcoming Open Source Edition laptop that incorporates more features as per the requests by the users or reviewers.
It may not be the best laptop youve ever come across for around a **1000 Euros** but it certainly is interesting for some specific features.
In this article, we will talk about what makes it an interesting deal and whether or not its worth investing for.
![star labtop mk III][3]
### Key Highlight: Open-source Coreboot Firmware
Normally, you will observe proprietary firmware (BIOS) on computers, American Megatrends Inc, for example.
But, here, Star Labs have tailored the [coreboot firmware][4] (a.k.a known as the LinuxBIOS) which is an open source alternative to proprietary solutions for this laptop.
Not just open source but it is also a lighter firmware for better control over your laptop. With [TianoCore EDK II][5], it ensures that you get the maximum compatibility for most of the major Operating Systems.
### Other Features of Star LabTop Mk III
![sat labtop mk III][6]
In addition to the open source firmware, the laptop features an **8th-gen i7 chipse** t ( **i7-8550u** ) coupled with **16 Gigs of LPDDR4 RAM** clocked at **2400 MHz**.
The GPU being the integrated **Intel UHD Graphics 620** should be enough for professional tasks except video editing and gaming. It will be rocking a **Full HD 13.3-inch IPS** panel as the display.
The storage option includes **480 GB or 960 GB of PCIe SSD** which is impressive as well. In addition to all this, it comes with the **USB Type-C** support.
Interestingly, the **BIOS, Embedded Controller and SSD** will be receiving automatic [firmware updates][7] via the [LVFS][8] (the Mk III standard edition has this feature already).
You should also check out a review video of [Star LabTob Mk III][9] to get an idea of how the open source edition could look like:
If you are curious about the detailed tech specs, you should check out the [Kickstarter page][2].
<https://youtu.be/_oxewz8ePv4>
### Our Opinion
![star labtop mk III][10]
The inclusion of coreboot firmware and being something tailored for various Linux distributions originally is the reason why it is being termed as the “ **Open Source Edition”**.
The price for the ultimate bundle on Kickstarter is **1087 Euros**.
Can you get better laptop deals at this price? **Yes** , definitely. But, it really comes down to your preference and your passion for open source of what you require.
However, if you want a performance-driven laptop specifically tailored for Linux, yes, this is an option you might want to consider with something new to offer (and potentially considering your requests for their future builds).
Of course, you cannot consider this for video editing and gaming for obvious reasons. So, they should considering adding a dedicated GPU to make it a complete package for computing, gaming, video editing and much more. Maybe even a bigger screen, say 15.6-inch?
### Wrapping Up
For what it is worth, if you are a Linux and open source enthusiast and want a performance-driven laptop, this could be an option to go with and back this up on Kickstarter right now.
What do you think about it? Will you be interested in a laptop like this? If not, why?
Let us know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/star-labtop-open-source-edition
作者:[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://starlabs.systems
[2]: https://www.kickstarter.com/projects/starlabs/star-labtop-mk-iii-open-source-edition
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/star-labtop-mkiii-2.jpg?resize=800%2C450&ssl=1
[4]: https://en.wikipedia.org/wiki/Coreboot
[5]: https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/03/star-labtop-mkiii-1.jpg?ssl=1
[7]: https://itsfoss.com/update-firmware-ubuntu/
[8]: https://fwupd.org/
[9]: https://starlabs.systems/pages/star-labtop
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/star-labtop-mkiii.jpg?resize=800%2C435&ssl=1
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/star-labtop-mkiii-2.jpg?fit=800%2C450&ssl=1