TOS CLI
Introduction
TOS 7 CLI is a command-line management tool for the TerraMaster TOS 7 system, providing equivalent operational capabilities to the Web management interface.
The CLI is pre-installed in the TOS system. Users can execute the tos command directly after connecting to the TNAS device via SSH, with no additional installation required.
Key Features
- Out-of-the-box: Pre-integrated into the TOS system, ready to use immediately after SSH login
- Interactive & Non-interactive Modes: Suitable for both daily administrative maintenance and script/automation tasks
- JSON Output Support: Facilitates programmatic parsing and CI/CD integration
- Session Caching: Single login with automatic session reuse for subsequent commands
- Comprehensive Management: Full-spectrum management covering system, storage, network, users, applications, services, and more
Quick Start
# 1. SSH into your TNAS device
ssh admin@<your-TNAS-IP>
# 2. View all available commands
tos --help
# 3. View system information (no authentication required)
tos info
# 4. View file service status (no authentication required)
tos fileservice status
# 5. Output in JSON format (for script parsing)
tos info --json
Global Options
The following options apply to all commands:
| Option | Short | Description |
|---|---|---|
--help | - | Display command help information |
--version | -v | Display version number (use --json for structured output) |
--json | - | Output in JSON format (query commands only) |
--yes | -y | Skip confirmation prompts for high-risk operations (required in non-interactive mode) |
--debug | - | Enable debug output with detailed execution traces |
--user | -u | Specify username (overrides environment variable) |
--pass | -P | Specify password (overrides environment variable) |
--token | - | Specify session token (overrides environment variable and cache) |
Version Information Example
tos --version
TOS CLI 1.0.7
TOS 7.0.0
Build 20260624
tos --version --json
{
"cli_version": "1.0.7",
"tos_version": "7.0.0",
"build": "20260624"
}
Authentication & Session Management
Most remote commands (user management, storage management, application center, fan control, log management, etc.) communicate with the TOS daemon via HTTP and require authentication.
Local commands (such as tos info, tos fileservice, tos ssh status, tos service, etc.) read system files directly or call systemd, and do not require authentication.
Authentication Priority (Highest to Lowest)
- Command-line flags
--user/--passor--token - Environment variable
TOS_TOKEN - Environment variables
TOS_USER/TOS_PASS - Cached session file
~/.tos/session.json - Interactive prompt
Method 1: Session Caching (Recommended for Daily Use)
Use tos login once, and subsequent commands will automatically reuse the cached session (stored in ~/.tos/session.json, permissions 0600, password encrypted with RSA).
# Interactive login (prompts for username and password)
tos login
# Non-interactive login
tos login -u admin -P yourpassword
# Subsequent commands no longer require credentials
tos disk list
tos user list --json
# Clear cached session
tos logout
Method 2: Token Mode (For CI/CD and Stateless Environments)
Generate a portable token and pass it via environment variable.
# Generate token (outputs only the token string)
tos login -u admin -P yourpassword --token-only
# Output example: tos_v1.eyJ2ZXJzaW9uIjoxLC...
# Pass token via environment variable
export TOS_TOKEN="tos_v1.eyJ2ZXJzaW9uIjoxLC..."
tos disk list --json
Method 3: Command-line Flags or Environment Variables (Legacy Approach)
# Command-line flags
tos user list --user admin --pass yourpassword
# Environment variables
export TOS_USER=admin
export TOS_PASS=yourpassword
tos user list
Environment Variables Reference
| Variable | Description | Default |
|---|---|---|
TOS_DAEMON_URL | Daemon address | http://localhost:5050 |
TOS_USER | Login username | - |
TOS_PASS | Login password (plain text, security risk) | - |
TOS_TOKEN | Session token (generated by tos login --token-only) | - |
TOS_SESSION_DIR | Session file storage directory | ~/.tos |
Command Classification & Permission Overview
Whether a command requires authentication depends on whether it needs to communicate with the daemon:
| Authentication Required | Command Groups |
|---|---|
| Not Required | info, ssh, buzzer, fileservice, service, firewall (status/enable/disable), reboot, poweroff, version |
| Required | user, user-group, fan, log, update, shared-folder, app, disk, array, volume, storage info, network info, firewall rule, tnas-online |
Command Reference
I. System Information & Status
tos info – System Overview
Display comprehensive system information including TOS version, hardware, CPU, memory, temperature, and fan status.
tos info [--json]
Output Example (Table):
PROPERTY VALUE
TOS Version 7.0.0447
BIOS Version 6.00
Model F4-424
Uptime 12 days 05:34:48
IP Address 192.168.1.20
CPU Model Intel N95
CPU Usage 18%
Memory Total 8 GB
Memory Usage 42%
System Temp 41 °C
CPU Temp 52 °C
Fan Speed 1200 RPM
JSON Output (tos info --json):
{
"tos_version": "7.0.0447",
"bios_version": "6.00",
"model": "F4-424",
"uptime": "12 days 05:34:48",
"ip_address": "192.168.1.20",
"cpu_model": "Intel N95",
"cpu_usage": 18,
"memory_total": "8 GB",
"memory_usage": 42,
"system_temperature": 41,
"cpu_temperature": 52,
"fan_speed": 1200
}
Temperature and fan information depend on hardware sensors. Virtual machines or devices without sensors will display
-(nullin JSON).
II. System Management (Reboot / Shutdown)
Note:
rebootandpoweroffare remote commands and require authentication.
tos reboot – Reboot System (High-Risk)
tos reboot [--yes]
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Executed via daemon API
PUT /system/reboot - Output:
Reboot scheduled
tos poweroff – Safe Shutdown (High-Risk)
tos poweroff [--yes]
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Executed via daemon API
PUT /system/poweroff - Output:
Power off scheduled
III. SSH Service Management
Parent Command: tos ssh (local command, no authentication required)
tos ssh status – View SSH Status
tos ssh status [--json]
Output Example:
PROPERTY VALUE
SSH Status enabled
Port 22
tos ssh enable – Enable SSH
tos ssh enable [--port <port>]
--portspecifies the port number, defaults to 22- Action: Writes port configuration to
/etc/ssh/sshd_config, executessystemctl enable+systemctl start - Output:
SSH enabled on port 22
tos ssh disable – Disable SSH (High-Risk)
tos ssh disable [--yes]
- High-risk operation: May disconnect current remote session
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Output:
SSH disabled
IV. Buzzer Management
Parent Command: tos buzzer (local command, no authentication required)
tos buzzer status – View Buzzer Status
tos buzzer status [--json]
Output Example:
PROPERTY VALUE
Buzzer Status enabled
tos buzzer enable – Enable Buzzer
tos buzzer enable
- Starts the buzzer alert script (
/etc/tos/scripts/warnning) - Returns a conflict error (exit code 4) if the buzzer is already enabled
- Output:
Buzzer enabled
tos buzzer disable – Disable Buzzer
tos buzzer disable
- Output:
Buzzer disabled
V. Fan Control
Parent Command: tos fan (remote command, authentication required)
tos fan status – View Fan Status
tos fan status [--json]
Output Example:
PROPERTY VALUE
Fan Control enabled
Mode auto
Speed 1200 RPM
tos fan set-mode – Set Fan Mode
tos fan set-mode --mode <auto|low|mid|high>
Mode Descriptions:
| Mode | Description |
|---|---|
auto | Smart mode (system automatically adjusts) |
low | Low speed (quiet) |
mid | Medium speed |
high | High speed (maximum cooling) |
- Preserves existing buzzer configuration when setting mode
- Output:
Fan mode set to auto
VI. Firewall Management
Parent Command: tos firewall (hybrid mode)
| Subcommand | Description | Authentication |
|---|---|---|
status | View firewall enable status | Not Required |
enable | Enable firewall | Not Required |
disable | Disable firewall (high-risk) | Not Required |
rule | List firewall rules | Required |
tos firewall status – View Firewall Status
tos firewall status [--json]
Output Example:
PROPERTY VALUE
Firewall Status enabled
tos firewall enable – Enable Firewall
tos firewall enable
- Executes
systemctl enable+systemctl startfor iptables.service - If already enabled, outputs
Firewall already enabledand returns 0 (idempotent) - Output:
Firewall enabled
tos firewall disable – Disable Firewall (High-Risk)
tos firewall disable [--yes]
- High-risk operation: Disabling the firewall exposes all network ports
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - If already disabled, outputs
Firewall already disabledand returns 0 (idempotent) - Output:
Firewall disabled
tos firewall rule – List Firewall Rules
tos firewall rule [--detail] [--json]
- Retrieves rule list from the daemon API
--detailadds DESTINATION and DESCRIPTION columns- Compatible alias:
tos firewall list
Output Example:
RULE ID ACTION PROTOCOL SOURCE PORT
1 allow tcp 0.0.0.0/0 22
VII. File Service Management
Parent Command: tos fileservice (alias tos fs)
Local command, no authentication required. Manages services by directly reading/writing /etc/tos/config/*.json configuration files and controlling systemd units.
Supported Services:
| Service | Description | Default Port |
|---|---|---|
smb | SMB/CIFS file sharing | 445 |
nfs | NFS file sharing | 2049 |
ftp | FTP file transfer | 21 |
webdav | WebDAV file sharing | 80 |
rsync | Rsync file synchronization | 873 |
Service name matching is case-insensitive.
tos fileservice status – View File Service Status
tos fileservice status [service-name] [--json]
- No argument: Displays status for all 5 file services
- With service name: Displays only that service
Output Example:
SERVICE ENABLED STATUS PORT
smb true running 445
nfs false stopped -
ftp true running 21
webdav false stopped -
rsync false stopped -
tos fileservice enable – Enable File Service
tos fileservice enable <service-name>
- Validates service name (only smb/nfs/ftp/webdav/rsync allowed, case-insensitive)
- Action: Writes
enable: trueto config file, executessystemctl enableandsystemctl start - If already enabled, outputs
File service already enabledand returns 4 (state conflict) - Output:
File service enabled: smb
tos fileservice disable – Disable File Service (High-Risk)
tos fileservice disable <service-name> [--yes]
- High-risk operation: May interrupt active file access
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - If already disabled, outputs
File service already disabledand returns 0 (idempotent) - Output:
File service disabled: smb
VIII. System Service Management
Parent Command: tos service
Local command, based on systemd, no authentication required. Manages underlying system services (smb/nfs/ftp/sftp/rsync/ssh/telnet/webdav/webdavs).
tos service list – List System Services
tos service list [--status <running|stopped>] [--json]
Output Example:
SERVICE NAME STATUS AUTOSTART
ftp stopped false
nfs stopped false
smb running false
ssh running true
tos service start – Start Service
tos service start <service-name>
- Idempotent: If already running, outputs
Service already running: smband returns 0 - Output:
Service started: smb
tos service stop – Stop Service (High-Risk)
tos service stop <service-name> [--yes]
- High-risk operation: May interrupt active users
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Idempotent: If already stopped, outputs
Service already stopped: smband returns 0 - Output:
Service stopped: smb
tos service restart – Restart Service
tos service restart <service-name>
- If not running, acts the same as
start - Output:
Service restarted: smb
tos service set – Set Autostart
tos service set <service-name> --autostart <true|false>
- Based on systemd enable/disable
- Output:
Service autostart set: smb=true
IX. Storage Management
Note: All storage management commands are remote commands and require authentication. Communicates with the storage backend via Unix socket (
/var/run/socks/storage.sock).
tos storage info – Storage Overview
tos storage info [--scope <disk|volume|raid|all>] [--json]
--scopefilters the display scope, defaults toall- Healthy disk statistics are based on storage pool Health enumeration
Output Example:
PROPERTY VALUE
Disk Count 1
Healthy Disks 0
Warning Disks 0
Failed Disks 1
Array Count 1
Volume Count 1
External Devices 0
Hyper Cache disabled
tos disk – Disk Management
Parent Command: tos disk
| Subcommand | Description |
|---|---|
list | List disks with sorting and detail options |
mount | Mount a disk |
unmount | Unmount a disk (high-risk, requires --yes) |
# List disks
tos disk list [--detail] [--sort <size|status|temp>] [--json]
# Mount a disk
tos disk mount sda
# Unmount a disk (high-risk)
tos disk unmount sda --yes
list Output Example:
DISK ID MODEL CAPACITY HEALTH TEMP SYSTEM DISK
HDD1 ST2000VX017-3CV102 2.00 TB normal - No
tos array – Array Management
Parent Command: tos array
| Subcommand | Description |
|---|---|
list | List storage arrays with sorting and detail options |
mount | Mount an array |
delete | Delete an array (high-risk, irreversible, requires --yes) |
# List arrays
tos array list [--detail] [--sort <size|status>] [--json]
# Mount an array
tos array mount <array-uuid>
# Delete an array (high-risk)
tos array delete <array-uuid> --yes
tos volume – Volume Management
Parent Command: tos volume
| Subcommand | Description |
|---|---|
list | List volumes with sorting and detail options |
mount | Mount a volume |
delete | Delete a volume (high-risk, irreversible, requires --yes) |
# List volumes
tos volume list [--detail] [--sort <size|status>] [--json]
# Mount a volume
tos volume mount <volume-uuid>
# Delete a volume (high-risk)
tos volume delete <volume-uuid> --yes
tos shared-folder – Shared Folder Management
Parent Command: tos shared-folder
| Subcommand | Description |
|---|---|
list | List shared folders |
show | View detailed configuration of a folder |
add | Create a shared folder |
delete | Delete a shared folder (high-risk, irreversible, requires --yes) |
# List shared folders
tos shared-folder list [--detail] [--json]
# View folder details
tos shared-folder show <folder-id> [--json]
# Create a shared folder (non-interactive example)
tos shared-folder add myshare --path /Volume3/myshare --device Volume3 --yes
# Delete a shared folder (high-risk)
tos shared-folder delete myshare --yes
add Command Main Parameters:
| Parameter | Description |
|---|---|
<folder-name> | Folder name, required |
--path | Mount path, required in non-interactive mode |
--device | Storage device, required in non-interactive mode |
--desc | Folder description |
--encrypt | Enable encryption |
--recycle | Recycle bin: 0=off, 1=on, 2=admin-only |
--hidden | Hide folder |
--quota | Quota: -1=disabled, 0=off, 1=enabled |
--save-days | Recycle bin retention days (default 30) |
--time-machine | Enable Time Machine |
X. User Management
Note: All user management commands are remote commands and require authentication.
tos user – Local User Management
Parent Command: tos user
| Subcommand | Description |
|---|---|
list | List all users, filterable by status |
add | Create a user |
delete | Delete a user (high-risk, irreversible, requires --yes) |
online | View currently online users |
# List users
tos user list [--status active|inactive] [--json]
# Create a user (non-interactive, --password-stdin recommended)
echo 'SecurePass123' | tos user add bob --password-stdin --group users --enabled true --yes
# Delete a user (high-risk)
tos user delete bob --yes
# View online users
tos user online [--json]
add Command Parameters:
| Parameter | Description |
|---|---|
<username> | Username, required |
--password | Plain text password (not recommended, exposes in process list) |
--password-stdin | Read password from stdin (recommended) |
--group | Primary user group, defaults to users |
--enabled | Whether enabled, defaults to true |
--yes | Skip interactive confirmation |
online Output Example:
USERNAME IP LOGIN TIME SERVICE
admin 192.168.1.10 2026-04-23T09:12:00 TOS Web
tos user-group – User Group Management
Parent Command: tos user-group
| Subcommand | Description |
|---|---|
list | List all user groups |
add | Create a user group |
delete | Delete a user group (high-risk, irreversible, requires --yes) |
# List user groups
tos user-group list [--detail] [--json]
# Create a user group
tos user-group add developers --description "Development Team"
# Delete a user group (high-risk)
tos user-group delete developers --yes
list Output Example:
GROUP NAME DESCRIPTION MEMBER COUNT
admin Administrators 2
users Normal users 8
XI. Application Center Management
Note: All application management commands are remote commands and require authentication. Communicates with the application center backend via Unix socket (
/var/api/Application.sock).
Parent Command: tos app
All subcommands accept either application ID or display name (exact match, ID takes priority).
| Subcommand | Description |
|---|---|
list | List all applications |
info | Display detailed information for an application |
install | Install an application with optional custom path (requires --yes) |
uninstall | Uninstall an application (high-risk, --clean removes residual data, requires --yes) |
update | Update applications (updates all if no app specified, requires --yes) |
enable | Enable an application |
disable | Disable an application (high-risk, may interrupt active services, requires --yes) |
status | Check application status |
# List applications
tos app list [--status running|stopped] [--refresh] [--json]
# View application details
tos app info mysql [--json]
# Install an application
tos app install DockerEngine --path /Volume1 --yes
# Uninstall an application (high-risk)
tos app uninstall mysql --yes
# Update all applications
tos app update --yes
# Enable/disable an application
tos app enable mysql
tos app disable mysql --yes
# View application status
tos app status mysql [--json]
list Output Example:
APP ID NAME VERSION STATUS CATEGORY SIZE
mysql MariaDB 10.3.33 running Utilities 17.9 MB
plex Plex Media 1.42.2 running Multimedia 200.0 MB
status Output Example:
PROPERTY VALUE
App ID mysql
Installed Yes
Running Yes
Version 10.3.33
XII. Network Management
tos network info – View Network Configuration
Parent Command: tos network (remote command, authentication required)
Displays device name, HTTP/HTTPS ports, NIC interface, IP, MAC, MTU, DNS, gateway, etc.
tos network info [--scope <all|ip|dns|gateway>] [--json]
--scopefilters the display scope, defaults toall
Output Example:
PROPERTY VALUE
Device Name TNAS-fe52
HTTP Port 8181
HTTPS Port 5443
Interface eth1
IPv4 10.18.13.150
IPv6 fe80::6ebf:b5ff:fe02:fe52
MAC 6c:bf:b5:02:fe:52
MTU 1500
DNS 10.18.2.10
IPv4 Gateway 10.18.13.1
IPv6 Gateway -
Bond Enabled false
XIII. Remote Access (tnas.online)
Note: All remote access commands are remote commands and require authentication.
Parent Command: tos tnas-online
| Subcommand | Description |
|---|---|
info | View remote access status |
enable | Enable remote access |
disable | Disable remote access (high-risk, may interrupt remote connections, requires --yes) |
tos tnas-online info – View Status
tos tnas-online info [--detail] [--json]
--detaildisplays complete connection information (account, URL, IP, version, VPN, uptime)
Output Example:
PROPERTY VALUE
Status enabled
TNAS ID ABCD1234
Connected true
tos tnas-online enable – Enable Remote Access
tos tnas-online enable --tnas-id <tnas-id> --account <email> [--password <pw>] [--password-stdin] [--yes]
| Parameter | Description |
|---|---|
--tnas-id | TNAS ID, required |
--account | TerraMaster account (email format), required |
--password | Account password (plain text not recommended) |
--password-stdin | Read password from stdin (recommended) |
--yes | Skip interactive confirmation |
- Non-interactive mode requires
--tnas-id,--account, and password - Returns exit code 4 if already enabled
- Output:
tnas-online enabled
Non-interactive Example:
echo 'password' | tos tnas-online enable --tnas-id MyNAS-01 --account user@example.com --password-stdin --yes
tos tnas-online disable – Disable Remote Access (High-Risk)
tos tnas-online disable [--yes]
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Idempotent: returns 0 if already disabled
- Output:
tnas-online disabled
XIV. System Logs
Note: All log management commands are remote commands and require authentication.
Parent Command: tos log
| Subcommand | Description |
|---|---|
view | View logs with event category, level, and line count filters |
clear | Clear logs (high-risk, irreversible, requires --yes) |
export | Export logs as a CSV file |
tos log view – View Logs
tos log view [event] [--level <level>] [--lines <n>] [--json]
Event Categories: all / system / connect / file / samba / ftp / storage / transmit (default: all)
Log Levels: all / info / warn / error (default: all)
Line Count: Defaults to 20 lines
Output Example:
TIME LEVEL MODULE USER MESSAGE
2026-04-23T10:00:00+08:00 INFO system - System started
tos log clear – Clear Logs (High-Risk)
tos log clear [event] [--level <level>] [--yes]
- High-risk operation: Irreversibly deletes log records
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes - Output:
Logs cleared: system
tos log export – Export Logs
tos log export [event] [--level <level>] [--output <path>]
- Exports logs of the specified category and level as a CSV file
- Defaults to current directory; use
--outputto specify a path - Output: File path and file size
XV. System Updates
Note: Update commands are remote commands and require authentication.
Parent Command: tos update
| Subcommand | Description |
|---|---|
check | Check for available updates |
install | Download and install updates (high-risk, requires --yes) |
tos update check – Check for Updates
tos update check [--json]
- Queries for available system updates
When updates are available:
Update available
Current Version 7.0.0447
Target Version 7.0.0559
Package Size 774.2 MB
When up to date: System is up to date
tos update install – Install Updates (High-Risk)
tos update install [--yes] [--force]
- High-risk operation: Downloads and installs system updates, may require a reboot
- Complete flow: Check for updates → Download package (with progress) → Install update (with steps) → Prompt to reboot
- Interactive mode prompts for confirmation; non-interactive mode requires
--yes --forceforces installation even if the check fails- SSH connection may disconnect during installation
- Output: Progress information + final result
XVI. Session Management
tos login – Login and Cache Session
tos login [-u <username>] [-P <password>] [--token-only]
- Without arguments: Interactive login (prompts for username and password)
--token-only: Outputs only the token string without saving the session file
# Interactive login
tos login
# Non-interactive login
tos login -u admin -P yourpassword
# Generate token (for CI/CD)
tos login -u admin -P yourpassword --token-only
tos logout – Clear Cached Session
tos logout
- Clears the TOS daemon's cached session
- Idempotent: Returns 0 if no session exists
- Output:
Logged out
Interactive vs. Non-Interactive Modes
The CLI intelligently detects whether it is running in a terminal environment:
Interactive Mode (Terminal Environment)
- Prompts for missing parameters step by step
- Displays
[y/N]confirmation prompts for high-risk operations - Password input is not echoed
Ctrl+Ccancels the operation (exit code 130)- Entering
nor pressing Enter cancels the operation (exit code 99)
Non-Interactive Mode (Scripts/CI/CD)
- All required parameters must be provided
- High-risk commands must use
--yesto skip confirmation - Missing parameters or missing
--yeswill cause an error (exit code 1)
JSON Output Format
All commands that support --json output structured JSON data for programmatic parsing.
Format Conventions:
- Field names use
snake_case - Boolean values are
true/false - Times use ISO 8601 format (e.g.,
2026-04-23T09:12:00+08:00) - JSON output goes to
stdout, error messages go tostderr
Example:
tos fileservice status --json
[
{"service_name": "smb", "enabled": true, "status": "running", "port": "445"},
{"service_name": "nfs", "enabled": false, "status": "stopped", "port": "-"}
]
Exit Codes
| Exit Code | Meaning | Typical Scenarios |
|---|---|---|
| 0 | Success | Command completed successfully |
| 1 | Parameter error | Missing required parameters, validation failure, missing --yes |
| 2 | Permission denied | Authentication failure or insufficient permissions |
| 3 | Resource not found | User/service/disk does not exist |
| 4 | Resource conflict | Resource already exists or state conflict |
| 5 | Resource busy | Operation in progress or device busy |
| 6 | Network error | Unable to connect to daemon |
| 7 | Timeout | Operation timed out |
| 8 | Partial success | Batch operation partially succeeded |
| 9 | Internal error | Unknown internal error |
| 10 | Session expired | Cached session expired, re-login required |
| 99 | User cancelled | Selected No or cancelled during interactive confirmation |
| 130 | Interrupted | User pressed Ctrl+C |
Use Case Examples
Daily Operations
# Login to TNAS
ssh admin@192.168.1.100
# View system status
tos info
# View disk health
tos disk list
# View online users
tos user online
Scripted Batch Operations
# Batch create users (import from CSV)
# userlist.csv format: username,password,group
while IFS=, read -r u p g; do
echo "$p" | tos user add "$u" --password-stdin --group "$g" --enabled true --yes
done < userlist.csv
# Schedule disk health monitoring with alerts
tos disk list --json | jq '.[] | select(.health != "normal")'
CI/CD Scenarios
# Generate a token
TOS_TOKEN=$(tos login -u admin -P $ADMIN_PASS --token-only)
export TOS_TOKEN
# Install an application
tos app install DockerEngine --path /Volume1 --yes
Frequently Asked Questions
Q: Does the CLI require additional installation?
No. The CLI is pre-installed in the TOS system. You can use the tos command directly after SSH login to the TNAS device.
Q: Why do some commands require authentication while others do not?
Local commands (such as tos info and tos fileservice) read/write system files or call systemd directly and do not require authentication. Remote commands need to communicate with the TOS daemon and therefore require authentication.
Q: Is the session cache file secure?
The session file (~/.tos/session.json) has permissions set to 0600, and passwords are stored encrypted using the daemon's RSA public key; plain text passwords are never saved.
Q: How do I use JSON output?
Add the --json flag to query commands, e.g., tos disk list --json.
Q: How do I confirm high-risk operations in non-interactive mode?
All high-risk commands must include the --yes parameter; otherwise, the command will exit with an error.
Additional Help
Every command supports --help for detailed usage information:
tos --help
tos user add --help
tos app install --help