Announcement

Collapse
No announcement yet.

What Does This Mean?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What Does This Mean?

    When I'm in Shell/Konsole mode, I get two messages that I don't understand. The first says, "This program requires root privileges." when I try to run the executable file and the second message says "command not found". What is going on? Both files are executable.

    #2
    Re: What Does This Mean?

    First, what 'executable' are you trying to run and why? What are you trying to execute it in the Shell/Konsole? What is the command you typed?

    "This program requires root privileges" means that you, as a normal user, don't have the permissions required to execute the command you typed.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: What Does This Mean?

      Originally posted by Snowhog
      "This program requires root privileges" means that you, as a normal user, don't have the permissions required to execute the command you typed.
      To get the necessary permissions you just put sudo at the start of the command, this runs the command as the root user (you will be asked for your password).

      Comment


        #4
        Re: What Does This Mean?

        Originally posted by georgiatech
        when I try to run the executable file and the second message says "command not found". What is going on? Both files are executable.
        If by executable you mean a windows .exe file, you can't run them on kubuntu/linux without a 3rd party program like Wine. In which case you would need to run wine programname.exe from the shell.

        Comment


          #5
          Re: What Does This Mean?

          Thanks for your replies. "sudo aireplay" worked to get past the error message about insufficient rights. But when I try to execute "airodump", which I can see is an executable, I get an error message. I had to follow this suggestion, just to compile airodump.c, because it wouldn't compile otherwise. I don't think that these are Windows executables because I compiled them under Kubuntu.

          Ubuntu 7.04 with svn version 141
          I fixed this by adding the following line to /usr/include/linux/wireless.h at the very top: #include <linux/if.h>
          This is not a proper fix but gets the code compiled.
          (follow-up: ↓ 6 ) 04/30/07 10:05:01 changed by jwright

          These programs are from aircrack 1.42.

          Comment


            #6
            Re: What Does This Mean?

            Originally posted by georgiatech
            he second message says "command not found". What is going on? Both files are executable.
            If you try to run an executable that's not in your $PATH, you need to provide a path to the executable, the simplest way is './your_executable' which means run from current working directory.

            Comment


              #7
              Re: What Does This Mean?

              Thank you. You were right. But I don't understand why it is that if I'm sitting in the folder with the file, why the executable would not be in the path. With Windows DOS, if you're in the same folder as the executable, executables in the folder will execute before the path is checked. what I'm trying to say is, aircrack.exe, airplay.exe and airodump.exe are all in the same folder. Yet airodump.exe is the only executable that requires me to type ./airodump <Enter>. How do I find what the path is? I see that the command is not "path".

              Comment


                #8
                Re: What Does This Mean?

                admittedly this is a bad example, but say you have a script in your working directory named 'sudo'...How is linux supposed to know what you actually want to do? so the './' basically tells linux that I want the following command operated out of this directory...

                I believe that is correct, if not, I'm sure someone wiser than me will fix it!

                mm0
                Dell Inspiron 1720 Laptop<br />Intel T9300 Core2Duo Processor @ 2.5Ghz<br />4 GB Ram | 1920 X 1200 Resolution<br />2 X 160 GB SATA HD Internal<br />Nvidia GeForce 8600M Graphics Adapter<br />Using Kubuntu 9.10

                Comment


                  #9
                  Re: What Does This Mean?

                  OK, let me try again. What is the linux equivalent of Window's "path"?

                  Comment


                    #10
                    Re: What Does This Mean?

                    Open a console and type:
                    Code:
                    echo $PATH
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: What Does This Mean?

                      OK, "echo $path" shows nothing, so there is no path set. So why would I have to type "./airodump" and not just airodump, if I'm in the folder that airodump is in? The other executables in this folder don't require "./".

                      Comment


                        #12
                        Re: What Does This Mean?

                        echo $PATH isn't the same as echo $path

                        Linux is case sensitive. Type type the command exactly as I provided:
                        Code:
                        echo $PATH
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: What Does This Mean?

                          OK, now I see a path. Thanks. But I still don't see why one program requires ./airodump and another program can run with just aireplay. Both executables are in the same folder.

                          Comment


                            #14
                            Re: What Does This Mean?

                            Definition: Relative vs. Absolute Pathnames: Commands can be given file name arguments in two ways. If you are in the same directory as the file (i.e., the file is in the current directory), then you can just enter the file name on its own (e.g., cp my_file new_file). Otherwise, you can enter the full path name, like cp /home/ jack/my_file /home/jack/new_file. Very often administrators use the notation ./my_file to be clear about the distinction, for instance, cp ./ my_file ./new_file. The leading ./ makes it clear that both files are relative to the current directory. File names not starting with a / are called relative path names, and otherwise, absolute path names.

                            If I understand correctly, in Linux, the environment $PATH is explicitly searched when executing a command. You'll note, that when you type echo $PATH your user home directory is not included, so an executable in your user home directory isn't going to be 'found' when simply typing the executable name within the folder - Linux doesn't know where that command is. As to the one that does execute within the folder, I'd guess that there is a matching command somewhere within the $PATH as a result of installing the program? You can check that in a console by typing:
                            Code:
                            cd /
                            sudo find -name aircrack*
                            sudo find -name airplay*
                            I'm guessing that the result will show that both of these have component(s) installed outside of the folder you are executing them from.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: What Does This Mean?

                              Snowhog is right on. In Linux, program execution explicitly follows the $PATH variable to find the program, unless a path is provided by the user or the executing run. The Windows OS does it differently in that it looks first in the current directory/folder and then secondly in the PATH variable. Is either way better than the other? Not necessarily, in my opinion, just different.
                              The next brick house on the left
                              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                              Comment

                              Working...
                              X