LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-17-2003, 01:29 PM   #1
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Rep: Reputation: 15
Smile Need advice


i am very new at linux
well, there so many commands in linux . now i just know some basic ones ,such as " rpm, tar, mount" etc.
i am confused now, what should do now ? which commands have to be mastered?
please give me some advice , thanks
 
Old 05-17-2003, 01:31 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
It all depends on what you want to do on your machine.

Take a look at this for some command information:
http://www.onlamp.com/linux/cmd/
 
Old 05-17-2003, 01:43 PM   #3
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
i have seen that page so i said "SO MANY"
so for example, i want to stop a program when it is running and no respond, what should i do
 
Old 05-17-2003, 01:50 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Look for the Process ID (PID) of the program/script:
ps -ef | grep program_name

Then kill it using:
kill 2344
(where 2344 is the PID of the proccess)

If that fails you can kill it "without question" using:
kill -9 2344
(where 2344 is the PID of the proccess)

If you want to see which programs are using your resources run:
top
(press h for help, q quits, M enables/disables memory info, m sorts by memory usage and P sorts by CPU usage)

To see how much of your CPU is being eaten you can use System Activity Reporter (sar):
sar 5 5
(this checks the activity 5 times every 5 seconds)

There may be more but those are the ones that I use. ps is a bit more useful than the example I have given but you can get full usage with:
man ps

Always try kill to start with and only if that fails use kill -9 using kill -9 does not always end child proccesses.
 
Old 05-17-2003, 02:05 PM   #5
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
thank you!
i will click the affero botton and go to the man page to get the detail

when i use the windows i aways push the reset botton in that case
 
Old 05-17-2003, 02:08 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Quote:
Originally posted by Socka
thank you!
i will click the affero botton and go to the man page to get the detail
Cheers!
Quote:
when i use the windows i aways push the reset botton in that case
Didn't we all!

Post any other help on commands you need and I'll see what I can do.
 
Old 05-17-2003, 02:22 PM   #7
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
as you said it depend on what i want to do to my machine.
could you tell me some hot key in linux ?
i try to open a url in a new page using Shift+left click in Mozilla ,but it is not IE
 
Old 05-17-2003, 02:37 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Right click on the link and choose "Open Link in New Window". Mozilla has the added andvantages of tabs too - right click on the link and choose "Open Link in New Tab". For instance I keep all my LQ page in one window but in differnet tabs. You can also use:
Ctrl+T (for an empty tab)
Ctrl+N (for an empty window)
 
Old 05-17-2003, 02:42 PM   #9
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
i see
is there any hot keys in the linux system ? like Ctrl+Alt+Del in Windows
 
Old 05-17-2003, 02:46 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Oh - Ctrl and Left Click also opens a new window.

By Ctrl+Alt+Del I assume you mean in a gui to get a proccess listing. Try using Ctrl+Esc.
 
Old 05-17-2003, 02:52 PM   #11
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
thank you !
then how to use symbol when use commands?
like this one "|"
 
Old 05-17-2003, 03:04 PM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
That is a pipe and is used to send the standard output (STDOUT) of one program to the Standard Input (STDIN) of another. In the ps example looking for mozilla proccesses:
ps -ef | grep mozilla

You can use "ps -ef" to generate a list of running proccesses and output to the standard output, the screen by default, but if instead you pipe "|" it to another program - in this case grep (a tool used for looking for lines containing a specific string - eg "grep mozilla" looks for lines containing mozilla) that program will read the information and proccess it rather than it just being sent to the screen.

The reason you see output on the screen is because grep is giving it as output.

To summerise:
Code:
           ps -ef (generate a proccess listing)
          <STDOUT>
             | |
             |P|
             |I|
             |P|
             |E|
             | |
           <STDIN>
         grep mozilla (Look for lines containing "mozilla")
          <STDOUT>
The final STDOUT appears on the screen on teh default output - the screen.
 
Old 05-17-2003, 03:37 PM   #13
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
thank you , i have learned a lot from you.
another question
it is useful to copy the output of the console
and it is easy to do it in the X environment
is there ways to copy the output of the console before use "startx"?
 
Old 05-17-2003, 03:54 PM   #14
OldBob
Member
 
Registered: May 2003
Location: New Jersey
Distribution: Red Hat 8.0 + PCLinuxOS - 2007
Posts: 160

Rep: Reputation: 30
Socka,

I'm about the same place you are, but here are the commands I heard are "most basic".

pwd = Print working directory
cd = Change directory
ls = List [Directory]
cp = Copy [File] with switch -r [Copy entire directory]
mv = Move [File] this can also "rename file" as you move it
mkdir = Make a directory
rm = Remove file also uses switches -r -f -i
su = Change to "root"
grep = Find [a "term"]

I'm running Win98SE right now, but I have a "good command link" on my Linux drive. I'll try to post it back here.
 
Old 05-17-2003, 04:13 PM   #15
Socka
Member
 
Registered: May 2003
Location: GuangZhou,China
Posts: 30

Original Poster
Rep: Reputation: 15
Thank you OldBob
when i used the "rm" for the first time to remove a directory with a lot of files in it , you know what , i had to answer "yes" for hundreds of times to confirm! so i would rather right click them now
 
  


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
too much advice- need more. howlleo Linux - Software 11 11-17-2005 08:48 PM
What To Do...Need Advice ryld Linux - Certification 9 10-28-2005 03:29 AM
Need advice onemind Linux - Newbie 2 07-20-2005 06:39 AM
I need advice alrave Linux - Software 4 07-04-2005 07:17 PM
Need Some Advice... KungFuHamster General 9 10-27-2003 06:35 PM


All times are GMT -5. The time now is 09:17 PM.

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