This is for a Debian based OS, such as: Ubuntu, Mint, and Elementary OS. I prefer Ubuntu 15.10
- Optional Configurations
- Installation Packages
- Enable PPAs
- System Tools
- Install Nvidia Drivers (Install drivers from official repository for Nvidia Drivers)
- Install ATI Drivers
- Utilities
- RedShift For Eye Strain
- Dark Theme
- Sun Java
- Wine (Windows emulator) (Run Microsoft® Windows® applications on linux)
- Nautilus-Actions (Graphically create custom context menu options for Ubuntu's Nautilus file manager)
- Hardinfo (Everest/Aida alternative for linux)
- Caffeine (Prevent the activation of the screensaver when using full-screen windows)
- GNU Screen (Full-screen window manager that multiplexes a physical terminal between several processes)
- Other Tools
- Google Chrome
- PlayOnLinux (Software which using wine allows you to easily install and use numerous games and apps designed to run with Microsoft® Windows®)
- Dropbox (Allows users to create a special folder on their computers, which Dropbox then synchronizes so that it appears to be the same folder (with the same contents) regardless of which device is used to view it)
- Sublime Text 3
- Pidgin
- DBeaver (Database management tool)
- VirtualBox
- Android Studio
- SmartGit
- FileZilla (sFTP Client)
- Spotify
- Meld Diff Tool
- Vagrant
- Docker
- Audacious Audio Player
- XnViewMP (Powerful cross-platform media browser, viewer and converter)
- Sticky Notes
- Guake (Quake like Terminal)
- Skype
- Telegram
- Slack
- Gimp
- Httpie (Terminal HTTP client)
- USB Maker for Windows ISO on Linux
- LAMP
- Python
- Ruby
- NodeJS
- Customizations
- System Tweaks
- Shortcuts
- VIM Customization
- Enable Auto Focus on Opened Applications
- Enable Normal Scrollbars
- Enable User Name in Systray
- Change Datetime Format in Systray
- Enable Minimize App on Dash Click
- Disable Window Grouping
- Install Custom Wallpaper
- Change Greeter Background
- Add Georgian Keyboard
- Ubuntu Fixes
- Install Gnome 3
- Adjust Mouse and Devices
- Virtual Machine Related
- Synchronize Configurations
- Chrome Addons
- Other Applications
- Clean System
lsb_release -a
lsb_release -as # Short Information
lsb_release -sc # OS Codename
lsb_release --help
nproc # How many Processing Units
cpuid # Must install cpuid from terminal
cat /proc/cpuinfo # Lots of info
lspci -vnn | grep -i VGA -A 12
free -h # Human readable, or do --help for options
top or htop # Must install htop
vmstat -s
cat /proc/meminfo # Lots of info
Disk Space
df
df -B MB # In Megabtyes, etc
Disks UUID
ls -al /dev/disk/by-uuid/
gnome-system-monitor
List of Packages
dpkg -l
To taking screenshot from terminal run this:
gnome-screenshot
With delay 5 seconds
gnome-screenshot --delay 5
With delay 5 seconds and only window
gnome-screenshot -w --delay 5
gsettings list-recursively org.gnome.desktop.wm.keybindings | sort | more
See your keypressed:
xev
Or for a lot of details:
xev | grep KeyPress
This is less painful when creating a group with rwx permissions for /usr/local
sudo groupadd local
sudo usermod -a -G local jesse
sudo chgrp -R local /usr/local
sudo chmod -R g+rwx /usr/local
You can use 32Bit applications if you like, sometimes this is useful.
sudo apt update && sudo apt install -y unetbootin
To enable Networking, and make it accessible to all computers such as Windows also first install Samba:
$ sudo apt install -y samba
Then edit the Samba config:
$ vim /etc/samba/smb.conf
Under [global]
change the workgroup to what you use, the default is WORKGROUP:
workgroup = WORKGROUP
Then you will have to reload your Session.
If you are running Grub as your default boot-loader, you can use this application to make it easier to change the order.
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
sudo apt update && sudo apt install -y grub-customizer
Load the application either with <Super>
and look for grub customizer or terminal gksudo grub-customizer
.
Go to the General Settings
tab, and you'll see default entry.
- Click the drop-down list and you can either select Entry By Order (Left Column) Or a specific Item (Right Column).
- If you are dual booting Windows and want Windows the default, Select the right column for Windows.
- The reason is if more items are added, perhaps new kernels, then if Position 5 which held Windows will no longer be the default.
Open /etc/fstab
sudo vim /etc/fstab
Add to /etc/fstab this line (You can get DISK UUID by command ls -al /dev/disk/by-uuid/
):
For NTFS disk:
UUID=[DISK UUID] /media/D ntfs-3g defaults,windows_names,locale=en_US.utf8 0 2
For ext4 disk:
UUID=[DISK UUID] /media/D ext4 defaults 0 2
After run
sudo mount -a
Open /etc/fstab
sudo vim /etc/fstab
And add:
If requires authorization:
username@remote_address:/remote/path /local/path fuse.sshfs delay_connect,_netdev,idmap=user,uid=1000,gid=1000,noatime,default_permissions,IdentityFile=/home/USER/.ssh/id_rsa,reconnect,transform_symlinks,allow_other 0 0
If not requires:
//remote_address/remote/path /local/path cifs guest,iocharset=utf8,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,noperm,_netdev 0 0
After run
sudo mount -a
Install Prerequisites
sudo apt install -y python3 python3-appdirs python3-dateutil python3-requests python3-sqlalchemy python3-pip
Install acd_cli (https://github.com/yadayada/acd_cli)
cd ~ && sudo pip3 install --upgrade git+https://github.com/yadayada/acd_cli.git
Initiate "sync" which will launch a browser (chrome/lynx/etc) to amazon.com and setup your oauth key.
acd_cli sync
Copy/Paste and store your oauth data. Note: it will most likely have improper newline breaks. Fixup in your favorite text editor.
vim ~/.cache/acd_cli/oauth_data
Add your user to the "fuse" group to allow mounting
sudo addgroup <username> fuse
Mount the root of your Amazon Cloud drive to the /media/amazon directory
mkdir /media/amazon
acd_cli mount /media/amazon
Upload
-d exclude duplicate files from upload
-x upload threads
e.g. Upload your local /media/videos directory to the root of your Amazon Cloud Drive.
acd_cli upload -d -x 4 /media/videos /
ssh-keygen -t rsa -C "[email protected]"
Instal tools
sudo apt install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
Check if supported by hardware
sudo egrep '(vmx|svm)' --color=always /proc/cpuinfo
If nothing is displayed, then your processor doesn't support hardware virtualization, and you must stop here.
Run:
kvm-ok
If you have KVM, you will see: "INFO: Your CPU supports KVM extensions INFO: /dev/kvm exists KVM acceleration can be used"
Next, add your user to the KVM group and libvirtd group. To do so, type:
sudo adduser $(whoami) kvm
sudo adduser $(whoami) libvirtd
After the installation, re-login so that the changes take effect. You can test the installation by typing:
sudo virsh -c qemu:///system list
Enter sudo mode
sudo su
List available disks and detect where it was mounted: /dev/sd[1 letter][optionally 1 number]. For example, /dev/sdc or /dev/sdc1
fdisk -l
or
lsblk
Unmount drive
umount sd[1 letter][optionally 1 number]
Format to FAT32
mkfs.vfat /dev/sd[1 letter][optionally 1 number]
You can use mkfs.ntfs for NTFS, mkfs.ext4 for EXT4 etc.
Eject drive
eject /dev/sd[1 letter]
List available disks and detect where it was mounted: /dev/sd[1 letter][optionally 1 number]. For example, /dev/sdc or /dev/sdc1
fdisk -l
or
lsblk
Make sure the USB device is unmounted (not safely removed, but unmounted) If it is mounted you can unmount it:
sudo umount /dev/sd[1 letter][optionally 1 number]
For writing image run:
sudo dd bs=4M if=path/to/your/iso/file.iso of=/dev/sd[that 1 letter]
You must download HPLIP software from here: http://hplipopensource.com/hplip-web/gethplip.html
After install .run package (how?) and run. Follow the wizard and add neccessary HP printer
Login to your Linux user and go to your home directory,
cd ~
Run these commands and tweak them as needed. The -y
flag installs without a prompt. Run these commands from the terminal.
sudo apt update && sudo apt upgrade
PPA's are provided within categories below, I highly recommend using PPA's or at least installing this package in case you ever use them.
Enable Canonical partners repository
sudo add-apt-repository -y "deb http://archive.canonical.com/ $(lsb_release -sc) partner" && sudo apt update
This is for tweaking the UI
sudo apt update && sudo apt install -y\
unity-tweak-tool\
compizconfig-settings-manager\
compiz-plugins\
dconf-editor\
synaptic
You can check your VGA Info
Find out the right driver version for your graphics card on http://www.nvidia.com/Download/index.aspx
Install Nvidia Drivers
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt update && sudo apt install -y nvidia-XXX
Type your version instead XXX
And after select your installed driver from drivers tab
sudo software-properties-gtk
Remove Nvidia Drivers
sudo add-apt-repository -r ppa:graphics-drivers/ppa
To Edit Nvidia Settings; Type the following in the Global Launcher (Super Key/Windows Key):
nvidia settings
TDB
Install the Utilities:
sudo apt install -y vim git mercurial meld curl htop xclip unzip gdebi preload bleachbit ubuntu-restricted-extras cifs-utils unace unrar zip p7zip-full p7zip-rar sharutils rar openssh-server lm-sensors whois traceroute nmap font-manager python-gpgme sshfs mc libavcodec-extra libdvd-pkg nfs-kernel-server
To setup the git defaults
git config --global user.name your name
git config --global user.email [email protected]
That will create a ~/.gitconfig
with:
[user]
email = [email protected]
name = your name
sudo apt install -y redshift
Create your configuration file:
sudo vim ~/.config/redshift.conf
Adjust the temperatures you prefer. I like mine to be very yellow and dim. (The lower the dimmer)
[redshift]
temp-day=3500
temp-night=3500
; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
;brightness-day=0.7
;brightness-night=0.4
; There are more settings for Gamma, Location Provider, Manual Location, etc.
Close and reload redshift. If you cannot find the icon anywhere run this in terminal:
pkill redshift-gtk redshift
If RedShift gives you a Geoclue2
error do this:
sudo vim /etc/geoclue/geoclue.conf
Append these lines at the bottom:
[redshift]
allowed=true
system=false
users=
A newer version of redshift will install a desktop file so a Geoclue2 warning won't happen on newer systems.
I prefer Vivacious ZBlackout Blue Pro Theme
Add repository
sudo add-apt-repository ppa:ravefinity-project/ppa
sudo apt update
Installation
sudo apt install -y vivacious-colors-gtk-dark
sudo apt install -y vivacious-colors-gtk-light
sudo apt install -y vivacious-unity-gtk-dark
sudo apt install -y vivacious-unity-gtk-light
Use the Unity Tweak Tool to set vivacious-zblackout-blue-pro
Install
sudo apt-add-repository ppa:webupd8team/java
sudo apt update && sudo apt install -y oracle-java8-installer
Set Oracle Java as main in system
sudo vim /etc/environment
Add this line
JAVA_HOME=/usr/lib/jvm/java-8-oracle
And update alternatives sudo update-alternatives --config java
To run windows applications Wine is the best option. I often use HeidiSQL with Wine.
sudo add-apt-repository -y ppa:ubuntu-wine/ppa
sudo apt update
You can check latest version of wine here https://www.winehq.org/ While writing this article, lastest version was 1.8
If you need a 64bit installation:
sudo apt install -y wine1.8-amd64 winetricks
If you need a 32bit installation:
sudo apt install -y wine1.8-i386 winetricks
Use Nautilus-Actions to easily and graphically create custom context menu options for Ubuntu's Nautilus file manager. If you don't want to create your own, you can install Nautilus-Actions-Extra to get a package of particularly useful user-created tools.
sudo apt install -y nautilus-actions
After installing it, quit and restart the Nautilus file manager with the following command. You can also press Alt+F2 and type this command instead of running it in a terminal.
nautilus -q
Launch the Nautilus-Actions Configuration Tool from the Dash after installing it.
You also can install some Nautilus extensions
sudo apt install -y nautilus-admin nautilus-meld nautilus-checksum-menu
Hardinfo is a Everest/Aida alternative for Linux. Its shows system information
sudo apt install -y hardinfo
Caffeine is a tool used to temporarily prevent the activation of the screensaver / lock screen / sleep mode, when using full-screen windows. The application is useful if you're using a video player that doesn't do this automatically, when listening to music, etc.
sudo apt install -y caffeine
Note: After the installation, the command-line version of Caffeine is set to start automatically on login. If you want the indicator to start automatically, you'll have to add "caffeine-indicator" to your startup applications.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scrollback history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.
sudo apt install -y screen
Add google chrome repository and install
sudo sh -c 'echo "deb [arch=amd64] http://dl-ssl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt update && sudo apt install -y google-chrome-stable
Then launch it with `$ google-chrome` and you can pin it to a unity bar.
Installation
wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_trusty.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt update && sudo apt install -y playonlinux
Installation
sudo sh -c 'echo "deb http://linux.dropbox.com/ubuntu $(lsb_release -sc) main" >> /etc/apt/sources.list.d/dropbox.list'
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 1C61A2656FB57B7E4DE0F4C1FC918B335044912E
sudo apt update && sudo apt install -y dropbox
Download from http://www.sublimetext.com/3
Configuration synchronization explained here
Installation
sudo apt -y install pidgin
Configuring google talk account
Basic
- Protocol: XMPP
- Username: [username without @]
- Domain: [username domain after @]
- Password: [account password]
Advanced
- Connect Port: 5222 Connect Server: talk.google.com
Download from http://dbeaver.jkiss.org/download/
Installation
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt update && sudo apt install -y virtualbox-5.0
Suggested to Enable Native Virtualization
Also you can read Virtual Machine Related
Installation
Download Android Studio from https://developer.android.com/sdk/index.html Extract the archive file into an appropriate location for your applications, eg: /opt. Use the filename of your downloaded archive, in my example android-studio-ide-143.2821654-linux.zip
sudo unzip android-studio-ide-143.2821654-linux.zip -d /opt
To launch Android Studio, navigate to the /opt/android-studio/bin directory in a terminal and execute ./studio.sh
After change PATH
vim ~/.bashrc
And add lines:
export PATH=${PATH}:/path-to-android-sdk/tools
export PATH=${PATH}:/path-to-android-sdk/platform-tools
Canonical Partner's repository must be enabled for installation via terminal:
Installation
sudo apt install -y smartgit
Or download from http://www.syntevo.com/smartgit/download install and run /usr/share/smartgit/bin/smartgit.sh
Installation
sudo apt install -y filezilla
Installation
sudo sh -c 'echo "deb http://repository.spotify.com testing non-free" >> /etc/apt/sources.list.d/spotify.list'
sudo apt update && sudo apt install -y spotify-client
Download from http://www.teamviewer.com/en/download/linux.aspx
sudo apt install -y meld
To install Vagrant, you need to download and run the installation kit. Before going further, be sure that you have dpkg and Virtual box installed:
sudo apt install -y dpkg-dev virtualbox-dkms
Make sure linux headers already installed
sudo apt install -y linux-headers-$(uname -r)
Go to the http://downloads.vagrantup.com page of Vagrant and check for the latest release. After download latest
wget https://releases.hashicorp.com/vagrant/VERSION/vagrant_VERSION_x86_64.deb
dpkg -i vagrant_VERSION_x86_64.deb
Reconfigure the VirtualBox DKMS:
sudo dpkg-reconfigure virtualbox-dkms
Installation
wget -qO- https://get.docker.com/ | sh
Working with Docker is a pain if your user is not configured correctly, so add your user to the docker group with the following command.
sudo usermod -aG docker $(whoami)
Log out and log in from your server to activate your new groups.
sudo apt -y install python-pip
sudo pip install docker-compose
Installation
sudo apt install -y audacious
XnView MP is the enhanced version of XnView Classic. It is a powerful cross-platform media browser, viewer and converter. Compatible with more than 500 formats such as PSD etc.
Download and install from http://www.xnview.com/en/xnviewmp/#downloads
Just like Google Keep and Windows Sticky Notes, it allows you to jot down thoughts, lists, and reminders on desktop.
Installation
sudo apt-add-repository ppa:umang/indicator-stickynotes
sudo apt update && sudo apt install -y indicator-stickynotes
Guake is a dropdown terminal made for the GNOME desktop environment. Guake's style of window is based on an FPS game, and one of its goals is to be easy to reach.
Installation
sudo apt install -y guake
Installation
sudo apt install -y skype
While we're at it, let's also fix Skype on 64bit not using the correct theme, by installing the missing dependencies using the following command:
sudo apt install -y gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386
Add repository
sudo add-apt-repository -y ppa:atareao/telegram
Installation
sudo apt update && sudo apt install -y telegram
Canonical Partner's repository must be enabled for installation via terminal:
sudo apt install -y slack-desktop
Or download from https://slack.com/downloads and run manually
Installation
sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp
After run:
sudo apt update && sudo apt install -y gimp gimp-data gimp-plugin-registry gimp-data-extras
You can easily use httpie from terminal: http get https://google.com
Installation
sudo apt update && sudo apt install -y httpie
You can easily use Startup Disk Creator
and UNetbootin
to create Linux to USB. But if you need Windows to USB from your Linux OS use Win USB:
sudo add-apt-repository -y ppa:colingille/freshlight
sudo sh -c "sed -i 's/wily/vivid/g' /etc/apt/sources.list.d/colingille-ubuntu-freshlight-$(lsb_release -sc).list"
sudo apt update && sudo apt install -y winusb
We replace the sources.list back to vivid in order to get it to work for ubuntu 15, that is the purpose of the sed
command.
Linux Apache MySQL PHP
- Installation for the following:
- PHP 5.6 (and Modules)
- PHP 7.0 (and Modules)
- Apache 2 (and Modules + Dynamic hosts)
- Nginx (Optional)
- MySQL
- Redis
- and Header Files.
It's important to install php5-dev if you want to compile any add-ons later.
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update && sudo apt install -y php5 libpcre3-dev php5-cli php5-cgi php5-common php5-mysql php5-curl php5-gd php5-geoip php5-imagick php5-imap php5-json php5-ldap php5-mcrypt php5-memcache php5-memcached php5-sqlite php5-tidy php5-xdebug php5-xmlrpc php5-xsl php5-dev
If you are looking for more PHP modules try:
sudo apt-cache search php5-
It's important to install php7.0-dev if you want to compile any add-ons later.
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update && sudo apt install -y php7.0-bz2 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-enchant php7.0-fpm php7.0-gd php7.0-gmp php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mcrypt php7.0-mysql php7.0-odbc php7.0-opcache php7.0-pgsql php7.0-phpdbg php7.0-pspell php7.0-readline php7.0-recode php7.0-sybase php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-sqlite3 php7.0-mbstring php7.0-bcmath php7.0-soap php7.0-zip php-xdebug
If you are looking for more PHP modules try:
sudo apt-cache search php7.0-
curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
Disable XDebug for composer
sudo phpdismod -s cli xdebug
And add this lines in your .bashrc file:
# Load xdebug Zend extension with php command
alias php='php -dzend_extension=xdebug.so'
# PHPUnit needs xdebug for coverage. In this case, just make an alias with php command prefix.
alias phpunit='php $(which phpunit)'
wget https://phar.phpunit.de/phpunit.phar && chmod +x phpunit.phar && sudo mv phpunit.phar /usr/local/bin/phpunit
For PHP 5.6
sudo apt install -y apache2 libapache2-mod-php5
For PHP 7.0
sudo apt install -y apache2 libapache2-mod-php7.0
Tweak Apache (Remove apache warning about server's fully qualified domain name)
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn && sudo service apache2 reload
Enable mod_rewrite
sudo a2enmod rewrite
Enable php-mcrypt
For PHP 5
sudo php5enmod mcrypt && sudo service apache2 restart
For PHP 7
sudo phpenmod mcrypt && sudo service apache2 restart
If you are looking for more Apache modules try:
sudo apt-cache search libapache2-mod
Enable module vhost_alias
sudo a2enmod vhost_alias
Next, open /etc/apache2/apache2.conf
sudo vim /etc/apache2/apache2.conf
Comment line which includes enabled hosts
#IncludeOptional sites-enabled/*.conf
and add the following lines to the bottom of file.
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" dynamic_vhosts
CustomLog ${APACHE_LOG_DIR}/access.log dynamic_vhosts
<VirtualHost *:80>
VirtualDocumentRoot /var/www/domains/%-2+/public_html
VirtualScriptAlias /var/www/domains/%-2+/cgi-bin
<Directory /var/www/domains>
DirectoryIndex index.html index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
</VirtualHost>
This sets up a catch all for any domain coming in over port 80 (the default port for http traffic, if your using https you will need to use 443 - alternatively you could remove the port restriction). The important line here is the VirtualDocumentRoot. The tells Apache where your files will reside on disk. The %0 part takes the whole domain name and inserts it into the path. But I didn't want to have the .dev part of the domain in my folders on disk, otherwise we use %-2+ To illustrate this if we went to a domain testing.com.dev the VirtualDocumentRoot would be:
/var/www/html/domains/testing.com
If you have internet access, no need to add *.dev domains to your hosts file (/etc/hosts), anyway works perfectly.
But if .dev domains not works, you can add automatic .dev domain resolving on your local machine:
sudo vim /etc/NetworkManager/dnsmasq.d/dev-tld
And enter:
local=/dev/
address=/dev/127.0.0.5
The first command says *.dev requests can't be forwarded to your real DNS server. The second says *.dev resolves to 127.0.0.5 which is localhost.
And restart network-manager:
sudo service network-manager restart
Or if you prefer to use nginx
For stable version
sudo add-apt-repository -y ppa:nginx/stable
For latest (recommended)
sudo add-apt-repository -y ppa:nginx/development
And after install
sudo apt update && sudo apt install -y nginx
sudo apt install -y mysql-server mysql-client
sudo sed -i 's/bind-address/bind-address = 0.0.0.0#/' /etc/mysql/my.cnf
This is a very nice utility https://github.com/dbcli/mycli
pip install mycli
Usage (See the documents from the git link above for more example):
mycli -h localhost -u root
mycli -h localhost -u root -p
Install redis latest stable version
sudo add-apt-repository -y ppa:chris-lea/redis-server
sudo apt update && sudo apt install -y redis-server
sudo apt install -y memcached php-memcached
sudo apt install -y default-jre
sudo apt-add-repository ppa:phalcon/stable
sudo apt update
sudo apt install -y php5-phalcon
This is an easy to use install script that will cleanup after itself. It can also be used for updating:
sudo bash install_phalcon_devtools.sh
To test it run: $ phalcon
We will use the Access Control Lists (ACL) or (Filesystem Access Control List). We will use group permissions for folders so you don't have to make the public writable, because 777
is dangerous.
# Make sure you have ACL installed
sudo apt install -y acl
Look for your main partition with:
$ df
Mine happens to be dev/root
, yours may be dev/sda
or something. Make sure to replace that below:
# T
sudo /sbin/tune2fs -o +acl /dev/root
To see what file system you are using ext3
, ext4
, etc, use the partition:
sudo file -sL /dev/root
We have to put the partition in read-only mode, then remount it:
sudo /bin/mount -o remount /dev/root
Apply Group
# This sets the Defaults
setfacl -Rd g:www-data:rw /var/www
# This sets future file
setfacl -Rm g:www-data:rw /var/www
To Modify
setfacl -Rm g:www-data:rw /var/www
Otherwise you could always set up a crontab such as:
crontab -e
Then append this to run every five minutes.
*/5 * * * * /home/longman/backup.sh chgrp -R www-data /var/www && chmod g+rw /var/www
Lastly, you could have a deploy script that does this for you, such as Python Fabfile
, but that's another topic.
- Installation packages: - Pip - Virtualenv
Python is installed by default on Ubuntu, version 2.7 is suitable. I strongly recommend installing python-dev
for headers to compile certain PIP packages.
sudo apt install -y python-dev libmysqlclient-dev
sudo apt install -y python-pip
sudo pip install fabric virtualenv virtualenvwrapper django
Manually install Python. python installation required packages
sudo apt -y install build-essential checkinstall
sudo apt -y install libreadline-gplv2-dev libncursesw5-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev
sudo apt -y install libjpeg-dev libpng-dev
sudo apt -y install zlib1g-dev libbz2-dev
sudo apt -y install krb5-multidev
sudo apt -y install openssl libssl-dev
sudo apt -y install libffi-dev
sudo apt -y install libgmp-dev
Download and extract Python using following command from python official site. You can also download latest(3.6.0) version in place of specified below.
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz && tar -xvf Python-3.5.2.tgz
sudo mv Python-3.5.2 /opt/ && cd /opt && cd Python-3.5.2
Use below set of commands to compile python source code on your system using altinstall.
./configure
make
sudo make altinstall
Check the Python version installed, using below command
python3.5 -V
Pip is a tool for installing and managing Python packages. Install Pip with Wget and Python.
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.5 get-pip.py
View a list of helpful commands
pip --help
Check the version of Pip that is installed
pip -V
Virtualenv is a tool to create isolated Python environments. install the virtualenv package
pip install virtualenv
Create an Environment with virtualenv
virtualenv -p python3.5 --no-site-packages env
Activate script
cd env
source bin/activate
Deactivate
deactivate
Install Ruby 2.X with header files in ruby2.0-dev
, this will keep your gems from having issues.
sudo apt install -y ruby2.0 ruby2.0-dev
For Ruby RVM (Version Management)
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
I am using a PPA to fix the nodejs path issue(s)
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt install -y nodejs
sudo chown -R $(whoami) ~/.npm
sudo npm install bower gulp grunt-cli webpack -g
If installing coffee-script and typing $ coffee
produces an error, make sure coffee is not within the $PATH
echo $PATH
Open sysctl.conf
sudo vim /etc/sysctl.conf
Add this line:
fs.inotify.max_user_watches = 524288
And after run
sudo sysctl -p
For security reasons, not recommended
sudo git config --global http.sslVerify false
- "System Settings" > "Keyboard" > "Shortcuts" > "Custom Shortcuts" ctrl+r Terminal
gnome-terminal
- "System Settings" > "Keyboard" > "Shortcuts" > "Custom Shortcuts" ctrl+e Files
nautilus -w
Setup VIM
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
And copy .vimrc file in your home folder (/home/USERNAME/.vimrc) After run
$ vim
:PluginInstall
In CompizConfig go to "General Options" > "Focus & Raise Behaviour" and set "Focus Prevention Level" to "Off"
gsettings set com.canonical.desktop.interface scrollbar-mode normal
To revert
gsettings reset com.canonical.desktop.interface scrollbar-mode
gsettings set com.canonical.indicator.session show-real-name-on-panel true
Open dconf-editor and go com > canonical > indicator > datetime
Change time format to CUSTOM and time format type %a, %e %b %H:%M %
Open Compizconfig and go to "Desktop" > "Ubuntu Unity Plugin" > "Launcher Tab" and enable "Minimize Single Windows Applications (Unsupported)"
Open Compizconfig and scroll down to "Ubuntu Unity Plugin". Choose the tab "Switcher". Disable the alt-tab and shift-alt-tab key bindings. ("Key to start the switcher" and "Key to switch to the previous window in the Switcher". Click the "Back" button. Scroll down to the "Window management" section. Here you can select another switcher. I enable the "Static Application Switcher", resolve any potential conflicts by setting the setting for "Static Application Switcher". Now you can tweak the switcher by clicking on it. I have changed alt+tab and shift+alt+tab to "Next window (All windows)" and "Prev window (All windows)"
For convert
command you need install package imagemagick
mkdir ~/Pictures/Wallpapers
sudo convert ~/Dropbox/images/DSM.jpg ~/Pictures/Wallpapers/DSM.png
gsettings set org.gnome.desktop.background picture-uri file:///home/longman/Pictures/Wallpapers/DSM.png
Copy image to /usr/share/backgrounds
sudo cp ~/Pictures/Wallpapers/DSM.png /usr/share/backgrounds
Check permissions of your file
And after open theme file
sudo vim /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml
Find the key name background
and change the default to the path of your picture in "/usr/share/backgrounds/".
For the key name draw-user-backgrounds
, change the default value to false
.
Go to System "Settings" > "Keyboard" > "Text Entry" and add Georgian layout. Also enable "Allow different sources for each window"
These are solutions to fix problems I've encountered.
This appears in the top-right menu on Unity. Tested in 14/15.
This will also fix Tweak UI if a sound item is missing.
sudo apt install -y indicator-sound
For Unity (Default)
killall unity-panel-service
For Gnome
killall gnome-panel
If you prefer Gnome 3 over the Unity desktop it's easy to install:
sudo apt install -y ubuntu-gnome-desktop
sudo service gdm restart (Or a reboot is easier)
Unity uses lightdm
and Gnome uses gdm
, it's easiest to stick with lightdm.
If you want the default login a certain one select either lightdm or gdm. If you want to change it later run:
sudo dpkg-reconfigure gdm
Without Compiz, you can resize windows very nicely:
- Focus on a window
- Hold ALT + Middle Mouse Click + Drag
- Note: Depending on where you position your mouse to will resize up/down/left/right
Run this simple command in the terminal and you will see the positions change right away.
Move to right (terminal)
gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
Move to left (terminal)
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'
In terminal make sure this is false, then try your hotkey ctrl+alt+l
or if you set it like min super+l
in the settings:
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'
You need to use Firefox or IceWeasle at https://extensions.gnome.org/ to toggle these items. I suggest creating an account so you have a record.
- Must Have Extensions
- Dash to Dock ⭐⭐⭐⭐⭐
- Workspace Dock ⭐⭐⭐⭐
- Applications Menu ⭐⭐⭐⭐⭐
- TaskBar ⭐⭐⭐⭐⭐
- No Topleft Hot Corner ⭐⭐⭐⭐⭐
- Force Quit ⭐⭐⭐⭐⭐
- Nice Extensions
- Taskbar ⭐⭐⭐⭐⭐
- Small Panel Icon ⭐⭐⭐⭐⭐
- Top Icons ⭐⭐⭐⭐
- MMOD Panel ⭐⭐⭐⭐⭐
- Keyboard Modifiers Status ⭐⭐⭐
- Laine ⭐⭐⭐⭐
- Disable Workspace Switcher Popup ⭐⭐
- Refresh Wifi Connections ⭐⭐⭐⭐
- Disconnect Wifi ⭐⭐⭐⭐⭐
- Toggle Touchpad (For Laptops) ⭐⭐⭐⭐⭐
This is a rare things for me, it happens much more in unity and requires a lot more "damaging" things. To fix a gnome that seems frozen do the following:
ALT + F2 enter in r (lowecase) and press Enter
When using a USB mouse sometimes the speed is just not right, in my case it's too slow often. Here is how to adjust it:
xinput --list
I get something like this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:101b id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
...
The ID of my mouse is 12
.
You can see all the properties with:
$ xinput --list-props 12
Then you can adjust the settings the String value and a value at the end:
$ xinput --set-prop 12 "Device Accel Constant Deceleration" 2
To keep the settings in Gnome, do the following:
$ cd ~
$ touch gnome-boot.sh && chmod +x gnome-boot.sh
Example of gnome-boot.sh
file (Note: You can call it whatever you like):
#!/bin/bash
xinput --set-prop 12 "Device Accel Constant Deceleration" 4
Then Add the Bash script the Gnome Session:
$ gnome-session-properties
This has to do with VirtualBox
Append the following to yourbox.vmx
with the machine off.
mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"
usb.generic.allowHID = "TRUE"
vagrant plugin install vagrant-vbguest
vagrant ssh
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
Running Windows 8 in Virtualbox has an odd error, run this in cmd
or powershell
, or terminal
on linux.
vboxmanage list vms
vboxmanage setextradata "The Box Name" VBoxInternal/CPUM/CMPXCHG16B 1
I am using Dropbox for syncing configurations
Install Package Control https://packagecontrol.io/installation#st3
After:
cd ~/.config/sublime-text-3/Packages/
rm -rf User
ln -s ~/Dropbox/workspace/appdata/sublime-text-3/Packages/User
cd ~/.config/filezilla
rm -f sitemanager.xml
ln -s ~/Dropbox/workspace/appdata/filezilla/sitemanager.xml
- Chroma Color Picker
- Advanced REST client
- Docs PDF/PowerPoint Viewer
- JSONView
- LastPass: Free Password Manager
- New Tabs At End
- Octotree
- Recently Closed Tabs
- User-Agent Switcher for Chrome
- DragonDisk S3
- Kazam (Screen Recorder)
- Shutter
- gnome-system-tools
- Terminator
- Gdeb
- MySQL Workbench
- Bleachbit (Trash Cleaner)
- Preload (Intelligent Bootup Time)
Remove not neccessary apps from startup
Show system apps in Startup Applications
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
Open "Startup Applications" and uncheck apps: Chat, Orca Screen Reader, Zeitgest Datahub
Hide system apps
sudo sed -i 's/NoDisplay=false/NoDisplay=true/g' /etc/xdg/autostart/*.desktop
Remove Amazon from dash
sudo apt purge unity-webapps-common
Remove rythmbox audio player
sudo apt purge rhythmbox
Remove Totem video player
sudo apt purge totem
Clean System
sudo apt autoremove
sudo apt clean
sudo apt autoclean