Archive for the 'Linux' Category

screen

Screen is a terminal multiplexer. It is very useful if you want to run multiple programs/scripts at the same time and want to switch between them. You don’t need to open another terminal for it and it even keeps them running when you logoff from the terminal.

To install screen type:
#apt-get install screen

To run it type
#screen

Here a couple of useful shortcuts (C stands for Ctrl)

Shortcut Description
C-a c Create a new window
C-a n Jump to the next window
C-a p Jump to the previous window
C-a A Set a window name
C-a “ Overview of all windows
C-a K Close window (kill)
C-a d Detach screen
C-a S Split screen horizontally
C-a | Split screen vertically
C-a Q Remove splits
C-a {Tab} Switch between the window

To reattach a screen type:
#screen -r

No Comments »

admin on May 19th 2010 in Linux

Linux Network Testing

Tracert like in windows wit ICMP Echo request
#traceroute www.google.com –I

Show Routing Table
# nestat –nr
# route –n

Connection Statistic
# nestat –i
# mii-diag

Network Connections and Bind Ports
# netstat –a

Check DNS Settings
# dig www.google.com
# dig www.google.com mx
# nslookup www.google.com

I had to install the packages first to use this commands:
# apt-get install dnsutils

TCPDUMP
It is a very useful Network Sniffer for Linux. But first you need to install it:
# apt-get install tcpdump

Ex.
# tcpdump –nli eth0 port 80
# tcpdump –nli eth0 host 192.168.1.100 and port 80
# tcpdump –nli eth0 host 192.168.1.00 and not port 22
# tcpdump –nli eth0 src host 192.168.1.00 and not port 22

No Comments »

admin on May 18th 2010 in IT, Linux

Linux Network Settings

Check the state
# ifconfig –a

Activate/Deactivate Network Interface
# ifup eth0
# ifdown eth0

Hostname
# hostname
# uname -n
# vi /etc/hostname

Get an IP from the DHCP Server
# dhclient

Edit this file to setup a fix IP
#vi /etc/network/interfaces

auto eth0
iface eth0 inet static
      address 192.168.0.25
      netmask 255.255.255.0
      network 192.168.0.0
      broadcast 192.168.0.255
      gateway 192.168.5.1

# /etc/init.d/networking restart

Edit this file to setup DNS
#vi /etc/resolv.conf

order hotsts, bind
domain mydomain.local
nameserver 192.168.0.10

No Comments »

admin on May 17th 2010 in IT, Linux, Network

Manage Users in Debian

Create Groups
# group add finance
# group add development
# group add others

Create User and Assign to Groups
# useradd –m –g finance –G development,others –s /bin/csh testuser

Information about a User
# id testuser
# groups testuser

Modify and Delete a User
# usermod testuser
# userdel –r testuser

Deactivate User Account
# usermod –L testuser

Switch to a user and move to home directory
# su – testuser

Set a Password for a User
# passwd testuser

Set Password Policies
# chage testuser

User, Groups and Password Database
# /etc/passwd
# /etc/groups
# /etc/shadow

Template Directory for Home Folder
# /etc/skel/

No Comments »

admin on April 29th 2010 in Linux

Turn Off Annoying Bell in Debian

Edit the file with vim:
# vi /etc/inputrc

Remove comment:
set bell-style none

Or I prefer actually to have it visually displayed:
set bell-style visible

After that you need to restart debian.

No Comments »

admin on April 21st 2010 in Linux

PHP5 Interpreter Missing

Use following command in your shell:
#sudo apt-get install php5-cli

No Comments »

admin on February 25th 2010 in IT, Linux

sync time in debian with a ntp server

1. Install
apt-get install ntpdate

2. Create a new file in /etc/cron.hourly
#!/bin/bash
/usr/sbin/ntpdate your_timeserver >> /var/log/ntpdate.log

3. Give the file run rights
chmod +x file_name

No Comments »

admin on February 16th 2010 in IT, Linux

Install VMWare tools in debian

1. Install Kernel Heaeders

  1. Get the Kernel version and remember it with:
    uname-r
  2. apt-get install linux-headers-[Kernel Version]

2. Install VMWare Tools

  1. Choose “install and upgrade VMWTools in VMWare” in your VM menu
  2. mount /dev/hda /media/cdrom
  3. cd /media/cdrom/
  4. cp VMWareTools[whateverversion]tar.gz /tmp/
  5. cd /tmp
  6. tar xvzf VMWareTools[whateverversion]tar.gz
  7. umount /media/cdrom/
  8. cd /tmp/vmware-tools-distrib/
  9. make a symlink:
    ln –s /usr/src/linux-headers-[Kernel Version] /usr/src/linux
  10. apt-get install gcc-4.1
  11. change using gcc version:
    export CC=/usr/bin/gcc-4.1
  12. I had make and killall missing on my installation so can you get it:
    apt-get install psmisc make
  13. ./vmware-install.pl

3. Uninstall VMWare Tools
After a failed installation of VMWare Tools I got following message:
A previous installation of VMWare Software has been detected… You may want to re-install VMWare Tools.

The solution was to run the uninstaller first and run the VMWare setup again:
1. ./vmware-uninstall.pl

1 Comment »

admin on February 2nd 2010 in Linux, VMWare

Central File Storage and Access it from Iphone and different OS

Today I tested some tools which should make your life much easier. You know the pain when you work with different kind of Operating Systems (Linux, Mac OS, Windows) and you want to access your files from everywhere. Or it could be even on your smartphone device like iphone, blackberry etc. First of all there is dropbox which works pretty much like an remote folder. You can simply drag files into it and you have 2 GB server storage. Another one I tested and I like very much is evernote. You can even just select some text or picture in your browser and upload it to the server. It will be indexed and you can simply search for your files. There is even a OCR recognition for images. But to use this service you just have 50Mb storage per month and afterwards you need to pay for premium account.

Programs can found be here:
www.getdropbox.com
www.evernote.com

No Comments »

admin on November 3rd 2009 in Internet, Linux, MAC, Windows

Set Date/Time in Debian

Linux

Important: use two “-” before set!

  1.      dateset 1998-11-02
  2.      dateset 21:08:0

No Comments »

admin on January 28th 2009 in Linux




Check out new movies online website. Download and buy movies now.
12