Schlagwort: Debian

Leave a reply

Basic Linux (Debian/Mac) Commands

 Time information

# Command: timedatectl

root@debian:/home/pi# timedatectl
      Local time: Sun 2017-06-25 16:37:23 CEST
  Universal time: Sun 2017-06-25 14:37:23 UTC
        RTC time: Sun 2017-06-25 14:37:21
       Time zone: Europe/Vienna (CEST, +0200)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2017-03-26 01:59:59 CET
                  Sun 2017-03-26 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2017-10-29 02:59:59 CEST
                  Sun 2017-10-29 02:00:00 CET

Show space on mounted harddrives (human readable)

# Command df -h

root@debian:/home/pi# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       189G   26G  154G  15% /
udev             10M     0   10M   0% /dev

Show information attached HD

# Command ls -l /sys/block/sd* | sed 's/.*\(sd.*\) -.*\(ata.*\)\/h.*/\2 => \1/'

root@debian:/home/pi# ls -l /sys/block/sd* | sed 's/.*\(sd.*\) -.*\(ata.*\)\/h.*/\2 => \1/'
ata3 => sda

Show information about harddrive

# Command: hdparm -I /dev/sda

# maybe you have to install hdparm with (apt-get install hdparm)

root@debian:/home/pi# hdparm -I /dev/sda


ATA device, with non-removable media
	Model Number:       VBOX HARDDISK                           
	Serial Number:      VB7749bd7c-37a37909 
	Firmware Revision:  1.0     
	Used: ATA/ATAPI-6 published, ANSI INCITS 361-2002 
	Supported: 6 5 4 
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:  268435455
	LBA48  user addressable sectors:  419430400
	Logical/Physical Sector size:           512 bytes
	device size with M = 1024*1024:      204800 MBytes
	device size with M = 1000*1000:      214748 MBytes (214 GB)
	cache/buffer size  = 256 KBytes (type=DualPortCache)
	LBA, IORDY(cannot be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Vendor, no device specific minimum
	R/W multiple sector transfer: Max = 128	Current = 128
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
	Enabled	Supported:
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	   *	48-bit Address feature set
	   *	Mandatory FLUSH_CACHE
	   *	Gen2 signaling speed (3.0Gb/s)
	   *	Native Command Queueing (NCQ)
Checksum: correct

Unpack .tgz files

#unpack in the same folder

tar zxvf file.tgz

#unpack in a different location
tar zxvf file.tgz -C /path/to/desination

Unpack .zip files

apt-get install unzip


Find files

"find" "path" "type" "Name"

find / -name "EXAMPLE"

Important OSX Commands for me 🙂

find TimeLapse/ -name "*.JPG" -exec mv '{}' JPG/ \;

Argon One Pi 4 Fan Control scirpt and commands

curl | bash
curl | bash

#change the config for the fan 
#default 55c - 10%
#default 60c - 55%
#default 65c - 100%


Mac turn off packet signing for SMB 2 and SMB3

sudo -s
echo "[default]" >> /etc/nsmb.conf
echo "signing_required=no" >> /etc/nsmb.conf

Leave a reply

Virtual Box with Debian – Mount Shared Folder

Manually mount

After installing the Guest Additions (LINK) you can use Shared Folders between the host and the guest.
For this you have to add Folders in the „Machines Settings“ and then the section „Shared Folders“
For mounting them in the Guest Debian System you have to use following command:

mount -t vboxsf [-o OPTIONS] sharename mountpoint

# Example:
mount -t vboxsf Downloads /tmp/Downloads

Before you mount them you should create the target folder by using mkdir (if not you will get the same error like you can see it here:

root@debian:/home/pi# mount -t vboxsf Downloads /tmp/Downloads
/sbin/mount.vboxsf: mounting failed with the error: No such file or directory
root@debian:/home/pi# mkdir /tmp/Downloads
root@debian:/home/pi# mount -t vboxsf Downloads /tmp/Downloads

Automount (using Virtual Box’s help)

If you klick on the „Auto-mount“ checkbox Virtual Box will automatically mount the Folder into the Debian’s /media/sf_“foldername“

In my tests (Debian 8) only the root had rights. I was not able to change this.


Mount via cron.d (for not root user, accessible )

Find your UUID:

 id -u username

Create a file in the folder (/etc/cron.d) (UUID=1000)

#login as root
@reboot root mount -t vboxsf -o uid=1000 Downloads /media/Downloads

reboot, Thats it




Leave a reply

Install Virtual Box Guest Additions Debian 8 & 9

1. Insert Guest Additions CD image (Devices -> „Insert Guest Additions CD image …)
2. Open Terminal (at the guest) and get root (su root)
3. Update you Database and install the last updates

apt-get update
apt-get upgrade

4.Install required packages and prepare the machine with

apt-get install build-essential module-assistant 
m-a prepare

5. Find the device name of you CD Drive (in our Case sr0) using lsblk

root@debian:/# lsblk
sda                         8:0    0   500G  0 disk 
├─sda1                      8:1    0   243M  0 part /boot
├─sda2                      8:2    0     1K  0 part 
└─sda5                      8:5    0 499.8G  0 part 
  ├─ml--master--vg-root   254:0    0 491.8G  0 lvm  /
  └─ml--master--vg-swap_1 254:1    0     8G  0 lvm  [SWAP]
sr0                        11:0    1  56.6M  0 rom

6. Mount the Guest Additions CD

root@debian:/# mount /dev/sr0 /media/cdrom

mount: /dev/sr0 is write-protected, mounting read-only


7. Go to the folder where you have mounted the Guest Additions CD (/media/cdrom) and start the installation by typing this

cd /media/cdrom/

After this you should see following screen:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.18 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ... Building Guest Additions kernel modules. Starting the VirtualBox Guest Additions.

You may need to restart the Window System (or just restart the guest system)
to enable the Guest Additions.

Reboot and you are done


VirtualBox Version
Version 5.1.18 r114002 (Qt5.6.2)
MacOSX Versions

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.