Quick question about Linux

darkconz

Member
Aug 4, 2004
69
0
0
I just downloaded a .bin file from internet... I am a total Linux newb and I was wondering how do I execute this file... when I try to execute it... it asks me what do I want to execute it with. Its aMSN that I downloaded...
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
If i'm not mistaken, you need to make the bin file executable by doing chmod a+x aMSN.bin

then you should be able to do ./aMSN.bin and that should execute the file.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
ok, what you do is open a terminal such as xterm, konsole, Eterm, aterm, etc.
once you are in the terminal you go to the directory where the bin file is, you can do this by typing "cd <path to directory>"
then you have to type "chmod 764 <bin filename>"
then you type "./<bin fillename>"

in the commands above you have to replace the <...> for the correct string.

good luck,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Well. If you want a file to be executed, you have to make it executable first. Unlike Windows were by adding a ".exe" to the back of a file you can make it executable, in Linux you must explicitedly set the permissions before doing so, it doesn't matter what the last three letters of the name are, generally.


In order to make it executable you have to:

1. open up a terminal,
Change to the directory that your file name is and then run this command:
chmod a+x whatervernameis.bin

2. Right click on the file, select properties and find were the permissions are. Then check the box for the owner's (which should be your user) executable permissions. Maybe check all the executable permissions.


It's going to be a bit different weither or not your using KDE or GNome but the idea is the same thing. I use the command line for this sort of thing, so I can't remember off of the top of my head.


Unix permission basics:

You have 3 classess of users. The user, the group, and everybody else (other, world).

Your user has a specific username. The user of a file is whoever owns the file. A user can belong to any number of groups, and a group can own a file too. In fact every file has a user owner and a group owner.

Usually the group is the default group of the user, which is usually named after their username or simply group "user".

Then on top of that you have 3 main types of permissions. Read, Write, Execute.

Then each class of owner has each of the 3 types of permissions.

If you open up a terminal and do a "ls -l" command you will see the permissions of all the files and directories of that directory you are in.

3 examples:
-rw-r--r-- 1 drag drag 1786 Jul 30 23:32 sample.html
-rwxrwxrwx 1 drag drag 1752 Jul 17 01:09 test
drwxr-x--- 19 drag video 4096 Aug 3 12:27 tmp

First 3 letters are for user, next 3 are for group and last 3 are for world

So for the file sample.html. That is owned by me, "drag". And it's owned by my default group which is also named "drag"

This file is non-executable. I can write to it, but nobody other then me from my group, or the rest of the world can ownly read it.

So the owner can read and write, and the file is world readable, but not world writable.

rw-r--r---

rw- = user
r-- = group
r-- = world

Now look at "test"

This file has very loose permissions. It's owned by me, and my group.
However everybody can execute it or write to it or read to it.

So it's world readable, world writable, and world executable. My user can write, read and execute it, too, and anybody from that group can.... but thats hardly worth mentioning because they would be able to do it anyways.

rwx = user
rwx = group
rwx = world

And finally we have "tmp". If you noticed there is a "d" at the beginning. This indicates that this is a directory file. It contains references or pointers to other files, so when you use it it seems like your inside that directory. Which is what suppose to happen, that's what is called "abstraction".

So a directory realy isn't a container per-say, but it is made to act and appear like a container to the end user so that it is more understandable by humans. But in reality it is just a special sort of file. (computer programs/OSes/Files/etc are just layers and layers of abstraction)

Everything is the same as a regular file when it comes to permissions except the executable part. That is different because you can't execute a directory. What the "x" refers to in this case is weither or not a person can enter into that directory.

The X allows access to directories.

rwx = user
r-x = group
--- = world

So the user drag can read, write, and enter the directory. Anybody belonging to the group "video" can read the directory and enter, but cannot "write", which is to delete or make new files.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
(don't forget you can just right click on files in the gui most of the time and turn on the executable bit)

Also if you don't like aMSN, check out Gaim.

It's installed by default most of the time and supports a whole host of instant messenger protocols.
Yim, Aim, MSN, etc etc.
 

darkconz

Member
Aug 4, 2004
69
0
0
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ya, but I didn't talk about how to use chmod itself.

chmod u+x filename r
makes the file executable for a user.

u = User
o = wOrld (or Other)
g = Group

w = Write
r = Read
x = eXecutable

chmod ugo+rwx filename
gives you
rwxrwxrwx

chmod u=rx filename
changes it to
r-xrwxrwx

chmod og-w filename
changes it to
r-xr-xr-x

chmod u+w filename
rwxr-xr-x

chmod ugo=rx filename
r-xr-xr-x

so on and so forth.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
if you don't like the new way you can use the old way. With numbers.

7 = 4 + 2 + 1
4 = read
2 = write
1 = execute

chmod 777 filename
rwxrwxrwx

chmod 577 filename
r-xrwxrwx

chmod 555 filename
r-xr-xr-x

chmod 764 filename
rwxrw-r--

chmod 751 filename
rwxr-x--x

so on and so forth.

People prefer the number system sometimes. It's easy to do once you get use to it. But when you use it in scripts and stuff.

Like it's easy to do recursive stuff. Like:

chmod -R o-w *

Will remove all the world write attributes for all the files and directories recursively.
How would you do that with numbers?

chmod -R 775 *

Will do it, but make every file executable.

chmod -R 664 *

Will do it, and none of the files will be executabe, but what if you want some to be executabe? And that removes the ability to use directories!

So that's why we have all this ugoXrwx +-= crap now.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

I've written some very basic *nix documentation. It's all command line stuff, but I'm not sure what you're looking for.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

Here is a good place
The guide for Linux Beginners
here is how you would learn to use the Bash command line
Linux administrators guide

And so on and so forth.

Those are guides for "serious" stuff. Like your going to use it professionally or something. The nice thing is that it gives you a idea of the functioning of the OS. Once you understand how it works and the structure of it, then you can fix your own problems and figure stuff out.

That's one of the nice things. Instead of having to go work for MS or get trained on how to do stuff, you have the opertunity to realy fundamentally understand how everything works. Which I find pretty cool.

No more secrets.

Now I understand that people don't want that in-depth. But if you just read thru it a couple times stuff will sink in. Plus their are howtos for howto do specific tasks, like setting up a PPP connection or DVD burning or whatever.

Another nice thing about it is that those guides are distro-agnostic. Anything you learn their will work in every Linux OS from embedded stuff to Fedora to Debian.

There are a lot of books, and distros usually have a couple websites full of distro-specific stuff.

Learning a little bit on how to use the command line is good, though. Most docs assume a certain level of compentancy. I mean you don't have to know everything, but just know enough to be able find out about stuff you don't know about if you need it. Be able to look stuff up and understand the lingo a bit. Makes things much easier.

linux dictionary
combined with this magical tool will give you anything you need.

But whatever is most comfortable. There is so much information it's easy to get overwelmed.

Mostly you just end up learning just enough to get done what you want to get done. Then you go play video games. ;)

Plus there are lots of different websites targetted for different people with different personalities. TLDP.org can be pretty dry.

linux beginner guide
Different beginner guide
yet another, but in a different language

All sorts of stuff all over the internet. Very specific to very general docs. Unix itself is very close to Linux. To a end user they can be nearly identical. SCO Unix, Solaris, OpenBSD, NetBSD, FreeBSD, Debian, Fedora, Mandrake, AIX. Whatever. Lots of stuff.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: drag

All sorts of stuff all over the internet. Very specific to very general docs. Unix itself is very close to Linux. To a end user they can be nearly identical. SCO Unix, Solaris, OpenBSD, NetBSD, FreeBSD, Debian, Fedora, Mandrake, AIX. Whatever. Lots of stuff.

I know I've used OpenBSD and Linux docs to help out on Solaris issues. :p
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

what I would suggest as a guide is to go to:
www.tldp.org
www.google.com/linux
the linux cookbook
Running Linux by O'Reilly
tons of books in your local library
your local "Linux User Group" LUG
tons of resources on-line just google for it
the manual pages for the different programs that you have for example "man ls"

Good luck,
pitupepito

Note: Don't forget to check out the Basic linux commands that n0cmonkey posted somewhere in this forum.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: pitupepito2000
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

what I would suggest as a guide is to go to:
www.tldp.org
www.google.com/linux
the linux cookbook
Running Linux by O'Reilly
tons of books in your local library
your local "Linux User Group" LUG
tons of resources on-line just google for it
the manual pages for the different programs that you have for example "man ls"

Good luck,
pitupepito

Note: Don't forget to check out the Basic linux commands that n0cmonkey posted somewhere in this forum.

Not just Linux. Also added some very rough descriptions for the filesystem layout.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Originally posted by: n0cmonkey
Originally posted by: pitupepito2000
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

what I would suggest as a guide is to go to:
www.tldp.org
www.google.com/linux
the linux cookbook
Running Linux by O'Reilly
tons of books in your local library
your local "Linux User Group" LUG
tons of resources on-line just google for it
the manual pages for the different programs that you have for example "man ls"

Good luck,
pitupepito

Note: Don't forget to check out the Basic linux commands that n0cmonkey posted somewhere in this forum.

Not just Linux. Also added some very rough descriptions for the filesystem layout.

Nice, why don't you make it into a FAQ in Anandtech.com?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: pitupepito2000
Originally posted by: n0cmonkey
Originally posted by: pitupepito2000
Originally posted by: darkconz
Thank you guys for all the information provided above. I was not able read this in time because I had to leave my computer earlier. When I came back, I figured out Mandrake comes with Kopete which has the access to all the chat programs I use.

Once again, thank you very much for all the help.

I am just wondering if there are any kinds of guides out there for Linux newbs? I think I am feeding myself with too much information in one day and I am feeling a little dizzy hehe.

what I would suggest as a guide is to go to:
www.tldp.org
www.google.com/linux
the linux cookbook
Running Linux by O'Reilly
tons of books in your local library
your local "Linux User Group" LUG
tons of resources on-line just google for it
the manual pages for the different programs that you have for example "man ls"

Good luck,
pitupepito

Note: Don't forget to check out the Basic linux commands that n0cmonkey posted somewhere in this forum.

Not just Linux. Also added some very rough descriptions for the filesystem layout.

Nice, why don't you make it into a FAQ in Anandtech.com?

It's not done. :)
 

darkconz

Member
Aug 4, 2004
69
0
0
Originally posted by: drag
Now I understand that people don't want that in-depth. But if you just read thru it a couple times stuff will sink in. Plus their are howtos for howto do specific tasks, like setting up a PPP connection or DVD burning or whatever.

No no, don't get wrong... I was overwhelmed by the new OS not the information I get here =) Maybe it could simply be I didn't get enough sleep the previous night hehe. Thx again drag, pitupepito2000 and n0cmonkey. I really appreciate for all the help you guys have provided. I am going through each one of those guides one by one now ;)