1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Beginners Tips for Linux

Discussion in 'Linux Guides (Generic)' started by booman, Jan 9, 2013.

  1. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    This Linux tutorial is meant to offer tips on how to install & run PC Games in Linux Mint. I cannot guarantee these steps will work in other distributions. If your game has no native Linux installation binaries, Wine is your next best bet for the game to work. I obviously cannot guarantee the game to work in Wine either.

    I also recommend learning the basics of Terminal commands. I know its silly to learn commands for gaming when Windows doesn't require any command line knowledge, but since Linux is totally free and most of the basic apps are also free, its worth a little bit of your time so you can successfully install/run/diagnose your game.

    Here are some commands that may help you with PC games on Linux:

    Note: when a successful command is run you won't get any evidence that it ran properly in the Terminal. So if you don't get an error, it successfully did exactly what you told it to do.

    Important Note:
    Any time you type a command, you will need to press ENTER to execute it in the Terminal.

    Always press ENTER after you type a command!

    Also, executed commands may or may not give you a result.
    Sometimes executing a command won't prompt any errors which usually means you did it correctly.

    Basic Commands

    cd - change directory, the same as double-clicking a folder
    / - Root is the very top directory in the tree. Just about everything in Linux resides in the root folder.

    Examples:
    Code:
    cd /home
    - navigates directly to your home directory (kinda like My Documents)

    Warning: Changing files & directories in the / (root) folder can break your operating system


    ls - lists all the folder, files and links in your current directory

    Examples:
    Code:
    cd /home
    Code:
    ls
    sudo - means run as administrator, necessary for making changes to game files/directories

    chown - change ownership. some games/downloads/patches will not give you full ownership to the files and directories.

    Examples:
    Code:
    sudo chown booman /home/booman/games
    (gives my account full access to the games folder)

    chmod - changes permissions to the executable's and directories

    Examples:
    Code:
    sudo chmod +x doom3.1.31.sh
    (+x will allow the file to be executed)

    Code:
    sudo chmod 777 quakewars.sh
    (777 will give full permission to all users and groups)

    Launch a game:
    Code:
    ./quakewars.sh
    (Launches your game and will output errors if something went wrong)

    Killing a crashed/locked-up game:
    There are times when my game locked up or is frozen to the point where I can't do anything. I can't close the game or even shutdown Mint. Instead of pressing the power button try killing the game first:

    Ctrl+Alt+F1 - runs a Shell so you can use the command line independent of X Windows.
    Ctrl+Alt+F8 - goes back to the X Windows in Mint (Graphical User Interface)

    Code:
    ps -ef
    - lists all the running processes

    Code:
    ps -ef | grep nameofgame
    - usually the list is too long to find your game. If you know the name of the process use the | grep to see it.

    Code:
    ps -U booman
    - lists all processes currently used by my account

    Code:
    ps -G booman
    - lists all processes currently used by my group

    Code:
    sudo killall game.exe
    - kills the frozen/locked-up game process (even games running in Wine)

    Installing:

    Code:
    apt-get install
    - installs a package/library needed by your game or operating system (separate multiple packages with spaces).

    Sometimes you will get an error about a missing library to run your game. Look up the library online to find the package name and then search in your software manager or do an apt-get install.

    Code:
    apt-get remove
    - removes the package/library

    Code:
    apt-get update
    - updates to the latest changes

    Code:
    apt-get upgrade
    - after an update, do an upgrade to your operating system

    Examples:
    Code:
    sudo apt-get install alsa-base
    Code:
    sudo apt-get install libjpeg62
    Linux can be extremely secure & reliable, that is why its necessary to learn some Terminal commands because they are "work around" to make your games and files accessible to you and the operating system. Some games will install and run just fine with Wine, but most native Linux games will need a couple of commands to make them executable and ready to run.
    Not to mention updating a library needed for the game.

    When I create a tutorial and find that my Linux Mint requires some extra Terminal commands, I will list them step by step in order to help your installation be as easy as possible. Meanwhile you will be learning more about how Linux works and some behind-the-scenes workings.

    Security Warnings:
    As always, there are security risks when using your computer. Be careful what you download from the internet and what directories/files you make changes too.
    If you are not sure if a change will compromise your computer, look it up online first.

    Every time you you use the commands:
    Code:
    su
    or
    Code:
    sudo
    You are using root access (aka Administrator in Windows). Most games need limited access to run, but when you download a patch, game, hack, driver or library, the default permissions will need to be changed so you Linux can use it.

    There is a lot of information online that will help you learn Linux and how to use programs and play games, all the while keeping your Operating System secure.

    Links:
    Mint Community:
    Linux Mint Community
    Google Linux: Basic Linux Commands - Google Code University - Google Code
    Ubuntu Pocketguide: Ubuntu Pocket Guide and Reference - Keir Thomas - Google Books
    Playonlinux Forums: Forums - PlayOnLinux - Run your Windows applications on Linux easily!
    WineHQ Help: WineHQ - Getting Help
    CodeWeavers (cost $$): CrossOver: Windows Games on Mac OS X and Linux with the easiest and most affordable emulator - CodeWeavers
    Dedoimedo: How to get and install Linux games - Full tutorial - A.K.A. Everything you wanted to know about Linux games
    Ubuntu 12.04 Getting Started: Getting Started with Ubuntu 12.04 Free Guide
    Last edited: Feb 11, 2015
  2. Daniel~

    Daniel~ Chief BBS Administrator Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    11,354
    Likes Received:
    170
    Trophy Points:
    63
    Location:
    Greenwater WA
    Home page:
    I've been doing this a while now and I still forget these things. Most helpful Booman! Thank you.
    booman likes this.

Share This Page