Loading...
 

Linux

Linux Mint 13

  • Restart X-Server: CTRL+ATL+BACKSPACE
  • EVGA NVidia Geforce GT 240
    • XWindows freezes using the Live CD because of the video card.
      • When booting up the Live CD, select the 1st menu option and press Tab.
      • User cursor keys to get before "quiet splash".
      • Add text NOMODESET.
      • XWindows will work, but in reduced mode, so the menu button in the bottom left isn't as fully functioning.
      • Need to enable the NVidia private drivers to get the full experience.
        • Menu -> Preferences -> Software Sources
        • Tab: Additional Drivers
  • GRUB 1.99
    • Sector 32 is already in use by FlexNet
  • Disk Utility
    • Error doing BLKPG ioctl with BLKPG_ADD_PARTITION for partition 1 of size 32256 at offset 233178430464 on /dev/sda: Device or resource busy
    • This seems to be from Disk Utility. I partitioned with GParted and everything ran smoothly.
  • Nautilus
    • Breadcrumbs
      • Changing this setting through gconf-editor does not take effect, but changing through the command line does, though both are the same setting.
      • GUI:
        • Applications > System Tools > Configuration Editor (or Alt+F2 and enter gconf-editor) then go to apps/nautilus/preferences and tick the box that says always_use_location_entry.
        • reference: http://community.linuxmint.com/tutorial/view/562
      • Command line:
  • Install a library
    • usually you add "-dev" to the library name and do an apt-get
      • For libusb library do $ sudo apt-get install libusb-dev
  • Notifications
  • Dropbox
    • Get from dropbox's website instead of the Software Manager package
    • After the .deb installs, run Menu -> Internet -> Dropbox to finish downloading package
    • After this, it will start the daemon

SSH Server

  • Install:
    apt-get install openssh-server
    • Settings file: /etc/ssh/sshd_config
  • Restart
    • older:
      /etc/init.d/ssh restart
    • newer:
      sudo service ssh restart
  • Securing SSH With Iptables
    • $ sudo iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent
        --set --name DEFAULT --rsource
      $ sudo iptables -N LOG_AND_DROP
      $ sudo iptables -A INPUT  -p tcp -m tcp --dport 22 -m state --state NEW -m recent
        --update --seconds 60 --hitcount 4 --name DEFAULT --rsource -j LOG_AND_DROP
      $ sudo iptables -A INPUT  -p tcp -m tcp --dport 22 -j ACCEPT
      $ sudo iptables -A LOG_AND_DROP -j LOG --log-prefix "iptables deny: " --log-level 7
      $ sudo iptables -A LOG_AND_DROP -j DROP
      $ sudo aptitude install iptables-persistent
    • Create file: /etc/rsyslog.d/iptables.conf
      • :msg,contains,"iptables deny: " /var/log/iptables.log
        & ~
    • Create file: /etc/logrotate.d/iptables
      • /var/log/iptables.log
        {
          rotate 7
          daily
          missingok
          notifempty
          delaycompress
          compress
          postrotate
              invoke-rc.d rsyslog reload > /dev/null
          endscript
        }
    • http://blog.bigdinosaur.org/securing-ssh-with-iptables/

Apache

  • Restart:
    sudo /etc/init.d/apache2 restart

Google Chrome

  • wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
    echo deb http://dl.google.com/linux/chrome/deb/ stable main | sudo tee -a /etc/apt/sources.list.d/google.list
    sudo apt-get update && sudo apt-get install google-chrome-stable

Polly - twitter client

  • sudo add-apt-repository ppa:conscioususer/polly-unstable
    sudo apt-get update && sudo apt-get install polly



PhpMyAdmin

  • Using the software installation, the configuration might not be done:
    • If /var/www/phpmysqladmin/ does not exist, then it did not run through setup
    • Run setup with:
      $ sudo dpkg-reconfigure -plow phpmyadmin
  • Directory location:
    • Apache config is /etc/apache2/apache2.conf has "Include conf.d/"
    • conf.d/ has phpmyadmin.conf that gets included
    • phpmyadmin.conf has "Alias /phpmyadmin /xxxx" which is location of website files
  • If PhpMyAdmin gives error: Login without a password is forbidden by configuration (see AllowNoPassword)
    • Best to change root password
    • Can also set phpMyAdmin to allow accounts without a password:
      • edit: /etc/phpmyadmin/config.inc.php
      • Uncoment line: $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

find

  • the errors for "Permission denied" are output to the error console, not the regular console, so you get rid of them using error redirection, not grep
    • $ find / -name passwords.txt 2>/dev/null
  • Gimp

Java

  • Remove OpenJDK
    • sudo apt-get purge openjdk*
  • Install Oracle JDK
    • sudo add-apt-repository ppa:webupd8team/java
      sudo apt-get update && sudo apt-get install oracle-java7-installer

Screenshots

Make Linux use local time instead of UTC

  • edit /etc/default/rcS
  • Set UTC=yes if your hardware clock is set to UTC (GMT), or UTC=no to have the hardware clock set to local time.

Show All Running Processes in Linux

Clonezilla

  • Restoring partition image to a different partition
    • The original partition device name is saved with the image files:
      • The partition name is stored in the file: [partition folder]/part
      • The partition name is part of the file name for all the image files
    • Just change the name of the partition in the file [partition folder]/part
    • Rename all the image files with the new partition name
    • I saved the partition from /dev/sda6, and needed to restore it to /dev/sda9
      • Old [partition folder]/part:
        • $ cat part
          sda6
      • New [partition folder]/part:
        • $ cat part
          sda9
      • Old file names:
        • $ ls sda6*
          sda6..aa
          sda6..ab
          sda6..ac
      • New file names:
        • $ ls sda9*
          sda9..aa
          sda9..ab
          sda9..ac
      • I used vi to edit [partition folder]/part
      • I used nano to write a bash script:
        • for $item in sda6*
          do
           item2=${$item/sda6/sda9}
           mv $item $item2
          done

NginX

Pogoplug Arch Linux for ARM

  • check file system
    • umount the drive and run e2fschk -y -f /dev/sdxn (sdxn will probably be sdb1)
  • Install on POGO-E02 and POGO-E02G (Pink model)
  • The boot loaders are in NAND
  • To recover from power outage:
    • format & extract the latest rootfs tarball, as root (not! sudo, but sudo su if necessary), onto your USB drive
    • Label partition "rootfs"
      'tune2fs -L "rootfs" /dev/sdX#

VirtualBox

  • Extension Pack
    • You have to download the Extension Pack from the VirtualBox website manually
    • There isn't a package for this
  • Guest Additions
    • The .iso file to run inside the virtual machine
    • There is a linux package for this
  • Shared Folders
    • Machine (permanent) shared folders that exist before the machine is started
      • Mounted in /media/sf_NAME
      • Folder name is prepended by sf_
      • Owner is root, Group is vboxsf
    • Transient shared folders, and machine shared folders created while the machine is running
      • Need to mount with: mount -t vboxsf -o uid=XXX SHARE MOUNTPOINT
      • Using gid option didn't work for me
      • You can mount them anywhere
      • Name is as is
      • Without the -o option, owner is root, group is root, and can't be changed with chown or chmod
      • Use linux command id to find out id numbers for users

Fuduntu

  • Seems fun and semi easy
  • Uses yum instead of apt-get
  • Has the slightest delay in VirtualBox. Not sure how it runs natively.
  • Doesn't have MySQL (Jan 2013)
    • Repository has 5.1, but I couldn't get it to work
  • Can't use LAMPP/XAMPP because it's 32 bit

Samba