Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2K views

Solaris 10 Command Cheat Sheet

This document summarizes terminal commands and utilities for managing servers and files systems. It describes commands for checking devices and rebooting/powering off servers. It also covers commands for changing directories, listing files, copying/moving files, changing permissions and ownership. Terminal editors like vi are explained as well as commands for managing users, groups, passwords and services. Lastly, it touches on network configuration commands and Samba utilities.

Uploaded by

semsem40
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Solaris 10 Command Cheat Sheet

This document summarizes terminal commands and utilities for managing servers and files systems. It describes commands for checking devices and rebooting/powering off servers. It also covers commands for changing directories, listing files, copying/moving files, changing permissions and ownership. Terminal editors like vi are explained as well as commands for managing users, groups, passwords and services. Lastly, it touches on network configuration commands and Samba utilities.

Uploaded by

semsem40
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Prom

. 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.

Single User Mode


. Similar to Windows SafeMode with CommandPrompt.
. Can useany terminal commandhere.
. Run level 1.
. Can't useBackspacekey must useDeletekey.
. umountall * Usedto unmountall fIle systems.Usedbeforefsck (File Systems
Check)
. fsck -y * File SystemsCheck. Use umountallbefore.Make sureyou havethe -y
so that it will not ask for your input constanely.

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

. can be usedwith either optionse or u.


svcs* Showsservices.
0 svcs<service>* limits displayto just <service>
. svcadm<options><service>* Optionsrestart,enable,disable.
. ifconfig * Commandfor network interfaceconfiguration.
0 ifconfig -a * Showslogicalinterfaces.
0 ifconfig <interface><ipaddress>* ChangesIP addressfor interface.
(Interfaceusedfor TCAC bgeO)
0 ifconfig <interface>netrnask<netrnask>* Changesnetrnaskfor interface.
0 ifconfig <interface>plumb * Createslogical interfacefor physical
interface.(TCAC hasbgeO,bge1,bge2,and bge3)
0 ifconfig <interface>unplumb * Deleteslogical interface.
0 ifconfig <interface>up * Enablesinterface.Canbe usedafter plumb.
0 ifconfig <interface>down * Disablesinterface.
. date * Displaysdateand time.
0 date mmddHHMMYYYY GMT * Changesdateand time. Use Zulu time.
. useraddoptions<usemame>*Createsunix user.
0 -c "<Description>" * addsdescriptionfor userbeingcreated.
0 -m * Makehomedirectoryandcopybasicfiles from default.
0 -d <homedirectory> * Specifieshomedirectory (use
lexport/home/<usemame>
0 -g <group> * Addsuserto unix group.
0 -s <shell path> * Setspathto shell.(Uselusr/bin/csh
for galeusers.Don't
usefor any other type of account)
. passwd<usemame>* Changesuserpassword.
0 passwd-x -1 <usemame>* Sets<usemame>not to expire.

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

. smpasswd-a <usemame> * Usedto setsambapasswords


for rootandmctta
during configuration. Locatedat lusrlsfw/bin/
. net groupmap* Usedto list and deletegroupsfor Sambaduring configuration.
0 net groupmaplist * Showsgroupsfor sambawith SIDs
0 net groupmapdeleteSID="<SID from list>"
. Using bashyou canup arrow andjust changethe last numberand
deleteall six quickly and easily.
. net samset<UserOptions>* Allow configuring of Sambauseraccounts.Located
lusrlsfw/bin/
0 net samsethomedir<user><value> * Sethomedirectory for user.
0 net samsetprofilepath<user><value> * Setprofile path for user.
0 net samsetfullname <user><value> * Set Full namefor user.
0 net samsethomedrive<user><value> * Setshomedrive for user.
0 net samsetlogonscript<User><value> * Set logon script for user.
(logon.bat for TCAC)
0 net samsetdisabled<user><yes Ino>* Disablesor enables useraccount
0 net samsetpwnoexp<user><yes I no>* Setswhetheruserpassword
expires.
0 net samsetpwdmustchangenow <user><yes I no> * Requiresuserto
changepasswordat next logon.
0 net sam set autolock <user> <yes I no> * Locks or unlocksuseraccount.
. net sampolicy * Passwordand accountpolicies. Locatedlusrlsfw/bin/
0 net sampolicy list * List policies.
0 net sampolicy show<policy> * Showsvalue of <policy>.
0 net sampolicy set<policy> <value> * Setsvalueof <policy>.

You might also like