SunOS is the kernel of the Solaris operating system
There are four types of file systems in Solaris
Determine type of file system in Solaris
Determine SPARC or x86
uname –p
Displays whether the OS is SPARC or x86
usr/sbin/prtconf grep Memory
To Find memory
Directory structure of Solaris
Commands:
cat filename
Join files or display the contents of a file
cd dir
change directory
chmod mode filename
Change security setting on file
chown user [:group] filename
Change owner [and owning group] of file
chgrp group filename
Change owning group of file
cp f1 f2
Copy files
file filename
Determine a file’s type
head filename
Display first 10 lines of file
head –n filename
Displays the first n lines of a file
ls –la or ls -ltr
List files and directories
mkdir dir
Create or make a directory
more filename
Display contents of a file by screen full
mv [options] Source target
Move or rename a file or a directory
pwd
Print or display current working directory
rm filename
Remove files
rmdir dir
Remove directories
tail filename
Display last 10 lines of file
tail -n filename
Display first 10 lines of file
tail -f filename
Display last n lines of line
wc filename
Count lines, words, and characters in a file
cut
Select column of a file for display
pico
A simple and easy to use menu-driven text editor
sort filename
Sort or merge files
vi
A command-driven full-screen text editor popular among professionals
egrep
Extended version of grep
fgrep
Search files for literal words
find path condition
Finds files matching condition from path downloads
find path -inum n
Finds hard links, i.e., All files with the same i-node number
grep pattern filename
Finds line containing pattern in file
grep -v pattern filename
Finds line NOT containing pattern in file
grep -i pattern filename
Finds all lines containing pattern in file ignoring case
grep
Search files for text pattern
cal
Displays the monthly calendar
clear
Clear the screen
date
Display today’s time and date
finger
Display information about individual users
ftp hostname
Connects to a remote host to upload and download files
kill
Terminate a running command or a process
lp
Print the content of a file
man
Display information about a command
passwd
Change password
ps
Display processes running on a host
prstat
Display iterating list of processes by CPU usage
<ctrl-c>
Interrupt process
<ctrl-z>
Suspend current Process
Kill n
Kill process n
kill -9 n
Terminate process n
talk
Write to others online
telnet hostname [port]
connect to host and opens a shell. Optionally on specified port.
who
Display who are currently logged in
whoami
Display’s the current user
ln file1 name
Create a hard link to file1 called name
ln –s file1 name
Create a soft link to file1 called name
diff f1 f2
Find difference between two files
diff3 f1 f2 f3
Find difference between three files
look word
Searches /usr/dict/words for word
ssh hostname [port]
Makes a secure connection to host and open a shell
jobs
Print list of jobs
fg [%n]
Resume foreground job n
bg [%n]
Resume background job n
stop %n
Suspend background job n
kill [%n]
Kill job n
<ctrl-s>
Stop screen scrolling
<ctrl-q>
Resume Screen output
sleep n
Sleep for n seconds
env
Show environment variables
variable=value
Create local vriable Variable with value value
export Variable
Make Variable an environmental variable
unset variable
Remove environmental vairables
set
Show local variables
alias name1 name2
Create command alias
alias
Show command alias
unalias name1
Remove command alias name1
history
Display recent commands
! n
submit recent command n
set –o vi
Recall commands, edit and re-execute using vi commands
Shell types in Solaris
sh -/bin/sh ,
bash - /bin/bash,
ksh - /bin/ksh,
csh - /bin/csh,
tcsh - /bin/tcsh,
zshell - /bin/zsh
To check shell type in particular host
$ echo $SHELL
/bin/sh
Shell Initialization profiles
/etc/profile ($HOME/.profile) --- sh, bash, ksh system wide (per user) init
.profile – Bourne & korn shell
.bash_profile – Bourne Again shell
.login & .cshrc – cshell
.tcshrc & .chrc – TCshell
.zlogin & .zshrc – Z shell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |