January 25th, 2003, 07:54 AM
Linux Navigation for Beginners - Part 1
This tutorial will give an overview and some basic commands on how to move
around in linux-2.4.18-3's (various linux) for the new linux users.
ls. What ls does is gives a list of the files/programs/dir's withing the
directory itself. There are many appendages from ls but some basic ones
are as follows:
ls -a - usually used as root to list hidden files as well as regular.
bash-2.05a$: ls -a
( the . in front of the file shows that it is a hidden file)
ls -l shows permissions of the contents of the directory. ex. -
bash-2.05a$: ls -l
-rw-r--r-- 1 er0k er0k 44 Jan 7 10:24 xorrd
-rw------- 1 root root 3135 Jan 12 12:35 Xsession
ls -s shows the size of the file in kilobytes.
bash-2.05a$: ls -s
28 funnypic.jpg 20 xor
16 game 4 xor-commented.cpp
the size is in front of the file.
moving on now to more advanced but still simple commands. Whenever you
download a file in linux, you usually have a .tar.gz, a .rpm. or even a
.tar.bz2 file extension appending from the file. The way you can normally
install a .tar.gz is tar xvzf filenamehere.tar.gz
cd untarr'ed dir
./configure or even make conf which just tests your system, make conf makes the config file
for an rpm, it would be something more along the lines of:
rpm -Uvh filenamehere.bleh.rpm
the documentation that comes with the program should be in the contents of
the recently rpm'd program. Mainly because the use of rpm and installation
man pages. Man pages, short for Manual Pages are basically just
documentation of a program, file or text manipulator of some sort. in
order to use man pages, the man page has to be there of course. so you
would type - man whateveryouwanthere and see if it has built in
documentation. If it doesnt, you can add them by googling for the proper
man page and adding them manually.
cd. Cd'ing changes the directory you are currently in. Example:
bash-2.05a$: cd /tmp
or even something more along the lines of bash-2.05a$: cd /var/spool/mail
cp. cp moves a file to another directory. Example:
bash-2.05a$: cp /home/er0k/bleh.txt /usr/local/src/stuff
which will move bleh.txt to the directory /usr/local/src/stuff
mv. mv simply renames a file. mv originalnamehere newnamehere
mkdir. mkdir creates a directory of your choice.
bash-2.05a$: mkdir er0k_stuff
the directory er0k_stuff will be made in whatever directory you are
ps aux - is a useful command to show what is going on inside your
computer, roughly. Whatever you want to see if is running you would type
something along the lines of bash-2.05a$: ps aux filehere or even ps
aux|grep filehere for a more advanced search.
find / -name filehere -print is a good way to find files.
which. which filename here will show programs currently listed in binary
bash-2.05a$: which xmms
^^^^^^ will appear for that program specifically.
This concludes part 1 of my basic Linux navigation tut. I will create
further and more detailed tutorials later on.
January 25th, 2003, 01:12 PM
I'm just setting up my Linux Red Hat 8. I'm a beginner on Linux so every basic command i see
on AO can be helpful. Thanks, When the install is complete, I'm going to play on with it.
Printing it out ...
January 25th, 2003, 01:30 PM
nice tut er0k hope you dont mind me adding a few basic things the whereis command is helpful for finding programs basically the same as the which command er0k told you of the top command shows you a list of programs that are running and there pid helful for killing running processes that are eating to much cpu that leads me to the kill command and to kill procceses that are running to high or for whatever reason you want to kill a proccess just do kill <PID NUMBER HERE>
oher that that good tut er0k
By the sacred **** of the sacred psychedelic tibetan yeti ....We\'ll smoke the chinese out
The 20th century pharoes have the slaves demanding work
January 25th, 2003, 02:52 PM
Shrekkie > I've been playing with RedHat 8 for the last couple of days, and I've come to a conclusion: Windows XP might be bloatware, RedHat 8 is even bloater bloatware... It sucks up resources... it ain't funny watching it anymore :/
About rpm's: RH comes with its own package manager: it'll automatically kick in when you try to install an rpm... but it's a pain in the ass if you ask me.
Some people explained to me how to install tarballs and the like, but RH doesn't seem to like tarballs... ./configure? make? install? RH doesn't know those things...
Welp... it might be my lack of Linux-knowledge, but I don't like RH 8...
January 25th, 2003, 03:53 PM
redhat 8.0 is the devil
January 25th, 2003, 06:24 PM
Little ad from me to:
in many linux distro's there are some command alliases like
dir ls -l or ls -a
ll ls -l or ls -a
ls -l gives you a more detailed list then ls, but still hides the hidden (.) files
ps ax shows the running processes. The a means to show the processes of all users, you have to be root on some systems for that, because it's not always advicable to login as root as default you might have to drop that. The x means to NOT show used terminal processes.
January 30th, 2003, 06:31 PM
Another few good ones to know are:
gives available space on each disk slice. It is especially useful when used with the -h switch which stands for human readable. Example df -h
give plenty of info on running processes including the owner
is the same as ipconfig on a windows box
this is a great command to become familiar with. It allows powerful searching
this is a simple search method on RH. less robust than find
this brings you to the setup screen where you can enable and disable services
this gives you the manual pages for a particular command. Example man df
Well, these are some of the commands that I use in addtion to the one's already listed. Hope these help some of you out.
Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden