Basic commands to get around the Synology Box using the CLI: Difference between revisions
Jump to navigation
Jump to search
imported>RobinGB |
imported>Franklin m (alphabetizing restarting) |
||
Line 171: | Line 171: | ||
|} | |} | ||
=== | ===appletalk=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S81atalk.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
=== | ===ftp=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S99ftpd.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
=== | ===index=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S66synoindexd.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
=== | ===itunes=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S99itunes.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
=== | ===mysql=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S21mysql.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
=== | ===nfs=== | ||
{| border="0" cellpadding="0" style="text-align:left" | {| border="0" cellpadding="0" style="text-align:left" | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/ | |<pre>/usr/syno/etc/rc.d/S83nfsd.sh restart</pre> | ||
|- | |- | ||
|} | |} | ||
Line 217: | Line 217: | ||
|- | |- | ||
|<pre>/usr/syno/etc/rc.d/S20pgsql.sh restart</pre> | |<pre>/usr/syno/etc/rc.d/S20pgsql.sh restart</pre> | ||
|- | |||
|} | |||
===samba=== | |||
{| border="0" cellpadding="0" style="text-align:left" | |||
|- | |||
|<pre>/usr/syno/etc/rc.d/S80Samba.sh restart</pre> | |||
|- | |- | ||
|} | |} |
Revision as of 19:44, 25 April 2008
File Management
To go to a directory
cd /directoryName |
Make a directory
mkdir /directoryName |
List Directory
dir |
Find a file
find / -name fileName |
Delete a file
rm fileName |
Delete a directory and its content
rm -r directoryName |
- Note: Use this command with great care
Move or Rename a file
mv /sourceDirectory/sourceFile /destination |
Copy a file
cp /sourceDirectory/sourceFile /destination |
Copy groups of files
cp /sourceDirectory/*.* /destination |
Copy a directory and any sub directories
cp -r -p /sourceDirectory /destinationpath |
Create a uncompressed tar (.tar) archive
To create a uncompressed (.tar) archive of all files directories and subdirectories in the current directory:
tar -cvf archivefilename.tar * |
Create a compressed tar (.tgz) archive
To create a compressed (.tgz) archive of all files directories and subdirectories in the current directory:
tar -cvzf archivefilename.tgz * |
Unpack .tar archives
For uncompressed .tar archives:
tar xvf file.tar |
For gzip compressed .tar.gz archives:
tar xvzf file.tar.gz |
System Management
Reboot the Synology box
reboot |
Shutdown the Synology box
poweroff |
Stop a process
kill processID |
Stop a program
killall programName |
Display most current processes running
top |
Show all current processes
ps –ef |
Install a ipkg program package
Note: This assumes you have already installed ipkg itself.
ipkg install fileName |
Uninstall a ipkg program package
ipkg remove filename |
Restart Services
apache
/usr/syno/etc/rc.d/S97apache-user.sh restart |
appletalk
/usr/syno/etc/rc.d/S81atalk.sh restart |
ftp
/usr/syno/etc/rc.d/S99ftpd.sh restart |
index
/usr/syno/etc/rc.d/S66synoindexd.sh restart |
itunes
/usr/syno/etc/rc.d/S99itunes.sh restart |
mysql
/usr/syno/etc/rc.d/S21mysql.sh restart |
nfs
/usr/syno/etc/rc.d/S83nfsd.sh restart |
postgresql
/usr/syno/etc/rc.d/S20pgsql.sh restart |
samba
/usr/syno/etc/rc.d/S80Samba.sh restart |
SSH
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart |
System Information
Check system memory info
cat /proc/meminfo |
Check CPU Info
cat /proc/cpuinfo |
Check Interrupts in use
cat /proc/interrupts |
Check File Systems in use
cat /proc/filesystems |
Check Linux Version
cat /proc/version |
Check Devices
cat /proc/mdstat |
Check Enviroment Variables
env |
Miscellaneous
Clear terminal screen
clear |