For info on how to use vi see Basic commands for Linux vi Editor
vi /location_of_file/file_name
cd /directoryName
mkdir /directoryName
dir
find . -type f | wc -l
du -ah /path/to/dir
find / -name fileName
rm fileName
rm -r directoryName
*Note: Use this command with great care
mv /sourceDirectory/sourceFile /destination
cp /sourceDirectory/sourceFile /destination
cp /sourceDirectory/*.* /destination
cp -r -p /sourceDirectory /destinationpath
To create a uncompressed (.tar) archive of all files directories and subdirectories in the current directory:
tar -cvf archivefilename.tar *
To create a compressed (.tgz) archive of all files directories and subdirectories in the current directory:
tar -cvzf archivefilename.tgz *
For uncompressed .tar archives:
tar xvf file.tar
For gzip compressed .tar.gz archives:
tar xvzf file.tar.gz
reboot
poweroff
kill processID
killall programName
top
df
ps
netstat -an
If you are logged in as root you can open a new shell as if you just logged in as another user, substitute xxx with the user name. To return to root session use “exit”
su – xxx
Note: This assumes you have already installed ipkg itself.
ipkg install fileName
ipkg remove filename
/usr/syno/etc/rc.d/S97apache-user.sh restart
/usr/syno/etc/rc.d/S81atalk.sh restart
/usr/syno/etc/rc.d/S04crond.sh stop /usr/syno/etc/rc.d/S04crond.sh start
/usr/syno/etc/rc.d/S99ftpd.sh restart
/usr/syno/etc/rc.d/S66synoindexd.sh restart
/usr/syno/etc/rc.d/S99itunes.sh restart
/usr/syno/etc/rc.d/S21mysql.sh restart
/usr/syno/etc/rc.d/S83nfsd.sh restart
/usr/syno/etc/rc.d/S20pgsql.sh restart
/usr/syno/etc/rc.d/S80samba.sh restart
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart
cat /proc/meminfo
cat /proc/cpuinfo
cat /proc/interrupts
cat /proc/filesystems
tune2fs -l /dev/hda3
cat /proc/version
cat /proc/mdstat
env
For multibay NASs and more info
cat /proc/diskstats
or for all NAS types
cat /proc/partitions
or for similar but different info
fdisk -l
clear
uname -r
cat /etc/* -release
vi /etc/passwd
, then replace: /sbin/nologin
–> /bin/ash
This howto was taken from Basic commands to get around the Synology Box using the CLI