Ubuntu, Development

Setting up development environment on Ubuntu

I've switched to Ubuntu, this post documents the development tools I'm using and how to install them.


Instead of using the default terminal I'm using Terminator https://gnometerminator.blogspot.com/p/introduction.html

Terminator supports multiple instances within the same window, this allows you to spit both vertically and horizontally.


sudo apt install terminator



Install PHP 7.2

sudo apt install php7.2

Install Curl

sudo apt install php curl

Install PDO

sudo apt install php7.2-mysql

Install MB String

sudo apt install php-mbstring


GIT and Composer

Install Git

sudo apt install git

Install composer

sudo apt install composer

Composer will need adding to your $PATH to do this open .bash_profile I'll use nano for this

nano ~/.bash_profile

Next, add:

export PATH=~/.composer/vendor/bin:$PATH

Save and exit, you may need to refresh the profile for it to take effect:

source ~/.bash_profile

Installing MySQL

sudo apt install mysql-server

Then run the following to set the password:


i prefer not to have a password for local development in which case you can follow these steps:

Open terminal and type

sudo mysql -u root -p

It will prompt you in MySQL, here you can fire any MySQL commands.
Use MySQL table for change table type so we can use empty password. Bellow is command for it

USE mysql;

Now we change type of table by following command

UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Now we have to flush the privileges because we have used UPDATE. If you use INSERT, UPDATE or DELETE on grant tables directly you need use FLUSH PRIVILEGES in order to reload the grant tables.


Now exit from MySQL by the following command


Now restart MySQL server by the following command

service mysql restart

Source - https://askubuntu.com/a/1080013/879215

For a MySQL client, I'm using DBeaver https://dbeaver.io/



Valet has been ported to Linux. https://github.com/cpriego/valet-linux It can be installed using composer:

composer global require cpriego/valet-linux

Followed by:

valet install

The default domain for valet is .test I prefer to use .localhost this can be changed like this:

valet domain localhost


David Carr

David Carr

For the past 12 years, I’ve been developing applications for the web using mostly PHP. I do this for a living and love what I do as every day there is something new and exciting to learn.

In my spare time, the web development community is a big part of my life. Whether managing online programming groups and blogs or attending a conference, I find keeping involved helps me stay up to date. This is also my chance to give back to the community that helped me get started, a place I am proud to be apart of.

Besides programming I love spending time with friends and family and can often be found together going out catching the latest movie, staying in playing games on the sofa or planning a trip to someplace I’ve never been before.