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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-17-2003, 12:29 PM
|
#1
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Rep:
|
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
|
|
|
05-17-2003, 12:31 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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/
|
|
|
05-17-2003, 12:43 PM
|
#3
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
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
|
|
|
05-17-2003, 12:50 PM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
05-17-2003, 01:05 PM
|
#5
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
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
|
|
|
05-17-2003, 01:08 PM
|
#6
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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. 
|
|
|
05-17-2003, 01:22 PM
|
#7
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
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
|
|
|
05-17-2003, 01:37 PM
|
#8
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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)
|
|
|
05-17-2003, 01:42 PM
|
#9
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
i see
is there any hot keys in the linux system ? like Ctrl+Alt+Del in Windows
|
|
|
05-17-2003, 01:46 PM
|
#10
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
05-17-2003, 01:52 PM
|
#11
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
thank you !
then how to use symbol when use commands?
like this one "|"
|
|
|
05-17-2003, 02:04 PM
|
#12
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
05-17-2003, 02:37 PM
|
#13
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
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"?
|
|
|
05-17-2003, 02:54 PM
|
#14
|
Member
Registered: May 2003
Location: New Jersey
Distribution: Red Hat 8.0 + PCLinuxOS - 2007
Posts: 160
Rep:
|
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.
|
|
|
05-17-2003, 03:13 PM
|
#15
|
Member
Registered: May 2003
Location: GuangZhou,China
Posts: 30
Original Poster
Rep:
|
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 
|
|
|
All times are GMT -5. The time now is 01:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|