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
admin on May 19th 2010 in Linux
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
admin on May 18th 2010 in IT, Linux
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
admin on May 17th 2010 in IT, Linux, Network
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/
admin on April 29th 2010 in Linux
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.
admin on April 21st 2010 in Linux
Use following command in your shell:
#sudo apt-get install php5-cli
admin on February 25th 2010 in IT, Linux
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
admin on February 16th 2010 in IT, Linux
1. Install Kernel Heaeders
- Get the Kernel version and remember it with:
uname-r
- apt-get install linux-headers-[Kernel Version]
2. Install VMWare Tools
- Choose “install and upgrade VMWTools in VMWare” in your VM menu
- mount /dev/hda /media/cdrom
- cd /media/cdrom/
- cp VMWareTools[whateverversion]tar.gz /tmp/
- cd /tmp
- tar xvzf VMWareTools[whateverversion]tar.gz
- umount /media/cdrom/
- cd /tmp/vmware-tools-distrib/
- make a symlink:
ln –s /usr/src/linux-headers-[Kernel Version] /usr/src/linux
- apt-get install gcc-4.1
- change using gcc version:
export CC=/usr/bin/gcc-4.1
- I had make and killall missing on my installation so can you get it:
apt-get install psmisc make
- ./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
admin on February 2nd 2010 in Linux, VMWare
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
admin on November 3rd 2009 in Internet, Linux, MAC, Windows
Important: use two “-” before set!
-
date –set 1998-11-02
-
date –set 21:08:0
admin on January 28th 2009 in Linux