Re: Newbie

From: Hugo van den Brand (hoes_at_vandenbrand.nep)
Date: 01/11/05


Date: 11 Jan 2005 22:10:42 GMT

Op 2005-01-11, Canola Oil schreef <canolaoil@gmail.com>:
>
> Can anyone help me out? At leat point me to some easy to read tutorials
> that are not written in Chinese!?!
>

I don't know tutorials and have been/are a newbie myself. Also I'm not
using Mandrake. But I will tell you some basic commands for the command
line. I use it quite often because you get a better idea of what's
happening when using it. I think it will be usefull to install X11/Xorg
(I don't exactly know how it's called now) and a desktop manager.
X11/Xorg is a standard set for making graphics.
The second thing that's handy is a desktop manager. It uses X11/Xorg to
actually create a desktop environment like the desktop Windows shows you.
There are complete suites containing a lot of extra applications apart
from the basic functions. KDE and Gnome are the suites used in a lot of
distributions. If you have already got X11/Xorg and gnome/KDE you can
start your a desktop environment with typing startx.

I will now tell you some basic commands. You can type then in at a
terminal after logging in. If you haven't made a extra account you can
better do so. Login as root and type the command 'adduser user'(whitout
quotes. Then a directory in /home will be created named user and you
will be prompted to enter a password. Afterwards you can log out using
'logout' and login as the newly created user. You can change your
password at any time by typing 'passwd'.

Basic movement

You can go from one directory to another using 'cd directory'. You can
either use a relative path or an absolute path. Absolute will be 'cd /home/user'
This brings you to the homedirectory of user. Relative can be 'cd bin'
this takes to the directory bin in the direcory where you currently are.
You can use 'cd ..' to go to the parent directory. Note that you can
travel through more than one directory at a time. 'cd user/../../bin'
When you are in home and type this, you will into the directory user
then home then / (the main map, has no parent directory) and than to
/bin . You can print the files in a directory using 'ls'. You can also
use 'ls -lh' to get more information. ( -l provides a listview -h makes
sure the size of files is printed easy for humans)
'pwd' shows you were you currently are. If you want to view a text file
you can type 'less file' to view it. You can use the arrowkeys and
pageup/down and when your ready you type 'q' to leave to the
commandline.

Rights

Easy file has rights and a owner. Those rights say who can whatch the
file and who may execute it. When you type 'ls -l' the first column
shows things like -rwxr-xr-x The first dash indicates the type of
file it is(mostly d for directory l for link b for block device or s for
socket) When there is a dash the file will be just a normal file.
the characters rwx indicate that the owner can read, write and execute
the file. The next three characters tells about the writes of memeber of
the same group. In this case groupmembers will have read and execute
permissions. The last three characters are about the permissions of user
who are not the owner or part of the group. Permissions can be modified
by using 'chmod a+rwx file' This gives all the users read, write and
execute permissions. You can subsitute a and use u for user, g for group
or o for other. You can also take rights by changing the + to a minus.
Instead of rwx you can also give only read permission or only read and
write permissions(and a couple of more of that kind of combinations as
long as yhou stick to using only r, w and x maximaly one time).
'chmod o-rw file' is also a possibility. It takes read and write
permissions away form other users.
Owner and group of a file are displayed in the third column of the list
view of ls. Could be: 'root:root'. Changing this is easy. Just type
'chown user:user file' to change the ownership and groiup of the file.
Note: Only files with an execute permisions can be executed.

Information

There are a lot of ways to gain information. If you know the filename
of a program you get a description of the main function using 'whatis
program'. You can also search differently. If you want a program with a
specific task you can run 'apropos task' to search the same database
whatis uses for it's search. With this you can easylyu search for
something which has to do whit the mous typing 'apropos mouse'.
Most programs have a little bit of built-in helpas well showing
possible functions. This is mostly accesed by typeing 'program --help'.
When you want more information you can view a manpage of a program with
'man program'. You get a the viewer less showing a helppage.
For getting a location you could use 'whereis program' or 'locate
program' These commands search in a certain directories and print files
found there. Not only the main programfile will be displayed but also
the manpage an configurationfiles.
Now a database is searched through which can be updated by 'su -c
updatedb'(su gives you the possiblity to become another user, if you run
'su' you just get a commandline for root(exit with logout) the -c makes
sure you only want to run one command and then exit resume you own
commandline) Configurationfiles are mostly in /etc
User-accesable progrmas in /bin or /usr/bin and programs specially for
root are mostly found in /sbin or /usr/sbin. If you want to search a
file in the complete filesystem you can use 'find / -name filename'
/ can also be replaced by another directory in which you want to search
(like /home/user for intance). You will see find wants to search everywhere
but can't. This is no error. Normal user don't have read permission to
all directories and find is run with the permissions of the one who
starts it.

Hope this is of some help.
I you would like more information like this just ask.
Hugo



Relevant Pages

  • Re: Newbie
    ... But I will tell you some basic commands for the command ... > Easy file has rights and a owner. ... In this case groupmembers will have read and execute ... The last three characters are about the permissions of user ...
    (alt.linux)
  • Re: [PHP] Security Question, re directory permissions [long answer]
    ... permissions, first of all. ... Some scripts require that you have these ... can read, write, and execute what's in there. ... Owner can read and write ...
    (php.general)
  • Re: X windows: dont install or dont run?
    ... (with the appropriate path prefix if those commands are not in the ... execute these? ... lot of work - especially to set the permissions back when _you_ need to ...
    (comp.os.linux.security)
  • Re: [PHP] Security Question, re directory permissions [long answer]
    ... Security Question, re directory permissions [long ... can read, write, and execute what's in there. ... Owner can read and write ...
    (php.general)
  • RE: ssh "Permission denied" on everything
    ... For whatever reasons /etc and /usr had permissions ... ssh "Permission denied" on everything ... When we log in as root on the box the commands we ... are trying to execute show that they are rwxr-xr-x, ...
    (Fedora)