Solaris 10 command cheat sheet

Embed Size (px)

Citation preview

  • 8/7/2019 Solaris 10 command cheat sheet

    1/4

    Prom.........

    Equivalentto BIOS.Run level O.printenv * Displaysenvironmentalvariables.Ex. printenv or printenvsetenv* Changesenvironmentalvariables.Ex. setenvprobe-scsi-all * Checksall SCSI devices. May needreset-all if coming from ahigher 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 test net * Testsnet devices0 test floppy * Testsfloppy deviece..

    Single User Mode

  • 8/7/2019 Solaris 10 command cheat sheet

    2/4

    ....

    ...

    ....

    .

    .

    bash * Changesto bashshell. Allows useof previouscommandsthroughup anddown arrow keys. Also allows for completionsof paths,commands,orfiles onceenoughcharactershavebeenenterthat there are no other possiblematches.pwd * Showscurrentdirectory.cd * Changesdirectory. Ex. cd ,cd.. (goesup one directory)Is * List files and directories.0 Is -{l * Showseverything.0 Is -l * Showslong listing of information0 Is * Lists files and directoriesfor insteadof current

    location.0 They can all be usedtogether.Absolute path * Full path going back / . Can be usedfrom anywhere.Relative path * Pathfrom whereyou are to where you want to go.j * Used for running commands,scripts,or files if your are currently in thedirectory wherethey are located.cp * Copiesfiles.mv * Moves files.mkdir * Createsdirectories.rm * Deletesdirectoriesand files.chmod-R * Changespermissionson files ordirectories.0 -R * Usedon directoriesto changepermissionson subfiles andsub

    directories.0 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 * Changesowner for files or directories.-R for

  • 8/7/2019 Solaris 10 command cheat sheet

    3/4

    ....

    .

    .

    .

    ps options * Showsrunning process.Options-e processfor all users,-f all info, -u processesfor specific user. Optionse and u can't be usedtogether. Option fcan be usedwith either optionse or u.svcs* Showsservices.0 svcs* limits display to just svcadm* Optionsrestart,enable,disable.ifconfig * Commandfor network interfaceconfiguration.0 ifconfig -a * Showslogicalinterfaces.0 ifconfig * ChangesIP addressfor interface.

    (Interfaceusedfor TCAC bgeO)0 ifconfig netrnask* Changesnetrnaskfor interface.0 ifconfig plumb * Createslogical interfacefor physical

    interface.(TCAC hasbgeO,bge1,bge2,and bge3)0 ifconfig unplumb * Deleteslogical interface.0 ifconfig up * Enablesinterface.Can be usedafter plumb.0 ifconfig down * Disablesinterface.date * Displaysdateand time.0 date mmddHHMMYYYY GMT * Changesdateand time. Use Zulu time.useraddoptions *Createsunix user.0 -c "" * addsdescriptionfor userbeing created.

    0 -m * Makehomedirectoryandcopybasicfiles from default.0 -d * Specifieshomedirectory (uselex port/home/0 -g * Addsuserto unix group.0 -s * Setspathto shell.(Uselusr/bin/cshfor galeusers.Don't

    usefor any other type of account)passwd* Changesuserpassword.0 passwd-x -1 * Setsnot to expire.

  • 8/7/2019 Solaris 10 command cheat sheet

    4/4

    Samba Commands..

    .

    smpasswd -a * Usedto setsambapasswordsfor root andmcttaduring configuration. Locatedat lusrlsfw/bin/net groupmap* Usedto list and deletegroupsfor Sambaduring configuration.0 net groupmaplist * Showsgroupsfor sambawith SIDs

    0 net groupmapdeleteSID="". Using bashyou can up arrow andjust changethe last numberanddeleteall six quickly and easily.net samset * Allow configuring of Sambauseraccounts.Located

    lusrlsfw/bin/0 net samset homedir * Set homedirectory for user.0 net samset profilepath * Set profile path for user.0 net samset fullname * Set Full namefor user.0 net samset homedrive * Setshomedrive for user.0 net samset logonscript * Set logon script for user.

    (logon.bat for TCAC)0 net samsetdisabled * Disablesor enablesuseraccount0 net samset pwnoexp * Setswhetheruserpasswordexpires.0 net samset pwdmustchangenow * Requiresusertochangepasswordat next logon.0 net sam set autolock * Locks or unlocks useraccount.net sampolicy * Passwordand accountpolicies. Locatedlusrlsfw/bin/0 net sampolicy list * List policies.

    0 net sampolicy show * Showsvalue of .0 net sampolicy set * Setsvalue of ..