20230613-synology群晖ssh命令清单大全

群晖本质上还是一个Linux系统,也可以通过ssh来连接,并且可方便使用ssh命令行来管理 。群晖打开ssh命令行的设置很简单,进入控制面板,找到终端机和SNMP, 勾选上启动SSH功能即可,如果你有防火墙,需要在防火墙放行22端口:

一、常用命令

nas打印工作组

synowin -getWorkgroup

加入新的 NAS 工作组:

1
synowin -joinWorkgroup <group>

打印一般信息:

synoservice –status

通过 cli 设置邮件:

synosyslogmail

检查升级:

synoupgrade –check 3

转储有关您的 nas 的数据:

syno_system_dump

打印网络信息包括。当前双工:

synonet –show

打印当前主机名:

synonet –get_hostname

设置一个新的主机名:

synonet –set_hostname

设置新网关:

synonet –set_gateway gateway

WOL 唤醒:

synonet –wake xx:xx:xx:xx:xx:xx

打印分区布局表。

synopartition –list

二、共享相关命令

打印有关共享的信息:

synoshare –get

挂载共享加密文件夹:

synoshare –enc_mount

卸载加密文件夹:

synoshare –enc_unmount

允许删除:

synoshare –del {TRUE|FALSE} sharename1 sharename2 …

为共享文件夹设置描述(在文件浏览器的评论中查看)

synoshare –setdesc sharename desc

允许浏览共享文件夹

synoshare –setbrowse sharename browse_flag{0|1}

重命名共享文件夹:

synoshare –rename old_sharename new_sharename

设置允许浏览共享文件夹的用户:

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

三、用户相关命令

打印有关用户的主要数据

sh-4.3# synouser –get wuseman

User Name : [wuseman]

User Type : [AUTH_LOCAL]

User uid : [1026]

Primary gid : [100]

Fullname : []

User Dir : [/var/services/homes/wuseman]

User Shell : [/bin/sh]

Expired : [false]

User Mail : []

Alloc Size : [82]

Member Of : [2]

(100) users

(101) administrators

设置新密码/更改密码:

synouser –setpw oldpassword newpassword

重命名用户:

synouser –rename old_username new_username

添加包含完整信息的用户名:

synouser –add [username pwd “full name” expired{0|1} mail privilege]

四、通知相关命令:

发送有关存储的电子邮件:

synostorage –mail

锁管理

synostorage –lock

五、调优功能:

获取当前调整配置文件:

synotune –get

Outut: Current Profile: performance_throughput

设置新功能,选项:

synotune –set performance_throughput OR performance_latency

转储有关您的 Synology NAS 的信息:

syno_system_dump

六、升级相关命令

将您的 nas 设置为自动处理升级:

synoupgrade –auto

检查您当前的升级设置:

synoupgrade –check

如果有新的,请下载最新的升级:

synoupgrade –download

开始升级:

synoupgrade –start

检查分区布局表:

synopartition –check /dev/sd

查看群晖 NFS 监视器:

synonfstop

七、重置Synology Nas 和其它命令

重置 Synology NAS(仅限设置)

/usr/syno/sbin/./synodsdefault –reset

将 Synology Nas 重置为出厂默认设置(OBS OBS OBS ALL DATA 将被擦除)

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

重新安装 Synology Nas Station,将保留所有数据:

/usr/syno/sbin/./synodsdefault –reinstall; reboot

通过 cli 重启 NAS SSHD 的正确方法:

synoservicectl –restart sshd

列出、卸载或安装 .spk 包文件(本地可用)

synopkg

安装一组网络和 ELF 二进制调试工具(并进入根会话)

synogear

使用键=值对行编写和读取 .ini 样式文件

synosetkeyvalue

synogetkeyvalue

关闭并关闭 NAS(很像 shutdown -h now)

synopoweroff

显示已安装的包

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

卸载软件包

sudo synopkg uninstall

Synology 也关机和关机

syno_poweroff_task

为本地用户设置/建立密码

synoauth local_username password

管理 IP 自动阻止功能

synoautoblock OPTIONS

管理博客功能

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

Synology 磁盘控制设备:类似于 /dev/hda 或 /dev/sda

syno_disk_ctl OPTIONS DEVICE

Synology clear .tbd-文件工具

SYNOClearTdb FILE

打印有关 NAS 的各种信息的不同方法

more /etc.defaults/VERSION

cat /etc/synoinfo.conf

cat /proc/cmdline

synoshare –enum ALL

synonet –show

synodisk –enum

synospace –enum -a

重启索引

synoservicectl –restart synoindexd

检查升级

sudo synoupgrade –check

重启网络服务器

/usr/syno/sbin/synoservicecfg –restart httpd-user

/usr/syno/sbin/synoservicectl –restart pkgctl-WebStation

为您可以控制的内容生成列表

/usr/syno/sbin/synoservice –list

DSM API - 提供 DSM 信息

syno dsm getInfo –pretty

File Station API - 提供 File Station 信息

syno fs getInfo –pretty

File Station API - 枚举给定文件夹中的文件

syno fs listFiles –payload ‘{“folder_path”:”/path/to/folder”}’ –pretty

Download Station API - 列出下载任务

syno dl listFiles –payload ‘{“limit”:5, “offset”:10}’ –pretty

Download Station API - 创建下载任务

1
syno dl createTask --payload '{"uri":"[https://link](https://link.zhihu.com/?target=https%3A//link)"}'

Audio Station API - 搜索歌曲

syno as searchSong –payload ‘{“title”:”my_title_song”}’ –pretty

Video Station API - 列出电影

syno vs listMovies –payload ‘{“limit”:5}’ –pretty

Video Station DTV API - 列出频道

syno dtv listChannels –payload ‘{“limit”:1}’ –pretty

Surveillance Station API - 获取摄像头信息

syno ss getInfoCamera –payload ‘{“cameraIds”:8}’ –pretty

重新启动、启用、停止 samba

/usr/syno/etc/rc.sysv/S80samba.sh –help

获取 Synology 日期

synodate –getSysDate

打印机的东西

synoprint

更新索引较旧

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

启动媒体服务器

/usr/syno/bin/mediaserver.sh start

小心,杀死NAS

servicetool –get-service-volume download

如果丢失,获取 2FA 密钥

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

以非常奇特的方式列出磁盘信息

dhm_tool -s

八、Synology 自动阻止

将 IP 添加到自动阻止数据库:

synoautoblock –deny

重置错误添加的IP:

synoautoblock –reset

将任何 IP 添加到白名单:

synoautoblock –in-white-list

九、调试和系统健康:

调试风扇并通过电子邮件发送结果(如果已设置电子邮件)

syno_fan_debug

运行系统健康检查并在完成后通过电子邮件发送结果:

syno_disk_health_record

检查〜剩余寿命:

syno_disk_remain_life_check

运行 smartmontools 并在完成后发送电子邮件:

syno_disk_smart_mail_send

调试休眠:

syno_hibernation_debug

LED(获取最小值和最大值:/usr/syno/etc.defaults/led_brightness.xml)

获取当前设置:

syno_led_brightness –get (Default on DS416: 1985157252)

设置新设置:

syno_led_brightness –set

十、带宽

打印用户带宽使用情况:

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

为用户设置新的带宽限制:

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

按用户打印所有服务的用户状态:

sh-4.3# synobandwidth –preview wuseman

Protocol Upload Download

filestation 0.00 0.00

webdav 0.00 0.00

ftp 0.00 0.00

rsync 0.00 0.00

十一、ISCI

Synology iSCSI 性能分析器

synoiscsitop40

4202977879.png

十二、风扇

设置风扇配置(最大声会听起来像飞机)

synofanconfig -parseXML 1000000

十三、列出了更多 Synology 命令:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
sync

synologconvert

[syno-dbus-check.sh](https://link.zhihu.com/?target=http%3A//syno-dbus-check.sh)

synologrotated

syno-letsencrypt

synologset

syno-move-coredump

synologset1

syno8021Xtool

synolunbackup

synoRTCTime

synolunbkp

syno_adv_test

synoluntransform

syno_dc_ctrl_adapter.sh

synomediaparserd

syno_disk_config_check

synomkflv

syno_disk_ctl

synomkflvd

syno_disk_data_collector

synomkthumb

syno_disk_db_update

synomkthumbd

syno_disk_dsl

synomoduletool

syno_disk_health_record

synomount

syno_disk_information_daily_record

synomustache

syno_disk_log_convert

synomyds

syno_disk_log_import_from_xml

synonclient_send

syno_disk_remain_life_check

synonet

syno_disk_smart_mail_send

synonetd

syno_disk_test_log_import_from_xml

synonetdtool

syno_disk_test_scheduler_set

synonetseqadj

syno_disk_testlog_convert

synonfstop

syno_disk_wcache_config_init

synonotify

syno_dvb_admin.sh

synootp

syno_fan_debug

synoovstool

syno_hdd_util

synopartition

syno_hibernation_debug

synopasswordmail

syno_hw_video_transcoding.sh

synopayment

syno_iptables_common

synoperfeventd

syno_led_brightness

synoperformancediagnose

syno_mem_check

synopftest

syno_pkgicon_sprite.py

synophoto_acl

syno_poweroff_task

synophoto_acl_pgsql

syno_scemd_connector

synophoto_autoblock

syno_smart_result_collect

synophoto_backup

syno_smart_test

synophoto_config

syno_ssd_trim

synophoto_config_root

syno_system_dump

synophoto_dsm_user

synoabnormalloginmail

synophoto_external_access

synoacltool

synophoto_extract_preview

synoagentregisterd

synophoto_music

synoappbkp

synophoto_sdk_share_set

synoappnotify

synophoto_sns_utils

synoapppriv_updater

synophoto_update_db

synoarchivetool

synophoto_watermark_util

synoauth

synophotoio

synoautoblock

synopingpong

synobackup

synopkg

synobackupd

synopkgctl

synobandwidth

synopkghelper

synoblog_backup

synoplatform

synobootseq

synoportforward

synobootupcheck

synopoweroff

synobtrfssnap

synopreferencedir

synocacheclient

synoprint

synocachepinfiletool

synopsql

synocachepinfiletool-status

synoquota

synocachepinfiletoolha

synoraidtool

synocerttool

synorecycle

synocfgen

synorelayd

synocgid

synoretainer

synocgitool

synoretention-lun

synocheckhotspare

synoretentionconf

synocheckiscsitrg

synoretentiontest

synochecknetworkcfg

[synoretentiontestutil.sh](https://link.zhihu.com/?target=http%3A//synoretentiontestutil.sh)

synocheckshare

synorouterportfwd

synocheckswapconfig

synoroutertool

synocloudserviceauth

synorsyncdtool

synocmsclient

synosavetime

synocodectool

synoscgi

synoconfbkp

synoscgi

synoconfd

synoschedtask

synocontentextract

synoschedtool

synocontentextractd

synoscimprofile

synocopy

synosdutils

synocredential

synosearch

synocrond

synosearchagent

synocrtregister

synoselfcheck

synocrtunregister

synoservice

synodatacollect

synoservicecfg

synodataverifier

synoservicectl

synodate

synoservicemigrate

synodctest

synosetkeyvalue

synodd

synoshare

synoddnsinfo

synosharequota

synoddsmtool

synosharesnapshot

synodisk

synosharesnaptool

synodiskdatacollect

synosharesnaptree

synodiskfind

synosharingbackup

synodiskpathparse

synosharingchecker

synodiskport

synosharingcron

synodriveencode

synosharingurl

synodrivehook

synosmartblock

synodriveindex

[synosnapschedtask.sh](https://link.zhihu.com/?target=http%3A//synosnapschedtask.sh)

synodriveobject

synosnmpcd

synodrivesettings

synospace

synodriveversion

[synospace.sh](https://link.zhihu.com/?target=http%3A//synospace.sh)

synodrivevolume

synosshdutils

synodsdefault

synostgpool

synodsinfo

synostgsysraid

synodsmnotify

synostgvolume

synoeaupgrade

synostorage

synoethinfo

synostoragecore

synoexternal

synostoraged

synofanconfig

synosupportchannelchecker

synofileutil

synosyncdctime

synofirewall

synosyslogmail

synofirewallUpdater

synotc

synoflashcache

synotc_common

synoflvconv

synothumb

synofstool

synotifyd

synogear

synotifydutil

synogetkeyvalue

synotimecontrol

synogpoclientd

synotlstool

synogrinst

synotune

synogroup

synotunnelexec

synoguest

synoupgrade

synohacore

synoupnp

synoindex

synoups

synoindex_mgr

synoupscommon

synoindex_package.sh

synousbcam

synoindexd

synousbcopy

synoindexplugind

synousbdisk

synoindexscand

synousbmodemd

synoindexworkerd

synouser

synoiscsiep

synouserdir

synoiscsihook

synouserhome

synoiscsitool

synovolumesnapshot

synoiscsitop

synovpnc

synoiscsitop40

synovspace

synoiscsiunmap

synovspace_wrapper

synoiscsiwebapi

synow3

synoisns

synow3tool

synokerneltz

synowebapi

synolanstatus

synowifid

synoldapclient

synowin

synoldapclientd

synowireless

synologaccd

synowsdiscoveryd

synologand

synowstransferd

synologanutil

synozram

synologconfgen
打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!

扫一扫,分享到微信

微信分享二维码
  • Copyrights © 2015-2024 TeX_baitu
  • 访问人数: | 浏览次数:

请我喝杯咖啡吧~