Jump to content
XPEnology Community

Command line Cheat List


Polanskiman

Recommended Posts

The list below is not meant to be comprehensive nor to explain in detail the ins and outs of each command. This is more of a cheat list of commands that I have used or seen used among members through the years.

 

Displays the content of the directory you are in. Both files and directories are displayed:

ls -la

Displays information about the disk space in gigabytes:

df -h

Displays information about the machine and operating system it is run on:

uname -a

Displays your machine uptime since last boot:

uptime -p

Displays memory use in a human-readable output:

free -w -h

Shows the directory you are currently in:

pwd

Shows a frequently updated list of the processes running on your machine (press ctrl+c to exit):

htop

List USB buses and device:

lsusb

List PCI buses and devices:

lspci

Lists partitions:

fdisk -l

Displays a compact and summarized list of all usb controllers with associated vid/pid:

cat /proc/bus/usb/devices | grep -e "^ $" -e "Vendor" -e "Manufacturer" -e "Product"

Provides comprehensive hardware information:

dmidecode

Shows a snapshot of the kernel's RAID/md state by reading the /proc/mdstat file:

cat /proc/mdstat 

Displays what type of processor your system is running including the number of CPUs present:

cat /proc/cpuinfo

Displays information about CPU:

dmidecode -t 4

Get the status of all services running either started or stopped:

synoservice -status

Displays in real time entries in all logs under /var/log (press ctrl+c to exit):

find ../var/log -name "*.log" | xargs tail -f

Displays the message buffer of the kernel:

dmesg

Will reboot your machine:

reboot

 

None of the commands provided above are destructive. Now if you go and change some of the flags (options) in some of the commands, they could become destructive SO if you don't know what you are doing don't test your luck. I will not be held responsible for your sloppiness. In other words, if you don't know why you need to use a command, then you are better of investigating first on google the intricacies of said command.

If you need help on a specific utility simply use the '--help' flag following the utility's name, for instance if you want to know what options are available for the "cat" utility, then type "cat --help" and it will output what options are available.

 

The 'dmidecode' utility is not available on my DS214 but since with Xpenology we are all using 3615, 3617 or 918 it should be present in all 3 models.

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...