Archive for the 'Linux' Category

How to find out if linux is 32 bit or 64 bit

Run the following command in your console:

# uname –a


  • i386/i686


  • x86_64

No Comments »

admin on May 20th 2011 in IT, Linux

Rename Host Name Linux

Just edit the name in these two files:
# vi /etc/hostname
# vi /etc/hosts

After that restart the server:
# shutdown –r now

You could also just restart the network. But this was the lazy and easier way;-)

No Comments »

admin on January 25th 2011 in IT, Linux

Search a string in Linux

This is a full text search in all the files in the current directory and subdirectories.

grep –r “test” .

No Comments »

admin on December 3rd 2010 in Linux

Mount Windows Shares from Linux

Lists Shares
smbclient –U %USERNAME% –L %SERVER%

get Get Files from the Remote Machine
put Put Files on the Remote Machine

Mount Shares
Create a Mount directory and connect to it
mount –t smbfs –o username=%USERNAME%,password=%PASSWORD% //%SHARENAME% %MOUNTDIRECTORY%

No Comments »

admin on November 11th 2010 in Linux


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

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 list all detached screens:
#screen -list

To reattach a screen type:
#screen -r [Number]

To close a detached screens type:
#screen -S [Number] -X quit

No Comments »

admin on May 19th 2010 in Linux

Linux Network Testing

Tracert like in windows wit ICMP Echo request
#traceroute –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
# dig mx
# nslookup

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

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

# tcpdump –nli eth0 port 80
# tcpdump –nli eth0 host and port 80
# tcpdump –nli eth0 host and not port 22
# tcpdump –nli eth0 src host 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
# 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

# /etc/init.d/networking restart

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

order hotsts, bind
domain mydomain.local

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

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