统计
  • 文章总数:265 篇
  • 评论总数:0 条
  • 分类总数:14 个
  • 最后更新:昨天 17:30

Synology群晖ssh命令详解

本文阅读 1 分钟
首页 群晖 正文

注意:SSH运行以下命令可能会损毁你的系统/硬盘,如不清楚具体含义请不要随意执行!!!

CHEATSHEET

Print workgroup for NAS:

  1. synowin -getWorkgroup

Join a new workgroup for NAS:

  1. synowin -joinWorkgroup <group>

Print general info:

  1. synoservice --status

Setup mail via cli:

  1. synosyslogmail

Check upgrades:

  1. synoupgrade --check 3

Dump data about your nas:

  1. syno_system_dump

Print network info incl. current duplex:

  1. synonet --show

Print current hostname:

  1. synonet --get_hostname

Set a new hostname:

  1. synonet --set_hostname

Set a new gateway:

  1. synonet --set_gateway gateway

WOL Wakeup:

  1. synonet --wake xx:xx:xx:xx:xx:xx <interface>

Print the partition layout table.

  1. synopartition --list

Sharing

Print info about a share:

  1. synoshare --get <sharefolder>

Mount an shared encrypted folder:

  1. synoshare --enc_mount <sharefolder> <password>

Unmount an encrypted folder:

  1. synoshare --enc_unmount <sharefolder>

Allowed to delete:

  1. synoshare --del {TRUE|FALSE} sharename1 sharename2 ...

Set an description for a shared folder (viewed in comments in file browser)

  1. synoshare --setdesc sharename desc

Allow browsing of shared folder

  1. synoshare --setbrowse sharename browse_flag{0|1}

Rename a shared folder:

  1. synoshare --rename old_sharename new_sharename

Set users that is allowed to browse shared folder:

  1. synoshare --setuser sharename user_auth{NA|RO|RW} operator{+|-|=} user_name_list_with_comma

User

Print main data about a user

  1. sh-4.3# synouser --get wuseman
  2. User Name : [wuseman]
  3. User Type : [AUTH_LOCAL]
  4. User uid : [1026]
  5. Primary gid : [100]
  6. Fullname : []
  7. User Dir : [/var/services/homes/wuseman]
  8. User Shell : [/bin/sh]
  9. Expired : [false]
  10. User Mail : []
  11. Alloc Size : [82]
  12. Member Of : [2]
  13. (100) users
  14. (101) administrators

Set a new password/Change password:

  1. synouser --setpw oldpassword newpassword

Rename a user:

  1. synouser --rename old_username new_username

Add a username with full info:

  1. synouser --add [username pwd "full name" expired{0|1} mail privilege]

Notifications:

Send an email about storage:

  1. synostorage --mail

Lock managment

  1. synostorage --lock

Tuning functionality:

Get current tuning profile:

  1. synotune --get
  2. Outut: Current Profile: performance_throughput

Set a new functionality, options:

  1. synotune --set performance_throughput OR performance_latency

Dump info about your synology nas:

  1. syno_system_dump

Upgrade

Set your nas to handle upgrades auto:

  1. synoupgrade --auto

Check your current upgrade settings:

  1. synoupgrade --check

Download latest upgrade if there is a new one:

  1. synoupgrade --download

Start upgrade:

  1. synoupgrade --start

Check the partition layout table:

  1. synopartition --check /dev/sd<X>

View synology NFS Monitor:

  1. synonfstop

3035568392.png
Reset your Synology NAS (Settings Only)

  1. /usr/syno/sbin/./synodsdefault --reset

Reset your Synology Nas to Factory Default (OBS OBS OBS ALL DATA WILL BE WIPED)

  1. /usr/syno/sbin/./synodsdefault --factory-default

Reinstall your Synology Nas Station, all data will be kept:

  1. /usr/syno/sbin/./synodsdefault --reinstall; reboot

The proper way to restart SSHD of your NAS via cli:

  1. synoservicectl --restart sshd

List, uninstall or install a .spk package file (available locally)

  1. synopkg

Install a set a networking and ELF binary debugging tools (and drop into a root session)

  1. synogear

Write and read an .ini style file with lines of key=value pairs

  1. synosetkeyvalue
  2. synogetkeyvalue

Shut down and power off the NAS (much like shutdown -h now)

  1. synopoweroff

Show installed packages

  1. synopkg list | sed 's/: .*$//'

Uninstall a package

  1. sudo synopkg uninstall

Synology Shutdown and Poweroff Too

  1. syno_poweroff_task

Set/establish password to local user

  1. synoauth local_username password

Manage IP autoblock feature

  1. synoautoblock OPTIONS

Manage blog feature

  1. synoblog_backup [-r|-b] p [-u username] [-o]

Synology disk control device: something like /dev/hda or /dev/sda

  1. syno_disk_ctl OPTIONS DEVICE

Synology clear .tbd-File Tool

  1. SYNOClearTdb FILE

Different ways to print various info about your NAS

  1. more /etc.defaults/VERSION
  2. cat /etc/synoinfo.conf
  3. cat /proc/cmdline
  4. synoshare --enum ALL
  5. synonet --show
  6. synodisk --enum
  7. synospace --enum -a

Restart index

  1. synoservicectl --restart synoindexd

Check for upgrades

  1. sudo synoupgrade --check

Restart webserver

  1. /usr/syno/sbin/synoservicecfg --restart httpd-user
  2. /usr/syno/sbin/synoservicectl --restart pkgctl-WebStation

Generate a list for what you can control

  1. /usr/syno/sbin/synoservice --list

DSM API - Provide DSM information

  1. syno dsm getInfo --pretty

File Station API - Provide File Station information

  1. syno fs getInfo --pretty

File Station API - Enumerate files in a given folder

  1. syno fs listFiles --payload '{"folder_path":"/path/to/folder"}' --pretty

Download Station API - List download tasks

  1. syno dl listFiles --payload '{"limit":5, "offset":10}' --pretty

Download Station API - Create a download task

  1. syno dl createTask --payload '{"uri":"https://link"}'

Audio Station API - Search a song

  1. syno as searchSong --payload '{"title":"my_title_song"}' --pretty

Video Station API - List movies

  1. syno vs listMovies --payload '{"limit":5}' --pretty

Video Station DTV API - List channels

  1. syno dtv listChannels --payload '{"limit":1}' --pretty

Surveillance Station API - Get camera information

  1. syno ss getInfoCamera --payload '{"cameraIds":8}' --pretty

Restart, enable, stop samba

  1. /usr/syno/etc/rc.sysv/S80samba.sh --help

Get synology date

  1. synodate --getSysDate

Printer stuff

  1. synoprint

Update index older

  1. indexfolder --type={SHARE_CREATE|SHARE_REMOVE} --share=<SHARED_FOLDER> --share_path=<SHARED_FOLDER>

Start mediaserver

  1. /usr/syno/bin/mediaserver.sh start

CAREFUL, KILLING NAS

  1. servicetool --get-service-volume download

Get 2FA key if lost

  1. ssh root@nas cat /usr/syno/etc/preference/wuseman/google_authenticator

List disk info on a very fancy way

  1. dhm_tool -s

Synology Autoblock

Add a IP to autoblock db:

  1. synoautoblock --deny <ip-address>

Reset a IP that has been added by mistake:

  1. synoautoblock --reset <ip-address>

Add any IP to whitelist:

  1. synoautoblock --in-white-list <ip-address>

Debugging & System Health:

Debug fans and email the result (if email has been set)

  1. syno_fan_debug

Run a health check of your system and email the the result once done:

  1. syno_disk_health_record

Check ~remain lifetime:

  1. syno_disk_remain_life_check

Run smartmontools and send email once done:

  1. syno_disk_smart_mail_send

Debug hibernation:

  1. syno_hibernation_debug

LED (Get min and max value in: /usr/syno/etc.defaults/led_brightness.xml)

Get current setup:

  1. syno_led_brightness --get (Default on DS416: 1985157252)

Set a new setting:

  1. syno_led_brightness --set <brightness>

Bandwidth

Print a user bandwidth usage:

  1. synobandwidth --status [<list=user|group|all(default)> <transfer=upload|download|all(default)>] <merge=0|1(default)>]

Set a new bandwidth limit for a user:

  1. synobandwidth --set-global-conf <state=enabled|disabled> [<protocol=filestation|webdav|ftp|rsync|all(default)>

Print status user by user for all services:

  1. sh-4.3# synobandwidth --preview wuseman
  2. Protocol Upload Download
  3. filestation 0.00 0.00
  4. webdav 0.00 0.00
  5. ftp 0.00 0.00
  6. rsync 0.00 0.00

ISCI

Synology iSCSI Perfomance Analyzer

  1. synoiscsitop40

4202977879.png

Fan

Set fan config (loudest will sound like an airplane)

  1. synofanconfig -parseXML 1000000

More synology commands listed:

  1. sync
  2. synologconvert
  3. syno-dbus-check.sh
  4. synologrotated
  5. syno-letsencrypt
  6. synologset
  7. syno-move-coredump
  8. synologset1
  9. syno8021Xtool
  10. synolunbackup
  11. synoRTCTime
  12. synolunbkp
  13. syno_adv_test
  14. synoluntransform
  15. syno_dc_ctrl_adapter.sh
  16. synomediaparserd
  17. syno_disk_config_check
  18. synomkflv
  19. syno_disk_ctl
  20. synomkflvd
  21. syno_disk_data_collector
  22. synomkthumb
  23. syno_disk_db_update
  24. synomkthumbd
  25. syno_disk_dsl
  26. synomoduletool
  27. syno_disk_health_record
  28. synomount
  29. syno_disk_information_daily_record
  30. synomustache
  31. syno_disk_log_convert
  32. synomyds
  33. syno_disk_log_import_from_xml
  34. synonclient_send
  35. syno_disk_remain_life_check
  36. synonet
  37. syno_disk_smart_mail_send
  38. synonetd
  39. syno_disk_test_log_import_from_xml
  40. synonetdtool
  41. syno_disk_test_scheduler_set
  42. synonetseqadj
  43. syno_disk_testlog_convert
  44. synonfstop
  45. syno_disk_wcache_config_init
  46. synonotify
  47. syno_dvb_admin.sh
  48. synootp
  49. syno_fan_debug
  50. synoovstool
  51. syno_hdd_util
  52. synopartition
  53. syno_hibernation_debug
  54. synopasswordmail
  55. syno_hw_video_transcoding.sh
  56. synopayment
  57. syno_iptables_common
  58. synoperfeventd
  59. syno_led_brightness
  60. synoperformancediagnose
  61. syno_mem_check
  62. synopftest
  63. syno_pkgicon_sprite.py
  64. synophoto_acl
  65. syno_poweroff_task
  66. synophoto_acl_pgsql
  67. syno_scemd_connector
  68. synophoto_autoblock
  69. syno_smart_result_collect
  70. synophoto_backup
  71. syno_smart_test
  72. synophoto_config
  73. syno_ssd_trim
  74. synophoto_config_root
  75. syno_system_dump
  76. synophoto_dsm_user
  77. synoabnormalloginmail
  78. synophoto_external_access
  79. synoacltool
  80. synophoto_extract_preview
  81. synoagentregisterd
  82. synophoto_music
  83. synoappbkp
  84. synophoto_sdk_share_set
  85. synoappnotify
  86. synophoto_sns_utils
  87. synoapppriv_updater
  88. synophoto_update_db
  89. synoarchivetool
  90. synophoto_watermark_util
  91. synoauth
  92. synophotoio
  93. synoautoblock
  94. synopingpong
  95. synobackup
  96. synopkg
  97. synobackupd
  98. synopkgctl
  99. synobandwidth
  100. synopkghelper
  101. synoblog_backup
  102. synoplatform
  103. synobootseq
  104. synoportforward
  105. synobootupcheck
  106. synopoweroff
  107. synobtrfssnap
  108. synopreferencedir
  109. synocacheclient
  110. synoprint
  111. synocachepinfiletool
  112. synopsql
  113. synocachepinfiletool-status
  114. synoquota
  115. synocachepinfiletoolha
  116. synoraidtool
  117. synocerttool
  118. synorecycle
  119. synocfgen
  120. synorelayd
  121. synocgid
  122. synoretainer
  123. synocgitool
  124. synoretention-lun
  125. synocheckhotspare
  126. synoretentionconf
  127. synocheckiscsitrg
  128. synoretentiontest
  129. synochecknetworkcfg
  130. synoretentiontestutil.sh
  131. synocheckshare
  132. synorouterportfwd
  133. synocheckswapconfig
  134. synoroutertool
  135. synocloudserviceauth
  136. synorsyncdtool
  137. synocmsclient
  138. synosavetime
  139. synocodectool
  140. synoscgi
  141. synoconfbkp
  142. synoscgi
  143. synoconfd
  144. synoschedtask
  145. synocontentextract
  146. synoschedtool
  147. synocontentextractd
  148. synoscimprofile
  149. synocopy
  150. synosdutils
  151. synocredential
  152. synosearch
  153. synocrond
  154. synosearchagent
  155. synocrtregister
  156. synoselfcheck
  157. synocrtunregister
  158. synoservice
  159. synodatacollect
  160. synoservicecfg
  161. synodataverifier
  162. synoservicectl
  163. synodate
  164. synoservicemigrate
  165. synodctest
  166. synosetkeyvalue
  167. synodd
  168. synoshare
  169. synoddnsinfo
  170. synosharequota
  171. synoddsmtool
  172. synosharesnapshot
  173. synodisk
  174. synosharesnaptool
  175. synodiskdatacollect
  176. synosharesnaptree
  177. synodiskfind
  178. synosharingbackup
  179. synodiskpathparse
  180. synosharingchecker
  181. synodiskport
  182. synosharingcron
  183. synodriveencode
  184. synosharingurl
  185. synodrivehook
  186. synosmartblock
  187. synodriveindex
  188. synosnapschedtask.sh
  189. synodriveobject
  190. synosnmpcd
  191. synodrivesettings
  192. synospace
  193. synodriveversion
  194. synospace.sh
  195. synodrivevolume
  196. synosshdutils
  197. synodsdefault
  198. synostgpool
  199. synodsinfo
  200. synostgsysraid
  201. synodsmnotify
  202. synostgvolume
  203. synoeaupgrade
  204. synostorage
  205. synoethinfo
  206. synostoragecore
  207. synoexternal
  208. synostoraged
  209. synofanconfig
  210. synosupportchannelchecker
  211. synofileutil
  212. synosyncdctime
  213. synofirewall
  214. synosyslogmail
  215. synofirewallUpdater
  216. synotc
  217. synoflashcache
  218. synotc_common
  219. synoflvconv
  220. synothumb
  221. synofstool
  222. synotifyd
  223. synogear
  224. synotifydutil
  225. synogetkeyvalue
  226. synotimecontrol
  227. synogpoclientd
  228. synotlstool
  229. synogrinst
  230. synotune
  231. synogroup
  232. synotunnelexec
  233. synoguest
  234. synoupgrade
  235. synohacore
  236. synoupnp
  237. synoindex
  238. synoups
  239. synoindex_mgr
  240. synoupscommon
  241. synoindex_package.sh
  242. synousbcam
  243. synoindexd
  244. synousbcopy
  245. synoindexplugind
  246. synousbdisk
  247. synoindexscand
  248. synousbmodemd
  249. synoindexworkerd
  250. synouser
  251. synoiscsiep
  252. synouserdir
  253. synoiscsihook
  254. synouserhome
  255. synoiscsitool
  256. synovolumesnapshot
  257. synoiscsitop
  258. synovpnc
  259. synoiscsitop40
  260. synovspace
  261. synoiscsiunmap
  262. synovspace_wrapper
  263. synoiscsiwebapi
  264. synow3
  265. synoisns
  266. synow3tool
  267. synokerneltz
  268. synowebapi
  269. synolanstatus
  270. synowifid
  271. synoldapclient
  272. synowin
  273. synoldapclientd
  274. synowireless
  275. synologaccd
  276. synowsdiscoveryd
  277. synologand
  278. synowstransferd
  279. synologanutil
  280. synozram
  281. synologconfgen
本文来自转载,文中观点不代表本站立场,文章出自:https://github.com/wuseman/SYNOLOGY
黑威联通 model.conf 和 驱动 分享 by 我不是矿神
« 上一篇 02-18
惠普T620/630/640等瘦客户机安装官方Win10 IoT系统的方法
下一篇 » 02-26