Basic commands to get around the Synology Box using the CLI: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Falcon359
(New page: '''1. Basic commands''' A. To go to a directory, command: cd /directory name B. To make a directory, command: mkdir /directory name C. Directory list, command: dir D. To find...)
 
imported>Franklin
m (Presentation update)
Line 1: Line 1:
'''1. Basic commands'''
__TOC__
  A. To go to a directory, command: cd /directory name
 
  B. To make a directory, command: mkdir /directory name
==File Management==
  C. Directory list, command: dir
===To go to a directory===
  D. To find a file, command: find / -name "file name"
{| border="0" cellpadding="0" style="text-align:left"
  E. To delete a file, command: rm file name
|-
  F. To delete directory and its content, command: rm –r directory name
|<pre>cd /directoryName</pre>
  G. To move or rename a file, command: mv /directory name/file name /destination directory
|-
  H. To copy a file or files, command: cp /directory name/file name /destination directory
|}
  I. For more than one file, command: cp /directory name/*.* /destination directory
 
  J. To reboot the Synology box, command: reboot
===Make a directory===
  K. To shutdown the Synology box, command: poweroff
{| border="0" cellpadding="0" style="text-align:left"
  L. Clear terminal screen, command: clear
|-
  M. To stop a process, command: kill process id
|<pre>mkdir /directoryName</pre>
  N. To stop a program, command: killall program name
|-
  O. Check system memory, command: cat /proc/meminfo or free
|}
  P. Check system CPU, command: cat /proc/cpuinfo
 
  Q. Check for interrupts in use, command: cat /proc/interrupts
===List Directory===
  R. Check file system being used, command: cat /proc/filesystems
{| border="0" cellpadding="0" style="text-align:left"
  S. Check linux version, command, cat /proc/version
|-
  T. Shows the most current processes running, command: top
|<pre>dir</pre>
  U. Shows all processes running, command: ps –ef
|-
  V. To install program, command:  ipkg install file name
|}
  W. To remove a program, command:  ipkg remove file name
 
===Find a file===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>find / -name fileName</pre>
|-
|}
 
===Delete a file===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>rm fileName</pre>
|-
|}
 
===Delete a director and it's content===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>rm -r directoryName</pre>
|-
|}
*Note: Use this command with great care
 
===Move or Rename a file===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>mv /sourceDirectory/sourceFile /destination</pre>
|-
|}
 
===Copy a file===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cp /sourceDirectory/sourceFile /destination</pre>
|-
|}
 
===Copy groups of files===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cp /sourceDirectory/*.* /destination</pre>
|-
|}
 
 
==System Management==
 
===Reboot the Synology box===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>reboot</pre>
|-
|}
 
===Shutdown the Synology box===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>poweroff</pre>
|-
|}
 
===Stop a process===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>kill processID</pre>
|-
|}
 
===Stop a program===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>killall programName</pre>
|-
|}
 
===Display most current processes running===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>top</pre>
|-
|}
 
===Show all current processes===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>ps –ef</pre>
|-
|}
 
===Install program===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>ipkg install fileName</pre>
|-
|}
 
===Uninstall programs===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>ipkg remove file name</pre>
|-
|}
 
 
==System Information==
 
===Check system memory info===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cat /proc/meminfo</pre>
|-
|}
 
===Check CPU Info===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cat /proc/cpuinfo</pre>
|-
|}
 
===Check Interrupts in use===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cat /proc/interrupts</pre>
|-
|}
 
===Check File Systems in use===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cat /proc/filesystems</pre>
|-
|}
 
===Check Linux Version===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>cat /proc/version</pre>
|-
|}
 
 
==Miscellaneous==
===Clear terminal screen===
{| border="0" cellpadding="0" style="text-align:left"
|-
|<pre>clear</pre>
|-
|}

Revision as of 09:06, 10 February 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 director and it's 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


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 program

ipkg install fileName

Uninstall programs

ipkg remove file name


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


Miscellaneous

Clear terminal screen

clear