Press enter to see results or esc to cancel.

11 Ubuntu Questions Beginners Often Ask

As a Ubuntu user, I often get questions about Ubuntu from beginners. Those questions are primarily about commands, features, and other tips and tricks. In this blog post, I collected a couple of those questions and provided answers.

How to clone a disk on Ubuntu?

Use a native Linux disk cloning tool called dd. You’ll find dd built into most Linux operating systems – if not, install it from the package manager. To clone your computer’s hard disk, use the command:
dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync

Let’s break this command down for clarity:
sdX is the source disk
– sdY is the destination
– bs is the block size command
– 64K corresponds to bs

How to clone a partition of your Linux disk drive?

If you only want to clone a partition of your Linux disk drive, use the following command:
dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync
As you can see, partition sda1 (partition 1 on device sda) will be cloned to sdb1, a newly created partition 1 on device sdb. This might be a secondary or external disk drive attached to your computer.

What’s the shortcut to opening a terminal in Ubuntu?

Ctrl+Alt+T is the shortcut to open a terminal in Ubuntu.

Open VPN on Ubuntu?

Using the OpenVPN tool from the command line, you can start a VPN client on Ubuntu. Type openvpn -v to check if you have OpenVPN installed on your machine. If not, do the following:
sudo apt update
sudo apt install openvpn

To set up and configure the VPN server, check this article from DigitalOcean.

How to create a permanent Bash alias?

1. Edit the ~/.bash_aliases or ~/.bashrc (recommended) file using a text editor:
nano ~/.bashrc

2. At the bottom, add your alias:
alias update='sudo yum update'
Save and close the file.
3. Activate the alias by typing the following command:
source ~/.bashrc

How to create a symlink on Ubuntu?

Open a terminal and use the following command:
ln -s [Source_File_Path] [Symbolic_Link_Path]
Let’s replace placeholders with an example:
ln -s /home/faruk/Download  /home/faruk/Desktop

How to copy in the Ubuntu terminal?

We all know shortcuts for copying and pasting (CTRL+C / CTRL+V). In the Ubuntu terminal, everything is the same, but you have to press Shift in addition to CTRL.

How to convert MOV to mp4 on Ubuntu?

Open a terminal and navigate to the folder where your MOV file sits. There, type the following command:
ffmpeg -i -vcodec h264 -acodec mp2 new_converted_file.mp4
Don’t forget to replace file names before running the command. That’s it.

How to check your internet network speed on Ubuntu?

The easiest way is to use speedtest-cli tool.
1. Install the tool: sudo apt install speedtest-cli
2. Run command: speedtest-cli
That’s it. Additionally, you can save test results into a text file:
3. Save results to file: speedtest-cli > ~/my-internet-speed.txt

How to check system specs on Ubuntu using the Command line?

Let’s use a tool called lshw.
1. Install the tool: sudo apt-get install lshw
2. Run the command and save specs to an HTML file: sudo lshw -html > ~/mySpecs.html

Fix WordPress File Permissions On Ubuntu

Fix WordPress file permissions with the following commands:
1. Change ownership of all files and folders to your user account and user group:
sudo chown -R <username>:<username> *
2. Change ownership of all files and folders in a wp-content folder to www-data user and group. www-data is the default Apache user and group:
sudo chown www-data:www-data -R wp-content/
3. Set all directories permissions to 755:
find . -type d -exec chmod 755 {} \;
4. Set all file permissions to 644:
find . -type f -exec chmod 644 {} \;

For a more detailed explanation, check Fix WordPress File Permissions On Ubuntu blog post.