Cheat Sheet

Little reminders for when I switch between Linux and Solaris…….

Action Solaris Command Linux Command
Start a service/application/daemon  svcadm enable <service>  service <service> start
Stop a service/application/daemon  svcadm disable <service>  service <service> stop
Restart a service/application/daemon  svcadm restart <service>  service <service> restart
Query service status svcs -a | grep <service> service –status-all | grep <service>
Add persistent static route varies from distro to distro. typically involves placing route entries into a startup file route -p addx.x.x.x y.y.y.y (where x is ip and y is gateway)

Solaris static routes get written to /etc/inet/static_routes
Solaris display static routes only with ‘route -p show

;nbsp

Useful commands:

Remove blank lines from a file  ‘grep -v “^$” <filename> > <newfilename>’

Realtime monitor top CPU processes  ‘watch -n 1 ‘ps aux | sort -nrk 4 | head’

 

DOS

Set a variable (in this case %today%) to hold the date in ‘yyymmdd’ format

set today=%date:~6,4%%date:~3,2%%date:~0,2%
watch -n 1 'ps aux | sort -nrk 4 | head' 

Server 2008

Delegate HTTP namespace permission for web services

"netsh http add urlacl url=http://+:portnumber/ user=DOMAIN\UserName"

Windows DISM upgrade temp key (replace with valid key after upgrade)

489J6-VHDMP-X63PK-3K798-CPX3Y

Leave a Reply