Friday 22 February 2019

Linux: Useful Commands

Check Serial number for Linux machines

dmidecode -s system-serial-number

Find the number of Physical core in Linux

cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

Friday 15 February 2019

VNC server Commands


Enable GUI Mode in VNC

Add "gnome-session &" to the file /root/.vnc/xstartup as below and start new session of VNC

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
gnome-session &


Kill VNC session:

vncserver -kill <:{vncserver session id}>

eg: vncserver -kill :1


Start VNCserver:

Command: vncserver to start VNC server


Change Password of VNC server serssion

Command: vncpasswd


SQL Developer displaying Junk characters (??????)

Change the Encoding in SQL Developer Preferences as below Tools --> Preferences --> Environment --> Encoding --> UTF...