Difference between revisions of "Solaris"

From Got Opinion Wiki
Jump to navigation Jump to search
m
 
(91 intermediate revisions by the same user not shown)
Line 1: Line 1:
Welcome to my Solaris 10 notes
== My Solaris 10 notes ==


== Components of Sun OS ==
[[Solaris 10 Associate]] notes


Three components of Sun OS
[[Solaris 10 System Administration Part I]] notes
* Kernel - the core of Sun OS and manages all physical resources of the computer
* Shell - a command interpreter and interfaces between user and kernel
* Directory Hierarchy


=== Default shells ===
[[Solaris 10 System Administration Part II]] notes
Sun OS default primary shells:
* Bourne shell - original unix system shell and default for root user. regular user prompt is $ and root is #
* C shell - command line history, aliasing, and job control. default regular user is hostname% and root is hostname#
* Korn Shell - superset of Bourne shell plus C shell like features and enhancements. command line history, aliasing, job control, and command line editing default regular prompt is $ and root is #


Sun OS contains three alternative shells:
== Firefox ==
* Bash shell - GNU project Bourne Again SHell is bourne compatible shell that contains handy features from Korn and C shell.
Firefox plugins (for Flash)
* Z shell - resembles Korn shell plus enhancements
[http://kb.mozillazine.org/Determining_plugin_directory_on_Linux determine plugin directory] for Firefox (works for Solaris 10 x86)
* TC shell - C compatible shell plus enhancements
 
== Logging into Sun OS ==
 
All users must log into system
 
=== Desktop login ===
 
Use direct login or options
 
password requirements 6-8 characters, contain at least two alpha characters and one numerical or special character. cannot be same as user login name, different than last password by at least three characters, reverse of user login name
password requirements don't apply to root user or regular user password set by root user
 
 
== Desktop Environment ==
 
Solaris 10 includes Common Desktop Environment (CDE) and Java Desktop System (JDS) desktop environments.
 
== Command Line ==
 
Run command line in a terminal window
 
Use Unix system commands to instruct the computing system to perform specific tasks
 
Commands can be executed with or without options or arguments
 
Unix command syntax is the order and structure of command line components.
 
Unix command line syntax = [command] [options] [arguments]
 
* command determines what system will execute
* option determines how command will run and always begins with - and are case sensitive, can use multiple options, combine options into one - or use a - for each option
* argument determines what command will affect
 
Multiple commands can be entered on one command line by using semi-colon(;) between each command.
 
=== Basic Solaris 10 commands ===
 
<populate>
 
== man pages ==
 
display man page by typing man command
 
Syntax:
* $ man command
* $ man option command
* $ man option filename
 
=== Navigating man page ===
 
* Space bar = page forward
* Return = line forward
* b = page backward
* /pattern = to perform a forward pattern search
* n = to move to next pattern match, must be proceeded with /pattern search
* h = provides navigation help
* q = quit man page
 
=== Searching man pages ===
This searches all man pages. To search while inside a man page see Navigating a man page pattern search.
 
Search by section syntax:
* man -s number [command|filename]
Search by keyword syntax:
* man -k keyword
 
== Directories ==
A directory is a list of references to objects
 
Objects include files, sub-directories, and symbolic links
 
Each reference consists of a name and number
 
The name of object is used to identify & access object
 
The number specifies the inode. inode stores information about the object
 
pwd command shows current directory path
 
ls commands displays contents of current directory
 
Syntax:
* ls
* ls -options
* ls -options filename
* ls -options path_2_different_directory
 
<describe some common options, put screenshot of a long listing>
-a
 
-l
 
-la
 
-ld directory
 
-R
 
-F cover output /(directory), *(executable), none, @(symbolic link))
 
Use file command to determine certain file types
 
Syntax:
* file filename
 
=== Navigating directories ===
 
Initial login is set to home directory
 
Navigate using cd command
 
Syntax:
* cd directory
 
Using cd without options or arguments moves to home directory (some shells use cd ~)
 
path name abbreviations
. = current or working directory
.. = parent directory
 
cd .. moves to parent directory
 
cd ../.. moves up two parent directories, you can use /.. to move up more parent directories
 
use absolute or relative path names to navigate directories
 
cd absolute_path_name
 
cd relative_path_name
 
== Files ==
 
Commands to view file in read-only format:
* cat (displays one or more text files without pausing)
* more (displays text files one page at a time, to navigate use man navigation keys)
* tail (displays last 10 lines of a text file,use -n or +n to change number of lines, replace n with an integer, -n displays n lines from end of file while +n displays file contents from line n to end of file)
* head (displays first 10 lines of a text file, use -n to change number of lines, replace n with an integer)
* wc (-l line count, -w word count, -c byte count, -m character count)
 
<add more detail about each command>
 
=== Printing files ===
 
Print using lp command
 
Syntax:
* lp options filename
 
Options:
* -d destination (use while not printing to default printer)
* -o nobanner (no banner is printed)
* -n number (number of copies)
* -m (sends mail message to owner after print job is complete)
 
Display status of all user print requests
 
Syntax:
* lpstat -options printername
 
Options:
* -p (status of all printers)
* -o (status of all output requests)
* -d (status of default printer)
* -t (extended status of all printers)
* -s (status summary of all printers)
* -a (identifies which printers are accepting print requests)
 
Status response from lpstat command:
* request-ID = name of the printer and job number
* user-ID = name of user accessing the printer
* file size = output size in bytes
* date/time = current date and time
* status = status of print request
 
Cancel print requests
 
Syntax:
* cancel request-ID
* cancel -u username
 
== Modifying Directory Contents ==
 
=== Copy Files & Directories ===
 
==== Copy Files ====
 
Use cp command to copy the contents of a file to another file.
 
Syntax:
* cp -option source_file target_file_or_directory
 
Common options:
* -i (prevents accidental overwrite of file or directory, prompts user when an overwrite might occur)
* -r (recursive, includes the contents of directory and all sub-directories when copying a directory)
 
Examples:
 
Copy file within a directory:
 
<code>cp source_file target_file</code>
 
Copy multiple files to a different directory (relative path example):
 
<code>cp source_file1 source_file2 target_directory</code>
 
==== Copy Directories ====
 
Use cp -r command & option to copy the contents of a directory recursively to another directory
 
Syntax:
* cp -options source_directory target_directory
 
Note:
* If target_directory does not exist one will be created with source_directory name.
* If target_directory exists a new sub-directory below target_directory will be created with source_directory name.
 
Copying multiple directories
Syntax:
* cp -options source_directory1 source_directory2 target_directory
 
=== Moving Files & Directories ===
 
The mv command moves & can rename files & directories within the directory hierarchy
 
Syntax:
* mv -option source_file_or_directory target_file_or_directory
 
Examples:
 
Rename file1 in same directory to file2:
 
<code>mv file1 file2</code>
 
Move file1 to another directory:
 
<code>mv file1 ../</code>
 
Move & rename file1 to file2 in another directory:
 
<code>mv file1 ../file2</code>
 
Move & rename directory1 to directory2 in same directory:
 
<code>mv directory1 directory2</code>
 
=== Creating Files & Directories ===
 
==== Creating Files ====
 
You can use touch command to create an empty file or a text editor program
 
Syntax:
* touch filename
 
==== Creating Directories ====
 
Use mkdir command to create directories
 
Syntax:
* mkdir directory_name
* mkdir -p directory_names (-p creates all the parent directories that do not exist)
 
=== Removing files & directories ===
 
Remove file using rm command.
 
Syntax:
* rm -option filename
 
rm options:
* -i (prompts before deleting each file)
 
Remove empty directories. If directories are not empty an error message will result.
 
Syntax:
* rmdir directories
 
Remove directories that are not empty
 
Syntax:
* rm -options directories
 
rm options:
* -i (prompts before deleting each file or directory)
* -r (recursive, includes all contents of directory and sub-directories)
 
=== Using Symbolic links ===
 
A symbolic link is a pointer that contains the path name to another file or directory. Use ln -s command to create a symbolic link file. The file name for the symbolic link appears in the directory in which it is created.
 
Syntax:
* ln -s source_file target_file
 
Where source_file variable refers to the file in which you create a symbolic link. The target_file variable refers to the name of symbolic link. If source file does not exist a symbolic link to a non-existing file is created.
 
You remove symbolic link files the same way you would any other file using rm command.


== My Solaris 11 notes ==


To be populated...


<center>[[Computing|To Computing Area]]</center>
<center>[[Computing|To Computing Area]]</center>

Latest revision as of 09:06, 1 July 2011

My Solaris 10 notes

Solaris 10 Associate notes

Solaris 10 System Administration Part I notes

Solaris 10 System Administration Part II notes

Firefox

Firefox plugins (for Flash) determine plugin directory for Firefox (works for Solaris 10 x86)

My Solaris 11 notes

To be populated...

To Computing Area