Select x11vnc port window

How to share your desktop in Linux using x11vnc

Objective

Learning how to share you desktop using the vnc protocol and the x11vnc application

Requirements

  • Having the x11vnc package installed

Conventions

  • # – requires given command to be executed with root privileges either
    directly as a root user or by use of sudo command
  • $ – given command to be executed as a regular non-privileged user

Introduction

While ssh is a vital tool for every system administrator, being it the most used and secure protocol for remote administration, even capable to grant access to the X11 display server, via X11 forwarding, it is not the right tool to use when the desired target is to share an entire desktop session. In that case the vnc protocol is our friend. By using it, we can completely control another machine, sharing even keyboard or mouse events.

Read more

Install OpenCL For The AMDGPU Open Source Drivers On Debian and Ubuntu

Objective

Install the OpenCL portion of the AMDGPU-PRO drivers on Debian and Ubuntu.

Distributions

Debian and Ubuntu

Requirements

A working install of Debian or Ubuntu with root privileges

Conventions

  • # – requires given linux command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux command to be executed as a regular non-privileged user

Introduction

The proprietary AMDGPU-PRO drivers only support a select small subset of Linux distributions. Non-LTS Ubuntu releases aren’t supported, and Debian users are completely out of luck. To make things worse, AMD doesn’t provide OpenCL support through their open source drivers.

There is good news. You can install just the OpenCL parts of the AMDGPU-PRO drivers on your Debian or Ubuntu system using the packages provided by AMD. There’s a very specific way that you need to go about it, but it can be done, making things like mining cryptocurrency on an AMD card possible.

WARNING: This may interfere with your existing drivers, resulting in poor performance and instability. Proceed with caution.

Read more

dd-manpage

How dd command works in Linux with examples

Dd is a very powerful and useful utility available on Unix and Unix-like operating systems. As stated in its manual, its purpose is to convert and copy files. On Unix and Unix-like operating systems like Linux, almost everything is treated as a file, even block devices: this makes dd useful, among the other things, to clone disks or wipe data. The dd utility is available out of the box even in the most minimal installation of all distributions. In this tutorial we will see how to use it and how we can modify its behavior by using some of the most commonly used options to make your Linux system administration job easier.

In this tutorial you will learn:

  • How to use dd
  • How to modify the program behavior by using some of the most commonly used options

Read more

How to Encrypt and Decrypt Individual Files With GPG

Objective

Encrypt individual files with GPG.

Distributions

This will work with any Linux distribution.

Requirements

A working Linux install with GPG installed or root privileges to install it.

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Introduction

Encryption is important. It’s absolutely vital to protecting sensitive information. Your personal files are worth encrypting, and GPG provides the perfect solution.

Read more

Introduction to the Linux kernel log levels

Objective

The objective of this tutorial is to learn about the various linux kernel log levels, how they are organized, and how we can setup what messages should be displayed on the console depending on their severity.

Requirements

  • Root privileges to edit configuration files

Difficulty

EASY

Introduction

The management of Linux kernel log files is one crucial aspect of a machine administration: logs can simply inform us about the state of daemon, or show critical messages or warnings. In this tutorial, we will see the various type of log level used by the linux kernel, how they are organized by severity and how we can filter messages displayed on the console depending on it.

Read more

MySQL workbench dashboard on Ubuntu Linux

Install and Configure MySQL Workbench on Ubuntu Linux

MySQL workbench is a graphical application which let us manage data and perform administrative tasks on MySQL databases. In this tutorial we will see how to install the program on Ubuntu 18.04 (Bionic Beaver) and we will perform a brief tour of some of its most basic functionalities to make your Linux system administration job easier.

In this tutorial you will learn:

  • How to install and configure MySQL workbench
  • How to create a schema and a table via MySQL workbench
  • How to crate an E.R diagram by reverse-engineering an existing schema
  • How to execute SQL queries

Read more

How to monitor file integrity on Linux using Osquery

How to monitor file integrity on Linux using Osquery

The basic concept involved with the use of the osquery application is the “tabular abstraction” of many aspects of the operating system, such as processes, users, etc. The data is stored in tables which can be queried using SQL syntax, directly via the osqueryi shell, or via the osqueryd daemon.

In this tutorial we will see how to install the application, how to run basic queries, and how to use FIM (File Integrity Monitoring) as part of your Linux system administration job.

In this tutorial you will learn:

  • How to install osquery
  • How to list the available tables
  • How to perform queries from the osqueryi shell
  • How to use the osqueryd daemon to monitor file integrity

Read more

Firefox's about page displaying the version number

Play Netflix on Linux with Firefox

Introduction

Netflix and Linux have a somewhat troubled past. For years, Netflix actively blocked Linux users. More recently, support for Google Chrome was added. Firefox users, however, have been out of luck until just recently. As of Firefox 49, the option of using Google’s DRM from the Chrome browser to play DRM content has been made optionally available to Firefox users. This has made it possible to watch Netflix, and potentially other DRM streaming services, using Firefox and without installing Google Chrome. What’s better, the DRM can be turned off when you’re done watching.

Read more

Start Phoronix Test Suite

Benchmark Your Graphics Card On Linux

Objective

Install Phoronix Test Suite and benchmark your system’s graphical performance using the Unigine benchmarks and Steam games.

Distributions

This guide targets Debian, Ubuntu, Fedora, OpenSUSE, and Arch Linux.

Requirements

A working install of one of the supported distributions with root privileges and the latest graphics drivers installed.

Conventions

  • # – requires given linux command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux command to be executed as a regular non-privileged user

Read more

openssh-logo

Most common custom SSH Configurations of the OpenSSH Server

The Openssh set of utilities let us create secure, encrypted connections between machines. In this tutorial we will take a look at some of the most useful options we can use to change the behavior of sshd, the Openssh daemon in order to make your Linux system administration job easier.

In this article we assume the existence of an already running and accessible server. If you want to know more about Openssh installation, you can take a look at this article on how to install SSH server on Ubuntu Linux.

In this tutorial you will learn:

  • How to customize the behavior of the sshd daemon by manipulating options in the main ssh config file /etc/ssh/sshd_config
  • How to change the default port(s) used by the server
  • How to change the address the server listens to
  • How to change the maximum SSH login time
  • How to allow or deny login as root
  • How to change the max login attempts and maximum number of session opened
  • How to display a message when user tries to authenticate to the server
  • How to Enable/Disable password and pubkey authentication
  • How to Enable/Disable HostBasedAuthentication
  • Enabling/Disabling X11 Forwarding

Read more

How to restrict access to a resource using Apache on Linux

How to restrict access to a resource using Apache on Linux

Restricting access to a resource is often required when using the web. On complex web applications, this is often implemented using a login system which can be more or less sophisticated. If our requirements our pretty basic, however, we can use the authentication system provided by the Apache web server. In this tutorial we will see how can we do it.

In this tutorial you will learn:

  • How to restrict access to a web page using the Apache web server
  • How to store the user passwords in plain text files
  • How to store the user passwords in a database
  • How to allow access to multiple users

Read more

How to enable all SysRq functions on Linux

Objective

Learn how to enable the SysRq functions, and how to use invoke them by using command keys.

Requirements

  • Root permissions
  • Linux Kernel compiled with the “CONFIG_MAGIC_SYSRQ” option enabled

Conventions

  • # – requires given linux commands to be executed with root privileges either
    directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Introduction

The SysRq key combination can be used to send commands directly to the Linux kernel in some specific circumstances: the kernel will respond to commands sent with command keys immediately, unless it is completely locked. Various command keys achieve specific tasks, and they can be combined to restore the system to a safe state, or to obtain a clean reboot when nothing else works: this is what we can obtain with the reisub sequence.

In this tutorial we will see how to enable all SysRq functions using a standard installation of Ubuntu 18.04 - Bionic Beaver as a base.

Read more