Sunday, November 23, 2008

Chapter 10 Assignment

1.) What series of commands starts a child csh shell, determines the current port, and then examines the processes currently running on that port?
sh
tty
ps -t 'port'

2a.) What signal quits a process? 3
b.) What signal interrupts a process? 2
c.) What are the differences between the two? Signal 2 tells the process to exit using its ending process, signal 3 forces the process to end.
d.) When should you use kill -9? You should use this when all else fails. Processes need to go through the ending tasks so you should only use this if nothing else is working.

3.) What command would you use to bring the vi editor to the foreground?
fg

4.) What is the command that you would use to kill the more process?
kill -2 more 'port'

5.) What is the command you would use to get this listing?
ps

6.) Consider the following scenario: You log on to your sysetm on tty223. The system starts a csh for you that has a PID of 1056. Then you start a shell script(the script is executed by a sh with a PID of 1080) that in turn executes who(a PID of 2020).

a.) What is the PPID of the who process? 1080
b.) What is the PPID of the process executing the script? 1056
c.) With the information provided, can you determine with what tty the who process is associated? No

Sunday, November 16, 2008

System Security

Computer security is something that should be important to everyone in the age of the Internet. In the days of "boards" that computers connected to there were not a whole lot of people that could do damage to your system from the outside. Mostly you just had to worry about your own ineptness accidentally messing something up. Now that there are literally hundreds of millions of people on-line there is a lot more that can cause you grief. Of course with the advancement of these problems there have also been advancements in security for your computer.

Whether it is one that comes with your operating system, or one that comes with anti-virus softerware, a firewall can go a long way towards acheiving piece of mind. Firewalls are designed to prevent unwanted intrusions into your system, and depending on how high the sensitivity on it can really help prevent your system from messed up from the outside.

Having a good anti-virus program is a must today. If you connect to the internet without one you are opening your machine up to all types of problems such as worms, viruses, trojans, and spyware. A good program can prevent these from getting onto your system, and can also help prevent you from accidently opening something you shouldn't.

Even with firewalls, and anti-virus softerware, the best security is common sense. If you open email from someone you don't know you are opening your system to attack. Another thing to avoid are websites from unknown publishers. Just because something seems like it may be safe does not mean that it is. The world is full of malicious people that are just waiting to surprise the unsuspecting Internet surfer with a damaging virus.

Sunday, November 2, 2008

Shelling out instructions

To get the general idea of what a shell is, I think it is best to think of an egg. You have the outside shell that gives you access to the inside parts of the egg. When applying this to computer terms it is very similar. The shell part of the operating system gives you access to the usable parts. By this I mean that you are able to activate your programs and such using the shell.

The most common shell now is most likely Windows Explorer. It has turned what was once a bit complicated in early versions of Windows into an easy to use operating system that can be found in use around the world. Windows first shell was a program manager, that allowed you to group together programs for easy access, but it was hard to use unless you knew what you were doing.

The first shell that I can remember using is the DOSShell. In the old DOS command line interface in the later versions you could type in dosshell and enter into a file manager that gave you easier access into the programs you were trying to use.

Another shell that I had the pleasure of working with was called GEOWORKS. I don't think it was a very well, although it was one of the easiest shells I ever used. GEOWORKS allowed you to make buttons that you could click on to go directly into the programs you wanted to use. There was no such thing as double-clicking, and you were able to set it up the way you wanted.

Sunday, October 26, 2008

Chap 7 Self Test 3

1.) What command would you enter to move the file eakins, which is in your current directory, so it's listed in your home directory?

You would enter: mv eakins ..

2.) What is the difference between the commands rmdir and rm -r?

rmdir will only remove a directory if it is empty while rm -r will remove a directory and everything that is in it.

3.) Assume you are in the Projects directory, which has the subdirectories Old-projects, and New-projects. What is the command to move the Bookproject from New-projects to Old-projects?

You would enter: mv New-projects/Bookproject Old-projects

4.) You are in your home directory, where there is a file named users-on. What command will list the file in both your home directory and in the subdirectory Projects?

You would enter: ln users_on Projects

Sunday, October 19, 2008

Linux/UNIX Certifications

There are many different certifications that a person can get for Linx/UNIX, and I am going to go over two different websites today and the certifications they offer.

New Horizons Computer Learning Centers offers three main certifications. SUSE Linux is the first one, and it teaches how to log onto and navigate a multi-user Linux system. Next there is Novell Certified Linux Professional(CLP) basically teaches the same as SUSE Linux but for professionals. Finally there is CompTIA Linux+ which certifies professionals that have over six months of experience and want to certify there knowledge in different aspects of troubleshooting, installation and more.

CertCities.com offers a wide variety of certifications. Instead of going over what each one is this time I am just going to list them because there are so many:

Linux+, Linux Certified Administrator, Linux Certified Engineer, Linux Professional Institute Certification Level I, Linux Professional Institute Certification Level II, Master Linux Certified Engineer, Red Hat Certified Architect, Red Hat Certified Engineer, and Red Hat Certified Technician.

This may seem like a lot, but it is a small sample of what is out there, and for those willing to take the time to learn it it could open a lot of doors into the business world. I myself am hoping to get a job in the computer industry after I finish school, and having Linux in my studies is going to help. By knowing how to operate Linux there are jobs doing Computer Network and Server Administration. If you work for a company that uses Linux then it pretty much opens up any position in their IT department.

Sunday, October 5, 2008

Chapter 5 Self Test 1

1) If you are using more to examine a file and decide you want to look back at the previous page what do you enter?

Press the "b" key to move back one screen of text.

2) From more, how can you quickly start editing the current file with vi?

Press the "v" key to enter the Visual Editor.

3) What command tells cut to output the first five characters of every line from the file practice?

Type: cut -f1 practice

4) What command tells grep to look for all lines consisting of only the letter Z followed by any four characters in a file filename?

Type: grep 'Z....' filename

5) What command instructs grep to look through all files in the current directory for lines containing the string Pat Loyd and output just the names of the files containing the match?

Type: grep -l 'Pat Loyd' *

6) How do you get the answer to the following with four figures to the right of the decimal point? Add 424 to 79, divide that sum by 161, then raise that result to the 15th power.

First type: scale=4

Then type: ((424+79)/161)^15

7) What command tells a utility to search through every file in the current directory for the name Catherine Thamzin?

Type: grep 'Catherine Thamzin' * more

8) What command results in a listing of the number of words and the number of lines in the files practice and users_on

Type: wc -wl practice users_on

9) What command creates a new file chapter consisting of the contents of the files section1, section2, section3, and section4, with all the lines numbered?

Type: cat -n section1 section 2 section3 section 4 > chapter

10) A file called empnames contains many employee names, with exactly one name on each line. What command outputs the names in the file in multiple columns, with columns filled before rows?

Type: column empnames more

Sunday, September 28, 2008

Different types of Text Editor's

Linux/UNIX comes with the vim text editor for creating and editing files but it is by no means the only one. There are actually a lot of different editor's out there and I am going to go over a few of them today.

1.) CRISP: This is a GUI(Graphical User Interface) text editor. While it works on multiple interfaces it does you no good if you are using a comand line interface program. It does have a lot of features and edit's many different types of code such as HTML and JAVASCRIPT. You can get a free trial verson of this at www.crisp.com but in the end you have to pay to have it.

2.) TED Advanced Text Editor for UNIX: TED works on conventional text environments(command line interfaces). It is compatible with both Windows and UNIX/Linux systems. As the name suggests though it is more for the advanced user. It is not a wordprocessor, but does contain the ability to make basic text files. A plus to this editor is that there is no limit to file size and length. This editor is free which makes it a bit more attractive to use than CRISP.

3.) Eddie: Eddie was originally disigned for Linux but is now on the Mac os and is a GUI text editor. It is used mostly for editing C and C++ which makes this one more for programmers than anything. It might be a bit more simple to use, but it is definitely not for beginners. It does have supports for HTML and JAVASCRIPT as well as many more. Since it is very limited on what it works with it is probably a poor choice for the every day user. This editor is also free.

These are just a sample of the many text editor's that are out there. There are a wide variety, but with a bit of research it is possible to find the right one for you.

Sunday, September 21, 2008

Chapter 3 Self Test

1.) When you enter the following command, what happens and why? cat > dog

You create a new file(Or overwrite an existing one) named dog and it allows you to type text into the file. The command line tells the computer to start the cat utility and then to create the new(or overwrite the old) file using the text you type in after this is entered.

2.) What results from using the following commands?

A. who grep $USER
The computer outputs who you are, when you logged on and where you logged on from.

B. grep \$HOME file1
grep specifies a search string, \$HOME is what it is searching for, and file1 is the file you are searching for. If there is no "file1" on your computer it tells you that grep: file1: no such file or directory.

C. echo u* >> file1
The computer inputs all the files beginning with u into the end of file1.

D. echo 'u*' >> file1
The quote marks on the end tells the computer not to use the * as an undefined character and then inputs anything with the u* into the end of file1.

E. ps
Gives you a list of the processes that are currently in use.

F. . fileA
The . command tells the computer to treat the file as though we had typed it into the computer and execute the contents of the file.

G. set noclobber
If you are in the csh or tcsh shells it tells the computer to not allow files to be overwritten, but if you are in ksh or bash shells it does nothing. The correct command for ksh or bash shells would be set -o noclobber.

H. set -o
By itself this tells you which functions are on or off.

I. chmod +x file2
Changes the mode of file2 to make it an executable file.

3.) How can we change the prompt to be Next? in both families of shells(C shells and Korn shells)?

In C shells(csh and tcsh) type in set prompt='Next?'. In Korn shells(sh, bash, and ksh) type PS1='Next?'.

4.) What data is in each field in the passwd file?

username(login):password:User ID:Group ID:Info on user:Home Directory:Start-up program.

5.) What command instructs the shell not to accept CTRL-D as a signal to log off?

In the csh or tcsh shells use set ignoreeof, and in the ksh or bash shells use set-o ignoreeof.

Sunday, September 14, 2008

My favorite Linux commands

Having been an avid user of D.O.S. in my youth this is actually a fairly easy one for me. It has actually been nice getting back into using the keyed in commands instead of having to use my mouse, and even inspired me to start building an updated D.O.S. based system.

First and foremost for me is the mkdir command. You use it to make a new directory and it is the exact same as in D.O.S. It really brought back memories for me of when I first started working on computers.

Second would have to be the who command. It is really nice to know who is logged on to the system at the same time you are and this brings up a list of all those people.

I think third for me is the history command. Being able to go back and see what you have done since you logged on is really cool, and if you save that information in an ongoing file you are able to go back and see what you have been working on for more than one day.

Saturday, September 6, 2008

UNIX and Linux in the real world

There are many people in the world who do not even know what Linux and UNIX are. This is a sad fact considering that without either one of them the world would be a much different place. Linux/Unix are operating systems that run many of today's "behind the scenes" business operations. Bank's use them to run ATM's, and modern films use it for helping do special effects. Even the Internet would be affected by not having it as most server's are run in a Linux/Unix environment.

It would not just be business that is affected either. Quite a few sections of the government are run off of Linux/UNIX platforms. While many people would cheer for constantly crashing IRS databases because they are being run on Windows, we would also be extremely vulnerable to attacks from other countries because the Department of Defense is also running Linux/UNIX. Windows may be a more user friendly system, it can not compete with the stability that Linux/Unix offers. I for one can not wait to become more adept at using it so I can get rid of Windows forever and have a more stable system at home.

Sunday, August 31, 2008

Introduction to me

My name is Chris Edwards and as a part of my Introduction to Linux/Unix course in college I will be posting blogs on what we are doing. Hopefully it will be informative to whoever is viewing it, and I am looking forward to feedback and/or suggestions from people that are currently working in a Linux/Unix based system.

A little about me now. My first computer was a Commodore 64, and we used it so much that we actually wore out the power switch on it. I built my first computer when I was about 10 years old, and that is what really hooked me on using a personal computer. The only formal training I have was in high school, and it mostly consisted of programming in Basic, keyboarding, and the basics of Microsoft Office. I figured at 29 years of age, it was time to finally get the training to do what I believe I was meant to do. I love working on computers, and I am really enjoying the start of all my classes that I am taking currently.