LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2012, 12:05 PM   #1
cromaticx
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
I am a total newbie at Linux and taking a Linux class


Hi, I am new to Linux and taking a Linux class and I have been up all night trying to figure out these answers for these questions and found this forum and was hoping someone with a little more experience with Linux would be kind to help me out. Thanks guys!


1.) What is the command to look at your user ID and find out what your default shell is set to?


2.) What is the command you would put in a .kshrc file to make the history mechanism remember the previous 25 commands?

3.) Starting from a korn shell, what two-part command would you enter from the command line to create a user-defined variable named mybin and assign it a value of mybin=/home/is229/is2290XX/bin (where XX is your home directory)?

4.) Assuming you did question 3 correctly, what commands could you use for a command to change directories into /home.is229/is2290XX/bin by referencing the variable you just created?

5.) Assuming korn shell is your default shell, what is the line you would insert into the file that is read at login to make mybin=/home/is229/is2290XX/bin get assigned when you log in?

6.) What file would you need to insert that line into: .kshrc, .login, .profile, or .cshrc?
 
Old 12-06-2012, 12:13 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello cromaticx, welcome to LQ and to Linux,

as per our forumrules we don't do each others homework. It would be necessary that you tell us for each of your questions what you already have found out.

There is a very helpful tutorial through the first steps http://rute.2038bug.com/index.html.gz you will find the answers there.

For Linux/Unix commands and the shell(s) there are the so called manpages. If you don't have a Linuxcomputer available, you may also google for "man ksh" which leads you to the manpage for the kornshell.

Markus
 
1 members found this post helpful.
Old 12-06-2012, 12:14 PM   #3
cromaticx
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
Hello cromaticx, welcome to LQ and to Linux,

as per our forumrules we don't do each others homework. It would be necessary that you tell us for each of your questions what you already have found out.

There is a very helpful tutorial through the first steps http://rute.2038bug.com/index.html.gz you will find the answers there.

For Linux/Unix commands and the shell(s) there are the so called manpages. If you don't have a Linuxcomputer available, you may also google for "man ksh" which leads you to the manpage for the kornshell.

Markus
What about a private message (PM)? Would anyone be able to help me?
 
Old 12-06-2012, 12:20 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Quote:
Originally Posted by cromaticx View Post
What about a private message (PM)? Would anyone be able to help me?
Probably not.

BTW: If you would have spend the time you used to create an account, post, read answer, post again to search for the answers on-line you would have finished the assignment by now.......
 
1 members found this post helpful.
Old 12-06-2012, 04:47 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,684

Rep: Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260
I don't mind helping you.

Not sure I know the answers off the top of my head though. Well, I don't actually. I try not to remember stuff directly. I use concepts and search when I am lost.

I think #1 is sho or show command and it has options. The options I am thinking about is environment or maybe set command. I am not at a unix type os right now so I can't test this.


The rest I'd have to look up. Use search terms for
#2 .kshrc history ought to do it.

#3 linux user variable, that also may lead you to cd or chdir $R or what not. (I haven't played with this for decades)

Not sure about the other two.
 
Old 12-06-2012, 11:34 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Concur with markush & drunna.
https://www.linuxquestions.org/linux/rules.html
You're welcome to show us what you've tried and we'll point you in the right direction

Here's a great resource for ksh http://kornshell.com/ although the answers for ksh and bash are often the same; there's a big overlap between the 2 shells.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Taking Linux security class SycamoreISU LinuxQuestions.org Member Intro 2 10-01-2012 12:22 AM
Total newbie to Linux needs help. Please jarget Linux - Software 3 08-24-2003 08:31 PM


All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration