Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, December 21, 2010

Thursday, April 15, 2010

Check what all ports running

If you know the port at which that service runs then issue the following command
[vijayan@boarddown-dr ~]$ netstat -an | grep LISTEN | grep 80
tcp 0 0 0.0.0.0:807 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN
tcp 0 0 :::80 :::* LISTEN

To know which process id owns this port
[vijayan@boarddown-dr ~]$ sudo /sbin/fuser 80/tcp
80/tcp: 25529 25530 25531 25532 25533 25534 28522

To know which executable/script runs on that process id
[vijayan@boarddown-dr ~]$ ps -lfwwwwwp 25529
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
5 S root 25529 1 0 75 0 - 953 - Feb17 ? 00:00:00 /home/vijayan/dev/Apache2/bin/httpd -k start

Wednesday, September 09, 2009

Seting gnome on Linux VNC server

In redhat linux, when we start VNC server, by default it used to start with a simple termial based view. Inorder to start it as gnome based session the following command can be used

  1. Set the vnc session as gnome
    > vi ~/.vnc/xstartup (remove all the lines and add only the following lines)
    unset SESSION_MANAGER
    vncconfig -iconic &
    gnome-session &
  2. Start VNC server
  3. > vncserver - geometry 1024x768
Use the correct ip address and X-display id to connect to the VNC e.g. 10.66.92.127:1