Linux info

Basic Commands:

DOS Linux
cd\ cd/
del rm
md mkdir
rd rmdir
cls clear
dir ls
tree ls -R
ren mv
edit pico
copy cp
 

shutdown -h now or halt - shutdown the box

reboot - reboot box

ifconfig - view network interfaces

iwconfig - view wireless interfaces

/etc/init.d/"service" start,restart,stop - start stop or restart a service

top - view proccess

vncserver - start vncserver

vncserver [-clean] -kill :<number> - kill desktops

uptime - who knows?

cd - change dir

cd~ - go staight to home dir

wavemon - view wireless info

ping -c 5 - ping computer. use the -c 5 command means it will ping the host 5 times. If not used it will ping forever.

netstat - with internet stats

nmap - network stats

mkdir -p hi/when/where - create more than one dir at a time

ls -l - show perimssions

chmod 775 text.txt

dir or file

owner

4+2+1

group

4+1

other

4+1

=

755

d rwx r-x r-x =755
- rwx rwx r-x =775
read r = 4
write w= 2
execute x = 1
               = 7

finger - show users

chfn - change user info



This is my current mrtg file location \etc\mrtg\mrtg.cfg: Some of it is from the atomicmpc cfg, but i have added to it.


# Defaults

WorkDir: /var/www/mrtg
Interval: 10
MaxBytes[_]: 1000000
XSize[_]: 380
YSize[_]: 140
#SetEnv[_]: EMAIL="ivile@ivile.tk"
#HOST="127.0.0.1"
#URL="http://www.ivile.tk/mrtg/":
# eth0

Title[host-eth0]: Traffic statistics - eth0
Options[host-eth0]: gauge,growright,noinfo,nopercent,integer
kMG[host-eth0]:M,G,T,P
Target[host-eth0]: `/usr/bin/monthlystats eth0`
PageTop[host-eth0]: <H1>Traffic statistics for Routerd - eth0, Intel Pro 100B, 10/100</H1>
<H3>Totaled monthly</H3>
YLegend[host-eth0]: MBytes
ShortLegend[host-eth0]:Bytes
Legend1[host-eth0]: Incoming Traffic
Legend2[host-eth0]: Outgoing Traffic
Legend3[host-eth0]: Maximum Incoming Traffic
Legend4[host-eth0]: Maximum Outgoing Traffic
LegendI[host-eth0]: &nbsp;In:
LegendO[host-eth0]: &nbsp;Out:
WithPeak[host-eth0]: ymwd
#kilo[host-eth0]: 1024

# eth1

Title[host-eth1]: Traffic statistics - eth1
Options[host-eth1]: gauge,growright,noinfo,nopercent,integer
Target[host-eth1]: `/usr/bin/monthlystats eth1`
PageTop[host-eth1]: <H1>Traffic statistics for Routerd - eth1, Orinoco Silver, Wireless 11Mbs</H1>
<H3>Totaled monthly</H3>
YLegend[host-eth1]: MBytes
ShortLegend[host-eth1]:Bytes
Legend1[host-eth1]: Incoming Traffic
Legend2[host-eth1]: Outgoing Traffic
Legend3[host-eth1]: Maximum Incoming Traffic
Legend4[host-eth1]: Maximum Outgoing Traffic
LegendI[host-eth1]: &nbsp;In:
LegendO[host-eth1]: &nbsp;Out:
WithPeak[host-eth1]: ymwd
kMG[host-eth1]:M,G,T,P
#kilo[host-eth1]: 1024
# uptime

Target[uptime]: `echo '0'; expr $(cat /proc/uptime |awk -F . '{print $1}') / 86400`
Options[uptime]: gauge,growright,noinfo,nopercent,noi,integer
Title[uptime]: Uptime
YLegend[uptime]: Days up
ShortLegend[uptime]: days
LegendI[uptime]:
LegendO[uptime]: Uptime:
PageTop[uptime]: <H1>Uptime for Routerd</H1>

# cpuinfo

Target[machine]: `/usr/bin/cpuinfo.pl localhost linux`
MaxBytes[machine]: 100
Options[machine]: gauge,nopercent,growright,noinfo,integer
Unscaled[machine]: dwym
YLegend[machine]: % of CPU used
ShortLegend[machine]: %
LegendO[machine]: &nbsp;CPU System:
LegendI[machine]: &nbsp;CPU Root:
Title[machine]: Machine Routerd
PageTop[machine]: <H1>CPU usage for Machine Routerd
</H1>
<TABLE>
<TR><TD>System:</TD><TD>Machine Routerd</TD></TR>
</TABLE>

#Show disk a

Target[hostAdisk]: `/root/mrtg/showdisk.pl localhost 1`
Title[hostAdisk]: Routerd's Root partition % used
MaxBytes[hostAdisk]: 766682
PageTop[hostAdisk]: <H1> Routerd's Root partition % used </H1>
#kMG[hostAdisk]: M,G,T,P
Factor[hostAdisk]: 10000
Suppress[hostAdisk]: y
LegendI[hostAdisk]: Mbytes used
#LegendO[hostAdisk]:
#Legend1[hostAdisk]: Gbytes used
#Legend2[hostAdisk]:
YLegend[hostAdisk]: Mbytes used
#Unscaled[hostAdisk]: dwym
ShortLegend[hostAdisk]: bytes
#kilo[hostAdisk]: 1024
Options[hostAdisk]: gauge,growright,noo,integer,noinfo

# memory

#Target[memory]: `/root/mrtg/memory.pl`
#Options[memory]: gauge,nopercent,growright,noinfo
#Unscaled[memory]: dwym
#YLegend[memory]: Mbytes
#ShortLegend[memory]: Mbytes
#LegendO[memory]: &nbsp;memory Ram:
#LegendI[memory]: &nbsp;memory Swap:
#Title[memory]: Machine routerd
#PageTop[memory]: <H1>Memory usage for Machine routerd</H1>


Title[memory]: Traffic statistics - memory
Options[memory]: nopercent,growright,noinfo
MaxBytes[memory]: 1000
Target[memory]: `/root/mrtg/memory.pl`
PageTop[memory]: <H1>Traffic statistics for Routerd -memory</H1>
<H3>Totaled monthly</H3>
YLegend[memory]: Mbytes
ShortLegend[memory]: Mbytes
LegendI[memory]: &nbsp;swap:
LegendO[memory]: &nbsp;ram:

# noofhits

#Target[ping]: `/root/mrtg/ping.pl`
#Options[ping]: gauge
#MaxBytes[ping]: 1000
#Title[ping]: Number of Ping attempts on machinename
#YLegend[ping]: Ping Attempts
#ShortLegend[ping]: Ping
#LegendO[ping]:
#PageTop[ping]: <H1>Number of Ping attempts on machinename
# <BR></H1>
# <TABLE>
# <TR><TD>System:</TD><TD>machinename </TD></TR>
# <TR><TD>Maintainer:</TD><TD>whoever</TD></TR>
# <TR><TD>Interface:</TD><TD>Number of Ping attempts on machinename</TD></TR>
# <TR><TD>IP:</TD><TD>x.x.x.x</TD><TR>
# <TR><TD>Max Amount:</TD>
# <TD>1000 </TD></TR>
# </TABLE>

# firewall need ipfstats installed to work

#Target[firewall]: `/root/mrtg/firewall.pl`
#Options[firewall]: growright, noinfo, perhour
#MaxBytes[firewall]: 50000
#Title[firewall]: IP-Filter
#PageTop[firewall]: <center>
# <h1><font color=red>Firewall Traffic Analysis</font></h1>
# <h3>Syn/Ack Packets Passed (Connections) on le1 (24.7.4.75)</h3>
# </center>
#YLegend[firewall]: Packets per Hour
#ShortLegend[firewall]: pkts/hr
#Legend1[firewall]: Inbound connections per hour
#Legend2[firewall]: Outbound connections per hour


##


This is my current Vnc.conf \etc\ all i do now is type "vncserver" in the console.
Then XXX.XXX.XXX.XXX:1 in vnc viewer where x is the ip. or use hostname:1
You can have more than 1 "vitual" desktop by starting more than one vncserver change the :1 to :2 etc.

If you wnat to use this you may want to change the resolution to 800x600 if you have a lower res monitor.



$vncUserDir = "$ENV{HOME}/.vnc";

# $vncPasswdFile contains the filename of the password file for Xvnc.
$vncPasswdFile = $vncUserDir . "/passwd";

# $vncStartup points to a script that will be started at the very beginning.
$vncStartup = "/etc/X11/Xsession";

# $xauthorityFile should be the path to the authority file that should be used
# by your vnc X server.
$xauthorityFile = "$ENV{HOME}/.Xauthority";

# $defaultDesktopName should be set to the default name of the desktop.
# This can be changed at the command line with -name.
# $defaultDesktopName = "X";
$defaultDesktopName = "X";
# $geometry sets framebuffer width & height. Default will be calculated if
# server is started from within a running X servers. Can be changed at
# the commandline (-geometry). A fixed default will be used if
# vncserver is not invoked in a running X session.
# Example: $geometry ="640x480";
$geometry ="1152x864";
# $depth sets the framebuffer color depth. Must be between 8 and 32.
# $pixelformat sets the default pixelformat.
# The default will be calculated if none of both is specified
# and when vncserver is called from within a running X servers.
# Can be changed at the command line with option -depth.
# A fixed default value will be used if vncserver is not
# invoked in a running X session.
# Example: $depth = "16";
# $pixelformat = "rgb565";
$depth = "16";
$pixelformat = "rgb565";
# $getDefaultFrom sets the display from which you can query the default of
# the above three options, if you don't want to start vncserver
# from within a running X server. It will be added to the call
# of xdpyinfo.
# It is useful to get the default from the X server you will
# run xvncviewer in.
# Example: $getDefaultFrom = "-display localhost:0"

# $rfbwait sets the maximum time in msec to wait for vnc client viewer.
# $rfbwait = "120000";