




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Some concept of Electrical and Computer Engineering are Active Filters, Build Inverter in Schematic View, Circuit Structure, Operational Amplifier Performance, Overview of Solaris, Simulations Instructions. Main points of this handout are: Overview of Solaris, Basic Concept of Shell, Solaris Commands, Solaris Operating System, Command Line, Basic Solaris Commands, Work with Directories, Display Current Working Directory, Make Directory
Typology: Lecture notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!
The objective of this handout is to help you get familiar with the Solaris environment that will be used throughout this course. The major goals are to learn:
Solaris is a large, diverse and very rich operating system. Solaris is memory-efficient, easy to maintain and promotes efficient program development. Unfortunately, Solaris is not as user friendly as some other popular operating systems! Keeping this in mind, this tutorial is organized so that beginners can start with simple functions and progress learning about the Solaris system on their own. Please try the examples at your workstation as you read through this text. The best way to learn about the Solaris system is by personally using it. Soon, you will be an experienced user in a general-purpose multi-user Solaris system!
An operating system, abbreviated as OS, is a collection of programs that coordinates the operation of hardware and software. Solaris is one kind of an OS, which is basically broken down into three components: Scheduler, File System and Shell. You will only interact with the shell so lets start running some basic Solaris commands now.
A Solaris shell, also called the command line, provides the traditional user interface for the Solaris operating system and for Solaris-like systems. Users direct the operation of the computer by entering command input as text for a shell to execute. Within the Microsoft Windows suite of operating systems the analogous program is command.com, or cmd.exe for Windows NT-based operating systems. Since in the Solaris operating system users can select which shell they want to use (which program should execute when they login), many shells have been developed. It is called a shell because it hides the details of the underlying operating system behind the shells interface. (In contrast with the kernel, which refers to the lowest-level or inner-most component of an operating system).
In this section well talk about the basic commands you would most likely to use in this quarter.
First, you should pop up an XWin32 (or X-term or terminal/console) window, you can find it in startup menus→All Programs→XWin32 8.1→X-Win32. Then at toolbar (bottom right corner of desktop) there will be an Xwin icon show up, right click it and choose X-Config a window will be poped up. In Sessions tag, choose Wizard, a wizard dialog will pop up. You can select any name to fill in Name blank, and choose ssh in Type option then click Next. In next dialog, type in ”carpo.ece.drexel.edu” at Host blank1. Then the system will ask you to input username and password. Your user name should be your intials (e.g. jd for John Doe), your password should be ”ecee434”. Click Next and choose SUN OS as Command. Click Finish then a new session is created. Choose the session you just created, click Launch you will be logging into carpo server. There should be command window pop up, this is the command prompt. You will be entering commands in the line with $ prompt. After you login, you should first change your password. Type in passwd to change your passwd follow the instructions. Remember that you will not see anything show on the terminal when you type in password.
First I will introduce you to some commands which manipulate the directory structure:
3.2.1 List Content of the Working Directory
Type ls in prompt line, this command displays the files in the current working directory. For example:
$ ls $
Most commands in Solaris can accept arguments. Try ls -l (long listing). -l is an option type argument, which provides much more information about a file than the simple version. Example:
$ ls -l -rw-r- -r- - 1 yt74 grad 1146 Mar 29 13:19 cds.lib -rw-r- -r- - 1 yt74 grad 91422 Apr 5 13:20 CDS.log
This listing displays several types of information regarding to your files. The first entry on the left refers to the permissions on the file, yt74 is owner, grad is the group, succeeding number is the file size, date, and file names. Do not worry if you do not understand what all of these mean, and proceed to see the name and the size of files.
3.2.2 Display Current Working Directory
Type pwd, this command displays your current working directory.
Solaris has a file system where files are stored on storage devices such as disks and file directo- ries are organized in a logical and structured fashion. Directories could have files, programs and subdirectories in them, like in all usual file systems. Every user has his/her own home directory,
$ vi my file $
you will see the screen with a column of tildes. The editor vi is now in so called command mode. The two basic commands are the following:
Since you are at the beginning of an empty file it does not matter which of these you type. Write a text: I am from Drexel University.
You need to be in the command mode. If you do not now what mode is actual, press esc. This keystroke always turns the editor in the command mode. Then you can move along the screen if you keystroke the button:
If you are in command mode then
You must be in command mode. You can use then several tricks to save the file:
Very useful is so called replace mode which enables overwrite the existing text.
3.3.2 Display File
If you write the command more and a name of a file then the file will be displayed. For example:
$ more filename $
User can control the output:
3.3.3 Copy File
This is used in order to make a copy of a file. You can copy the file you just made in your directory. Type:
$ cp filename.txt anothername $
The first argument is the name of the file to be copied (source file) and the second argument is the place to copy the save into (destination file). Type ls to see the copy file. Full path names could be used as source and destination files.
3.3.4 Rename and/or Move the File
This is used to move a file between directories and/or renaming a file/directory. To rename, type:
$mv filename1 filename $
Check the results. Now type:
$mv filename1 ./directoryname/filename $
Switch to sampledir and see the file renamed under sampledir. You could leave any name place empty, and just carry the file into the directory, leaving the name same. Now rename the sampledir as enoughdir by typing:
$mv sampledir enoughdir $
The LINUX system provides the chmod command to change the permissions of a file that you own.The syntax for chmod is user class(u,g, or o), followed by the action to take (- or +), followed by the permission to change (r,w,or x).
Now create a file and a directory, using cat and mkdir commands and see their default permis- sion status.
$chmod u+x
The chmod can can also take a numeric argument that describe the user class and permission to change as a sequence of bits. Try:
$chmod 466
3.3.7 Running Processes Information
This is used to give information on the running processes. Type:
$ps -al $
In the command arguments, -a means all, -l denotes long listing. PID denotes the Process ID number.
If a process is stuck, for instance the netscape browser, you can identify that application from the ps list, and stop that execution by using the kill command.
3.3.8 Stop Execution
Usage: kill [PID of the running application] Do not try to experiment this command right now, but remember that there is such a command to stop running programs.
3.3.9 Find File
The command
$find /usr -name filename $
finds a file filename in subdirectores in directory usr.
Some other commands are also very important, like get help, change password and so on.
3.4.1 Get help for Solaris
This command is the help command for Solaris environment. For example, type:
$ man ls $
This formats and displays a page (actually lots of pages) concerning the usage of ls command and its arguments. Try to find out what an ls-al command does. Man command provides an extensively useful online tutorial for Solaris. If you are interested, you could take your time to go through some popular commands, but it might take too long. Remember you could even type man man to get information on the usage of man command.
3.4.2 Password
After logging in, you can change your password by typing passwd command. You will be required to enter your old password and twice enter the new password.
3.4.3 Leaving the System
It depends on the system. Usually by ctrl-d but in a lot of systems you must use a special commands.
$ logout $
or
$ exit $
When you complete your work, dont forget to logout.