How to Run a Bin File in Linux

How to Run a Bin File in Linux thumbnail
Linux command line

Most Linux distributions use some variety of package management, and software is generally stored in package archives with extensions such as .deb or .rpm. Companies that distribute proprietary software for Linux, however, often use binary (.bin) files. Many games, graphics drivers and plugins require the user to execute a file with the .bin extension to run the installation program.

Things You'll Need

  • Binary file
  • Terminal emulator
Show More

Instructions

    • 1

      Open the terminal emulator of your choice.

    • 2

      Navigate to the directory of your .bin file. Type:

      cd binfiledirectory

      Replace "binfiledirectory" with the correct location.

    • 3

      Make sure that the file is executable. Type:

      ls -al

      It will result in something like this:
      total 8
      drwxr-xr-x 2 user user 4096 2009-05-17 20:20 .
      drwxr-xr-x 8 user user 4096 2009-05-17 20:20 ..
      -rw-r--r-- 1 user user 0 2009-05-17 20:20 file1
      -rw-r--r-- 1 user user 0 2009-05-17 20:20 file2
      -rw-r--r-- 1 user user 0 2009-05-17 20:20 file3
      -rw-r--r-- 1 user user 0 2009-05-17 20:20 yourbinfile.bin

      To the far left of yourbinfile.bin, you will see the current permissions. If there is no "x", it is not executable. If you do see rwxr--r--, or something similar, skip to Step 5.

    • 4

      If your file was not executable, you can make it executable with one quick command:

      chmod a+x yourbinfile.bin

      This command makes the file executable for all users, which is what you want under most circumstances.

    • 5

      Depending on the program you are trying to run, it might need root permissions. If it is an installation program and you want it installed system-wide, run it as root.

      For Ubuntu and other distributions that use "sudo" type the command as follows:

      sudo ./yourbinfile.bin

      For distributions that rely on "su" (superuser), it will take two commands:

      su
      ./yourbinfile.bin

Tips & Warnings

  • Follow the on-screen instructions completely. When it is finished, exit the terminal emulator.

  • If your distribution relies on "su" to become root and the file you are executing is a graphical program, your computer may return an error. In that case, execute "gtksu yourbinfile.bin" if you are using GNOME or "kdesu yourbinfile.bin" for KDE. Try running the binary file as a regular user first. It will tell you if it requires root.

Related Searches:

Comments

You May Also Like

Related Ads

Featured