出于某种原因,我现在正在研究一个synology系统。但是我看不到任何命令行工具,比如linux上的终端或者在synology上的窗口上的cmd。
是否有任何工具可以在synologi上使用命令行?如果是,请建议我一些。
谢谢。
您可以使用自己喜欢的telnet(不推荐)或ssh(推荐)应用程序连接到Synology框并将其用作终端。
如果您需要更详细的说明,请阅读https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal
我使用来自synocommunity的GateOne。
进入Package Center中的设置并添加http://packages.synocommunity.com/作为包源。然后,您应该可以通过Package Center轻松添加它。
当前的Windows 10(版本1803(OS Build 17134.1))内置了SSH。这样,只需从控制面板,终端和SNMP启用SSH,确保您使用的是管理员组中的帐户,并且您都是组。
启动Powershell或CMD,输入ssh yourAccountName @ diskstation
它第一次缓存你的证书。
对于我的例子:
Windows XP ---> Synology:DS218 +
Fzz login: tsungjung411 Password: # shows the current working directory (顯示目前的工作目錄) $ pwd /var/services/homes/tsungjung411 # edit a Java file (via vi), then compile and run it # (透過 vi 編輯 Java 檔案,然後編譯和執行) $ vi Main.java # show the file content (顯示檔案內容) $ cat Main.java public class Main { public static void main(String [] args) { System.out.println("hello, World!"); } } # compiles the Java file (編譯 Java 檔案) javac Main.java # executes the Java file (執行 Java 檔案) $ java Main hello, World! # shows the file list (顯示檔案清單) $ ls CloudStation Main.class Main.java www
# shows the JRE version on this Synology Disk Station $ java -version openjdk version "1.8.0_151" OpenJDK Runtime Environment (IcedTea 3.6.0) (linux-gnu build 1.8.0_151-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
$ python Python 2.7.12 (default, Nov 10 2017, 20:30:30) [GCC 4.9.3 20150311 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> >>> import sys >>> >>> # shows the the python version >>> print(sys.version) 2.7.12 (default, Nov 10 2017, 20:30:30) [GCC 4.9.3 20150311 (prerelease)] >>> >>> import os >>> >>> # shows the current working directory >>> print(os.getcwd()) /volume1/homes/tsungjung411
$ # launch Python 3 $ python3 Python 3.5.1 (default, Dec 9 2016, 00:20:03) [GCC 4.9.3 20150311 (prerelease)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>