Solaris 10 Command Cheat Sheet
Solaris 10 Command Cheat Sheet
. Equivalentto BIOS.
. Run level O.
. printenv * Displaysenvironmentalvariables.Ex. printenv <variable>or printenv
. setenv* Changesenvironmentalvariables.Ex. setenv<variable><value>
. probe-scsi-all * Checksall SCSIdevices. May needreset-all if coming from a
higher run level.
. probe-ide * Checksall mE devices.
. reset-all * Resetsserver. Maybe neededbeforeprobe-scsi-all.
. power-off * Powersoff server.
. boot * Boots serverwith specifieddeviceor run level.
0 boot * Normal boot to run level 6.
0 boot -s * Bootsto singleusermode.
0 boot cdrom- install * Usedfor installing OS from DVD.
. test-all * Executestest for all devieceswith self test method.
0 testnet * Testsnet devices
0 testfloppy * Testsfloppy deviece.
Terminal Commands
. su - * Changesprivilegesto root.
a su - <usemame>* Changesprivileges to specifieduser. If alreadyroot
then passwordnot required.
. bash * Changesto bashshell. Allows useof previouscommandsthroughup and
down arrow keys. Also allows for <Tab> completionsof paths,commands,or
files onceenoughcharactershavebeenenterthat thereare no other possible
matches.
. pwd * Showscurrentdirectory.
. cd * Changesdirectory.Ex. cd <path>,cd.. (goesup one directory)
. Is * List files and directories.
0 Is -{l * Showseverything.
0 Is -l * Showslong listing of information
0 Is <path> * Lists files and directoriesfor <path>insteadof current
location.
0 They can all be usedtogether.
. Absolutepath * Full path going back/ . Canbe usedfrom anywhere.
. Relativepath * Pathfrom whereyou areto whereyou want to go.
. j * Usedfor running commands,scripts,or files if your arecurrently in the
directory wherethey are located.
. cp <path/originalfile> <path/newfile> * Copiesfiles.
. mv <path/originallocation> <path/newlocation> * Moves files.
. mkdir <directory> * Createsdirectories.
. rm <directory> * Deletesdirectoriesand files.
. chmod-R <usergroupeveryone><path> * Changespermissionson files or
directories.
0 -R * Usedon directoriesto changepermissions
on subfiles andsub
directories.
0 <rwxrwxrwx> r =4, w =2, x = I * Add permission you want for user,
group,and everyone.Ex. 644 would be userrw-, group would be r--,
everyoner--
. chown-R <owner><path/file> * Changesowner for files or directories.-R for
useon directoriesto changeowner on subfiles and subdirectories.
. chgrp options<group><path/file> * Changesgroup for files anddirectories.
0 -f * Optionto forcechange.
0 -h * Optionfor links.With -h it will changegroupon linkedfile.
0 -R * Option for directoriesto changegroup on all subfiles and
directories.
. man <command>* Openshelp manualfor commands.Enterkey down one line,
Spacekey down one page,q quit help
. more * Readsfiles. With pipe I breakslong lists to what will fit on one screen.
Enterkey down one line, Spacekey down one page,q quit help
. I * Pipe combinescommands.Placein betweentwo commands.Ex. Is -al /etc I
. more
init option * Changesrun level. Options0, s, 5, and 6. 0 = Prom, s = Single User
Mode, 5 = ShutdownandPoweroff, 6 = Rebootto Consolelogin.
. find / -name<Search>* Searchesfiles and directoriesfor <Search>
. ps options * Showsrunningprocess.Options-e processfor all users,-f all info, -
u processesfor specificuser. Optionse and u can't be usedtogether. Option f
VI
. Text editor for tenninal. Cancreatenew files.
. Use arrow keys for navigation.
. vi <file>
0 l<string> * Searchesfor <string> within document
0 i * Insert characters.
0 a * Appendcharacters.
0 r * Replaceone character.
0 x * Deleteone character.
0 dd * Deleteone line.
0 0 * New line and startediting.
.
0 : * Enter commandmode.
q! * Quit without saving
. wq! * Saveandquit
Samba Commands