Category: Linux

  • Bash Prompt Colors

    This is currently my bash prompt. Locate this code in any script run by bash at startup. I have it in ~/.bashrc GREEN=”\[\e[1;32m\]” BLUE=”\[\e[1;34m\]” YELLOW=”\[\e[1;33m\]” CYAN=”\[\e[1;36m\]” RESET=”\[\e[m\]” BRANCH=$CYAN PS1=”$GREEN\u@\h $BLUE\w $BRANCH\$(git branch 2>/dev/null | grep ‘^*’ | colrm 1 2 | parens | tr -d ‘\n’)$BLUE\$ $RESET” This relies on parens, a simple program that…

  • Elementary Tweaks

    This will be all about getting Elementary OS set up the way Brandon likes it. To install Elementary Tweaks: sudo apt-add-repository ppa:versable/elementary-update sudo apt-get update sudo apt-get install elementary-tweaks To install Wingpanel Slim: sudo apt-get install wingpanel-slim More information about Elementary add-ons can be found here: What happened to Elementary Update? Elementary Update PPA Many…

  • Getting Linux working with the Lenovo Yoga 13

    This worked for me with the Elementary OS, a distribution of Linux based on Ubuntu, which in turn is based on Debian, but you may have luck getting this to work in other distributions as well. For the WiFi, you must download and install the wireless driver. Instructions can be found at the GitHub repository…

  • Setting up WiFi on Raspberry Pi

    This isn’t only for Raspbian running on a Raspberry Pi, as far as I know you can use it on most flavors of GNU/Linux if you want to set up WiFi using only the terminal. This also assumes that you already have appropriate drivers installed. I have tested this with this wireless adapter and the…

  • Creating a Samba share in Linux

    Run the following: sudo apt-get install samba samba-common-bin Set a Samba password for a user with this command: sudo smbpasswd -a USERNAME Add the following to the end of /etc/samba/smb.conf [SHARENAME] path = /home/path/to/folder available = yes valid users = USERNAME read only = no browsable = yes public = yes writable = yes Then…

  • Raspberry Pi Camera Module

    In order to enable user access to vchiq, do the following as root: echo ‘SUBSYSTEM==”vchiq”,GROUP=”video”,MODE=”0660″‘ > /etc/udev/rules.d/10-vchiq-permissions.rules usermod -aGvideo USERNAME To disable the red camera LED, add the following to /boot/config.txt disable_camera_led=1 As example of a python program to control the LED state: #!/usr/bin/env python import time import RPi.GPIO as GPIO # Use GPIO numbering…

  • Linux Boot Loader (GRUB)

    Grub settings: /etc/profile/grub Apply settings: sudo update-grub

  • Running a script at startup in Ubuntu Server

    There is a script located at /etc/rc.local that runs when the server starts up. By default, all the script has in it is this: #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will “exit 0” on success or any…

  • Mounting a USB drive in Ubuntu Server

    Source Manually Mounting Sometimes devices don’t automount, in which case you should try to manually mount it. First, you must know what device we are dealing with and what filesystem it is formatted with. Most flash drives are FAT16 or FAT32 and most external hard disks are NTFS. sudo fdisk -l Find your device in…

  • Installing a GUI on Ubuntu Server

    Since the Ubuntu Server edition doesn’t by default install a window manager, you may want to install one yourself (if you need one). This is how to do so. Either use the tasksel command, or just directly type in (only one) of the following commands: sudo apt-get install ubuntu-desktop sudo apt-get install lubuntu-desktop sudo apt-get…