Sie sind auf Seite 1von 2

DCAT - LINUX COMMANDS QUICK REFERENCE CARD

Linux: Linux Basic Commands and Functions continued:


Ubuntu Linux is the base OS for all Datto units Command Description
(Ubuntu 10.04 LTS or 12.04) locate [file or directory] Locates a file or a directory
All Datto Devices OS single or RAIDed HDDs, SSDs specified
or gumstick SSDs
top or htop Displays the top processes
Most regular (non-ShadowSnap) functionality can running
be accessed with Ubuntu Linux commands
Modifiers/Switches: nano Text Editor
dmesg Shows the system log from
What is a modifier? A modifier is a flag that is cat /var/log/syslog the device boot time
appended to a certain part of a command to allow it to checkin Manually triggers the Datto
search, print or manage the command in a format that Device to communicate with
one would need. Dattos monitoring servers
reboot Sends the Datto a soft reboot
Tips:
free m Displays the current amount
There are many different types of modifiers for of free RAM on a Datto in
nearly all Linux and ZFS commands. megs
You can use man and --help in conjunction with mkdir [directory name] Creates a directory
commands to see what they can do. For example: lsscsi Lists hard drives in a Datto
Device
man df or df help
apt-get install package- Downloads and installs Linux
grep and less: name packages
iostat x 1 Displays hard drive I/O
What is grep? The command grep can be appended
utilization
to a command to filter for or out certain parameters.
lsof | grep [query] Shows what process is utilizing
Example: ps ax | grep php-cgi a specified query
ps ax | grep [query] Searches for a process name
What is less? The command less can be appended to listed in the display of all
a command to print a large amount of information to running processes
allow one to scroll through. Use Page Up and Page Does a SMART check of
Down to scroll through the print out. smartctl a whatever drive is selected
/dev/sd[driveLetter]
Example: dmesg | less
cat /[directory]/**/[file Outputs the process that a
name] roundtrip has attempted
Linux Basic Commands and Functions: cat /var/log/syslog
*commands are typed lowercase unless specified cat /proc/mdstat Outputs the MD Array status
Command Description of a Linux machine
cd [directory] changes directory mount /dev/[logical sets the file system to be
disk/file system][partition mounted to a specified
ls List directory command
number] /directory directory
df h Displays the Filesystem mountpoints
and sizes in a Human readable format i.e. mount /dev/loop1p1
du sh * Directory usage in a human readable /datto/mounts/.
format viewed as a summary umount [directory] command to unmount the
directory

Page 1
Linux Basic Commands and Functions continued: Screen:
Loop devices are virtual HDDs. They have disk and Command Description
partition representations screen ls Displays all running screens
What do loop devices look like? /dev/loop1p1 screen S [name of Creates a new screen with a
This means that there is a virtual disk (loop1) and a screen] specified name
partition on that virtual disk (p1) screen r [PID or Name of screen]
How are loop devices used on a Datto unit? Resumes a screen
-Loop devices are used to create a virtual disk to mount CTRL + A + D Simultaneously press the CTRL A
in Linux for a file restore D to exit a screen without killing
-Loop devices are used to merge the COW images into the screen
the Datto images to create a bootable sparse image for
virtualization SAMBA:
Note: These should get destroyed after the HIR process is An open source implementation of the SMB file sharing
complete before the virtualization protocol that provides file and print services to SMB/CIFS
clients. Samba allows a non-Windows server to
Command Description communicate with the same networking protocol as the
losetup f [files] Associates a loop device to a Windows products.
.datto sparse image
Command Description
losetup a Displays any running loop service smbd [status, Get a status, start, stop or
devices and what files are start, stop, restart] restart SAMBA
being used with them nano Where to edit SAMBA
losetup d Disassociates a loop device /etc/samba/smb.conf configurations
/dev/loop[loopNumber] from a .datto sparse image smbstatus Notifies what SAMBA is using at
a point in time
Ifconfig:
Command Description
ifconfig Displays all the networking
information for all active NICs
ifconfig eth1 up Turns on the second NIC of
the Datto
ifconfig eth1 down Turns off the second NIC of
the Datto

Changing Network Settings:


Command Description
nano ONLY ON 1st Gen Devices
/etc/resolv.conf Set DNS resolution. Have public DNS
resolution
[/etc/init.d/restart networking]
traceroute [IP Displays route used by IP packets on
Address] their way to a specified IP
nmap [IP Address] Checks if specified port is open to a
p [port] specified destination
iftop Monitors all traffic flowing through
the NIC(s)
iftop i eth0 Monitors all traffic in/outbound
from specified NIC
This is the command to also see if a
diff merge is running

Page 2

Das könnte Ihnen auch gefallen