This simple tutorial will show you how to convert PNG to JPG in Ubuntu, so that it reduce the memory size and speed up loading image time.
1.) Install the required package by running below command in terminal:
sudo apt-get install imagemagick
2.) Then you can convert an .png image to .jpg format via below command. It takes “ubuntuhandbook.png” in the current directory and creates a JPEG image from it.
convert ubuntuhandbook.png ubuntuhandbook.jpg
You can also specify a compression level for JPEG images.
3.) If you want to convert a batch of photo images, for example all .png files in “Pictures” folder, use try this command instead:
cd ~/Pictures && for file in *.png; do convert $file ${file%.png}.jpg; done
4.) To convert all PNG files into JPEG files with that same filename but a different suffix. However be warned that if existing file with the same name will be over-written.
This tutorial shows how to install Cinelerra video editor in current Ubuntu 22.04 and Ubuntu 24.04.
Cinelerra is a free open-source video editor for Linux. It supports advanced composition operations such as keying and mattes, and many other professional functions depending on the variant.
Cinelerra has a few variants, including GG, CV, HV. The GG variant, which supports up to 8K video, and can also create DVDs and Blu-rays, is presently under active development and the only one that works in my case in current Ubuntu releases.
Download & Install Cinelerra GG
The GG edition now provides the official binary package for AppImage package.
1. Ubuntu does not support AppImage out-of-the-box since 22.04. To enable it, press Ctrl+Alt+T on keyboard to open terminal, then run command:
sudo apt install libfuse2
2. Then, select download the latest version of the AppImage from its website:
Scroll down in that page and click download the latest package. At the moment of writing, it’s “CinGG-20240229-x86_64.AppImage” (for modern Intel/AMD CPUs).
3. After downloaded the package, right-click on it in file manager, then click go to its “Properties” dialog.
Next, navigate to Permissions tab and click enable “Allow executing file as program”. Finally, click Run the AppImage file to launch the video editor:
4. Create an App icon for Cinelerra.
If you want to launch the video editor from start menu or Gnome ‘Show Apps’ screen just like other normal apps. Then, click launch text editor first.
When text editor opens, create a new empty file (if it does not open a new one), then write following lines into it:
IMPORTANT: In the lines above, you need to replace the value for “Exec”! In my case, I moved the AppImage file into my custom “Apps” folder in user home. So, it’s “/home/username/Apps/file-name.AppImage”. You have to change it to yours!
And for icon, you need to download one from web. Either .png or .svg file. Re-name to Cinelerra.png (or Cinelerra.svg depends on image type), and put it to “.local/share/icons” directory.
When done editing the text file, click “save” (or save as), then select save the file to .local/share/applications directory, whatever name as you want with “.desktop” extension.
If everything’s done properly, you’re able to search for and launch the video editor from menu a few moments later.
Uninstall Cinelerra GG
To uninstall the video editor, just delete the .AppImage file from your file manager. Then, also remove the .desktop file from ‘.local/share/applications’ directory, as well as the icon file from ‘.local/share/icons’.
Already installed LAMP or LEMP (Nginx with PHP, Mysql) on your Ubuntu Server? This time I’m going to show you how to install WordPress CMS.
WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It’s free and open-source.
To install WordPress, first login your Ubuntu Server as root, then follow the steps below:
1.) Create Mysql Database and User for WordPress.
First log into Mysql as root user:
mysql -u root -p
Type in the root password to get past.
Create a database. Change database-name in code to whatever you want.
CREATE DATABASE database-name;
Create an user. Change database-user in code to whatever you want.
CREATE USER database-user@localhost;
Give a password to the user just created. Change password-here in code.
SET PASSWORD FOR database-user@localhost= PASSWORD("password-here");
Grant all privileges to the new user.
GRANT ALL PRIVILEGES ON database-name.* TO database-user@localhost IDENTIFIED BY 'password-here';
f.) Finally, refresh Mysql:
FLUSH PRIVILEGES;
g.) Exit Mysql sell
exit
2.) Download WordPress and setup the configuration.
Download the latest wordpress:
wget http://wordpress.org/latest.tar.gz
Then extract:
tar -xzvf latest.tar.gz
Copy the sample configuration file to make a backup.
cd wordpress && cp wp-config-sample.php wp-config.php
Edit the configuration file:
vi wp-config.php
Press I to start editing, Esc to stop editing. Press :, then type wq to save and exit, type q! to exit without save.
Then change the section of database-name, database-user, password-here.
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database-name’);
/** MySQL database username */
define(‘DB_USER’, ‘database-user’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password-here’);
3.) Setup the permissions.
Give ownership of the directory to the apache or nginx user by running following commands one by one:
sudo rsync -avP ~/wordpress/ /var/www/
cd /var/www/
sudo chown www-data:www-data * -R
sudo usermod -a -G www-data username
4.) Finally in your browser go to IP or domain/wp-admin/install.php and start installing.
This simple and brief tutorial is going to show you how to create a bootable Ubuntu live USB. Other than Ubuntu CD, Live USB may be a good choice for installing Ubuntu on your computer.
For Ubuntu, you can install Unetbootin directly from Ubuntu Software Center
To get started:
First insert your USB disk, then launch Unetbootin executable. Check “Diskimage” and choose the Ubuntu iso file. You USB drive should be selected automatically.
Most Linux remembers the commands that you ran in terminal or command console. It’s useful for finding out what you’ve done to the system, especially for server.
For frequently used command with a long code, you don’t need to type all the code again and again. You can re-run then using history commands option, by just a few key presses.
List history commands
To find out what commands you’ve run in your Linux, simply run command:
history
In the output, you’ll see a large list of commands that you ran before. And, each command has number at its beginning.
If you have too much history commands, it may be hard to browse and find out a certain command. In the case, add grep option to filter. For example, run command below to find out history commands that include apt install.
history | grep "apt install"
For choice, you may also add -E option after grep to filter with regular expressions.
Re-Run a History Command
Once you got the history command, that’s too long or you don’t remember, you can simply re-run it by typing !number, where number is the number in front of that command in history output.
For example, run command below will re-run sudo apt install gimp, according to last screenshot. And, in terminal window it outputs what’s going to run immediately after you hitting Enter. If it’s a sudo command, it will also ask for password authentication.
!1057
To avoid careless mistakes, you may use the command below instead by adding :p in end to first preview that history command:
!1057:p
Then re-run !1057 if you confirm it is indeed the command you want.
For the last command, without finding out the history number, just use command below will re-run it:
!!
And, you can use it along with other commands. For example, re-run last command with sudo permission:
sudo !!
Or re-run last command, then poweroff:
!! && poweroff
There are also more choices, for example, re-run the last command start with given string:
!sudo
The command will re-run the last command start with sudo.
And, all the commands above can follow with :p to preview command before running.