Skip to content

Instantly share code, notes, and snippets.

View zoechi's full-sized avatar

Günter Zöchbauer zoechi

View GitHub Profile
@zoechi
zoechi / Send signal
Created June 1, 2013 13:05
Send signal to a process
kill -s SIGUSR1 $(pidof /usr/sbin/dnsmasq)
@zoechi
zoechi / open ports
Created May 31, 2013 15:51
open ports
netstat -lptan
netstat -lptu
netstat -lptun
# -l listen
# -p process name
# -t tcp
# -a established connections
# -n numeric addresses
# -u udp
@zoechi
zoechi / Create new group
Created May 30, 2013 13:42
Create new group
addgroup zburbach
addgroup --gid 1002 zburbach # with specific gid
@zoechi
zoechi / Add user to group
Created May 30, 2013 13:41
Add existing user to existing group
usermod -a -G groupname username
@zoechi
zoechi / Mount NFS share
Created May 30, 2013 13:21
Mount NFS share
mount -t nfs4 -o proto=tcp,port=2049 server.domain.local:/share /mnt/mountdir
@zoechi
zoechi / Mount partition of directory
Created May 24, 2013 05:50
Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTFM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..) http://stackoverflow.com/questions/3274354/how-to-find-out-mount-partition-a-directory-or-file-is-on-linux-server
df -P file/goes/here | tail -1 | cut -d' ' -f 1
@zoechi
zoechi / RDP Client
Created May 23, 2013 16:18
RDP Client
rdesktop
@zoechi
zoechi / List drives
Created May 20, 2013 17:26
List drives
lsblk
@zoechi
zoechi / Change TimeZone
Created May 20, 2013 16:16
Change TimeZone
dpkg-reconfigure tzdata
@zoechi
zoechi / Show system usage
Created May 20, 2013 15:21
Show system usage
dstat