Arquivo da tag: ubuntu 18.04

adicionar monitor de cpu e memória no painel superior do Ubuntu 18.04


The system monitor extension features:

  • Display informations for CPU, GPU, Memory, Swap, Net, Disk, Fan, Battery
  • Display resource usage in panel via digit or graph
  • A drop-down menu with detailed information.
  • Ability to set gragh width, background color, refresh time.
  • Show tooltips.

1. To install the extension, first open terminal either via Ctrl+Alt+T keyboard shortcut or by searching for ‘terminal’ from application menu.

When it opens, run command to install the necessary system libraries:

sudo apt-get install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0  gir1.2-clutter-1.0

Type user password (no asterisk feedback due to security reason) when it prompts and hit Enter.

2. Open Ubuntu Software and then search for ‘system monitor extension’.

There are a few similar extensions available. In the case, I installed the last one.

3. You’ll see the indicator applet once you installed the extension. Click to show drop-down menu, then go to Preferences and change the applet appearance.


Instalando PostgreSQL e phpPgAdmin no Ubuntu 18.04

dica do site:

PostgreSQL or Postgres is a powerful high-performance object-relational database management system (ORDBMS) released under a flexible BSD-style license. PostgreSQL is well suited for large databases and has many advanced features.

PostgreSQL is available for many operating systems including Linux, FreeBSD, Solaris, and Microsoft Windows. PhpPgAdmin is a PHP-based web application for managing PostgreSQL databases. With Phppgadmin, it is easy to create a database, create a role and create tables in Postgres.

This tutorial will show the installation of PostgreSQL and its web-based administration interface phpPgAdmin on Ubuntu 18.04 LTS (Bionic Beaver). I will use the Ubuntu minimal server as a basis for this setup.


  • Ubuntu 18.04
  • Root privileges

What we will do?

  1. Install PostgreSQL and phpPgAdmin
  2. Configure Postgres User
  3. Configure Apache2
  4. Configure phpPgAdmin
  5. Testing

Step 1 – Install PostgreSQL, phpPgAdmin and All Dependencies

Before installing any packages on the Ubuntu system, update all available repositories.

sudo apt update

And now we’re ready for installing PostgreSQL, phpPgAdmin, and Apache2 packages.

PostgreSQL and PhpPgAdmin are available in the Ubuntu repository. So you just need to install them with the apt command.

sudo apt -y install postgresql postgresql-contrib phppgadmin

The above command will automatically install all packages needed by PostgreSQL and phpPgAdmin, like Apache2, PHP etc.

Step 2 – Configure Postgres User

PostgreSQL uses role for user authentication and authorization, it just like Unix-Style permissions. By default, PostgreSQL creates a new user called “postgres” for basic authentication. To use PostgreSQL, you need to login to the “postgres” account, you can do that by typing:

su - postgres

Now you can access the PostgreSQL prompt with the command:


And then change the password for postgres role by typing:

\password postgres

Then enter \q to leave the psql command line.


Run the command “exit” to leave the postgres user and become root again.


Set a PostgreSQL password

Step 3 – Configure Apache Web Server

You need to configure Apache virtual host configuration for phpPgAdmin.

Goto the ‘/etc/apache2/conf-available’ directory and edit the configuration file ‘phppgadmin.conf’ with vim by typing:

cd /etc/apache2/conf-available/
vim phppgadmin.conf

Comment out the line ‘#Require local’ by adding a # in front of the line and add below the line allow from all so that you can access from your browser.

Require all granted

Save and exit.

Configure Apache Web server

Step 4 – Configure phpPgAdmin

Go to the ‘/etc/phppgadmin’ directory and edit the configuration file ‘’ by typing :

cd /etc/phppgadmin/

Find the line ‘$conf[‘extra_login_security’] = true;’ and change the value to ‘false’ so you can login to phpPgAdmin with user postgres.

$conf['extra_login_security'] = false;

Save and exit.

Configure phpPgAdmin

Now restart the PostgreSQL and Apache2 services.

systemctl restart postgresql
systemctl restart apache2

Step 5 – Testing Postgres

By default, PostgreSQL is running on port ‘5432’, and the Apache2 running on the default HTTP port ’80’.

Check using netstat command.

netstat -plntu

Check postgres network

Now access phpPgAdmin with your browser http://yourip/phppgadmin/.

Login to phpPgAdmin

and then try login to with user ‘postgres’ and your password.

Login with postgres user to phpPgAdmin

After logging in, you will get this phpPgAdmin dashboard interface:

phpPgAdmin dashboard interface

Installation of the PostgreSQL database with phpPgAdmin on Ubuntu 18.04 LTS has been completed successfully.


PostgreSQL is an advanced object-relational database management system (ORDBMS). It is Open Source and has a large and active community. PostgreSQL provides the psql command line program as primary front-end, which can be used to enter SQL queries directly or execute them from a file. phpPgAdmin is a web-based administration tool for PostgreSQL written in PHP that makes the administration of Postgres databases easier.

alterar o hostname do ubuntu

dica retirada do site:

This tutorial will guide you through the process of changing the hostname on an Ubuntu 18.04 system.

The hostname is set at the time when the Ubuntu operating system is installed or if you are spinning up a virtual machine it is dynamically assigned to the instance at startup.

The method described in this guide will work without the need of restarting your system.

Although this tutorial is written for Ubuntu 18.04 the same instructions apply for Ubuntu 16.04 and any Ubuntu-based distribution, including Linux Mint and Elementary OS.

Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.

A hostname is a label that identifies a machine on the network. You shouldn’t use the same hostname on two different machines on a same network.

To view the current hostname, enter the following command:



As you can see in the image above, the current hostname is set to ubuntu1804.localdomain.

The following steps outline how to change the hostname in Ubuntu 18.04.

In Ubuntu 18.04 we can change the system hostname and related settings using the command hostnamectl.

For example, to change the system static hostname to linuxize, you would use the following command:

sudo hostnamectl set-hostname linuxize


The hostnamectl command does not produce output. On success, 0 is returned, a non-zero failure code otherwise.

Open the /etc/hosts file and change the old hostname to the new one.

/etc/hosts   localhost   linuxize

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


If the cloud-init package is installed you also need to edit the cloud.cfg file. This package is usually installed by default in the images provided by the cloud providers such as AWS and it is used to handle the initialization of the cloud instances.

To check if the package is installed run the following ls command:

ls -l /etc/cloud/cloud.cfg


If you see the following output it means that the package is not installed and no further action is required.

ls: cannot access '/etc/cloud/cloud.cfg': No such file or directory


If the package is installed the output will look like the following:

-rw-r--r-- 1 root root 3169 Apr 27 09:30 /etc/cloud/cloud.cfg


In this case you’ll need to open the /etc/cloud/cloud.cfg file:

sudo nano /etc/cloud/cloud.cfg


Search for preserve_hostname and change the value from false to true:

# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: true


Save the file and close your editor.

To verify that the hostname was successfully changed, once again use the hostnamectlcommand:



   Static hostname: linuxize
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 6f17445f53074505a008c9abd8ed64a5
           Boot ID: 1c769ab73b924a188c5caeaf8c72e0f4
    Virtualization: kvm
  Operating System: Ubuntu 18.04 LTS
            Kernel: Linux 4.15.0-22-generic
      Architecture: x86-64


You should see your new server name printed on the console.

In this tutorial, we have shown you how to easily change your Ubuntu server hostname without restarting the machine.

Ubuntu 18.04 compatível com RAID 1

Precisei configurar dois HDs em Raid 1 e instalar o ubuntu 18.04, porém as versões normais do ubuntu server 18.04 não estavam reconhecendo o RAID 1 criado pelo hardware da máquina.

A versão de ubuntu que deu certo o reconhecimento corretamente foi a alternate 18.04.2:

configurar ip manualmente no ubuntu server 18.04



essa dica me ajudou:


So, in my case, I would use the interface designation enp0s25.

Next, edit your netplan file:

sudo nano /etc/netplan/01-netcfg.yaml 

Amend the file to read:

  version: 2
  renderer: networkd
        dhcp4: no
            addresses: []
            addresses: [,]

Of course, susbstitue your exact details here. Spacing, indentation, etc. are crucial. Proofread carefully. Save (Ctrl+o followed by Enter) and close (Ctrl+x) the text editor.


sudo netplan apply
sudo ip link set enp0s25 down
sudo ip link set enp0s25 up

Did you get the requested IP address?

ip addr show

Can you ping?

ping -c3
ping -c3

If you get ping returns, you are all set.

instalar anydesk no ubuntu

anydesk é uma alternativa ao teamviewer


testei no ubuntu 18.04 e funcionou

Install AnyDesk

Anydesk is available in both 64-Bit and 32-Bit formats. You can download it from its official websiteand install on Ubuntu, Debian, and LinuxMint operating systems.

sudo dpkg -i anydesk_4.0.1-1_amd64.deb

If the above commands faced issue for dependency issues, Execute below command to install Anydesk with required dependencies.

sudo apt-get install -f


Ativar/desativar hot corner (cantinho) do Ubuntu 18.04



gsettings set enable-hot-corners true


gsettings set enable-hot-corners false