• Ubuntu 18.04
Contact Us Write For Us Twitter
Linux Tutorials - Learn Linux Configuration
  • Home
  • Linux Tutorials
  • Linux Distros
      • Back
      • Ubuntu
      • CentOS
      • Debian
      • Fedora
      • Redhat
  • System Administration
  • Programming & Scripting
  • Linux Commands

Sideload Apps From Ubuntu To Your Android Device

Details
Nick Congleton

Objective

Sideload an Android app from Ubuntu to a mobile device.

Distributions

This guide is tailored to Ubuntu, but the same principles will work on any distribution.

Requirements

A working Ubuntu install with root privileges and an Android device.

Difficulty

Easy

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

Installing an app on Android isn't always as simple as downloading it from the Play Store. In a lot of cases, especially development, the Play Store isn't an option, and you need another way to push apps to an Android device.

Read more ...

How to Run A VPN Client Automatically As A Service

Details
Nick Congleton

Objective

Connect to a VPN automatically on booth with a service.

Distributions

This will work on almost any Linux distribution.

Requirements

A working Linux install with root privileges and a VPN subscription.

Difficulty

Easy

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

VPNs are great. They protect people from all sorts of threats and snooping online. Sometimes, they can be a real pain to set up, or the set up procedure doesn't exactly fit the way you use your computer. That's why it's a great solution to run a VPN connection as a service at startup. You don't need to remember to turn it on, and it will keep running even if you don't have a desktop environment up. Plus, it will usually run before your desktop and any of your other connections, helping to keep your data from leaking.

Read more ...

How to Play Audio With VLC In Python

Details
Nick Congleton

Objective

Play audio with VLC in Python.

Distributions

This will work on any Linux distribution

Requirements

A working Linux install with Python and VLC.

Difficulty

Easy

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

There are plenty of ways to play audio files with Python. It really depends on your application, but the easiest way, by far, is to use the bindings for VLC to control VLC with Python, and play your files.

With VLC, you don't need to worry about codecs and file support. It also doesn't require too many complicated methods, and/or objects. So, for simple audio playback, VLC is best.

Read more ...

How to Encrypt and Decrypt Individual Files With GPG

Details
Nick Congleton

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.

Difficulty

Easy

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

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

Install GPG

GPG is a widely used piece of software. You can find it in nearly every distribution's repositories. If you don't have it already, install it on your computer.

Debian/Ubuntu

$ sudo apt install gnupg

Fedora

# dnf install gnupg2

Arch

# pacman -S gnupg

Gentoo

# emerge --ask app-crypt/gnupg

Create a Key

You need a key pair to be able to encrypt and decrypt files. If you already have a key pair that you generated for SSH, you can actually use those here. If not, GPG includes a utility to generate them.
$ gpg --full-generate-key
GPG has a command line procedure that walks you through the creation of your key. There is a much more simplified one, but it doesn't let you set key types, sizes or expiration, so it really isn't the best.

The first thing GPG will ask for is the type of key. Use the default, if there isn't anything specific that you need.

The next thing that you'll need to set is the key size. 4096 is probably best.

After that, you can set an expiration date. Set it to 0 if you want the key to be permanent.

Then, it will ask you for your name.

Finally, it asks for your email address.

You can add a comment if you need to too.

When it has everything, GPG will ask you to verify the information.

GPG will ask if you want a password for your key. This is optional, but adds a degree of protection. As it's doing that, GPG will collect entropy from your actions to increase the strength of your key. When it's done, GPG will print out the information pertaining to the key you just created.

Basic Encryption

Now that you have your key, encrypting files is very easy. Create a blank text file in your /tmp directory to practice with.
$ touch /tmp/test.txt
Try encrypting it with GPG. The -e flag tells GPG that you'll be encrypting a file, and the -r flag specifies a recipient.
$ gpg -e -r "Your Name" /tmp/test.txt
GPG needs to know who is going to be opening the file and who sent it. Since this file is for you, there's no need to specify a sender, and you are the recipient.

Basic Decryption

You have an encrypted file. Try decrypting it. You don't need to specify any keys. That information is encoded with the file. GPG will try the keys that it has to decrypt it.
$ gpg -d /tmp/test.txt.gpg

Sending A File

Say you do need to send the file. You need to have the recipient's public key. How you get that from them is up to you. You can ask them to send it to you, or it may be publicly available on a keyserver.

Once you have it, import the key into GPG.
$ gpg --import yourfriends.key
That key will have their name and email in it, just like the one you made. Remember that in order for them to be able to decrypt your file, they need your public key too. Export it, and send it to them.
gpg --export -a "Your Name" > your.key
You're ready to encrypt your file for sending. It's more-or-less the same as before, you just need to specify that you're the one sending it.
$ gpg -e -u "Your Name" -r "Their Name" /tmp/test.txt

Closing Thoughts

That's mostly it. There are some more advanced options available, but you won't need them ninety-nine percent of the time. GPG is that easy to use. You can also use the key pair that you created to send and receive encrypted email in much the same way as this, though most email clients automate the process once they have the keys.

How to Use JSON API Data In Python

Details
Nick Congleton

Objective

Consume a JSON API in Python.

Distributions

This will work on any Linux distribution.

Requirements

A working Linux install with Python.

Difficulty

Easy

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

One of the main reasons that you'd like to work with JSON in Python is consuming APIs. There are hundreds of excellent public APIs out there and ready to use in your application. Even huge players on the web, like Facebook and Twitter, out out APIs for you to work with.

You can build entire applications around API data, including building web applications that aggregate, manipulate, and display that data in a convenient way.

Read more ...

Page 8 of 212

  • Start
  • «
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • »
  • End


Support Us

Bitcoin (BTC) Address:
1PyYJEVtxkokkYtLkRw9BA7Fr4xEAXJn3U

Linux Config Support


Litecoin (LTC) Address:
LXvDNUcdKuh3Svge358rNanXfXMKcPkxCo

Linux Config Support

Thank You
  • Top 10 Best Gnome desktop extensions for Ubuntu 18.04 Bionic Beaver Linux

Write For Us

LinuxConfig is looking for a technical writer(s) geared towards GNU/Linux and FLOSS technologies. Your articles will feature various GNU/Linux configuration tutorials and FLOSS technologies used in combination with GNU/Linux operating system.

When writing your articles you will be expected to be able to keep up with a technological advancement regarding the above mentioned technical area of expertise. You will work independently and be able to produce at minimum 2 technical articles a month.

Read More...

Featured Linux Tutorials

  • Bash scripting Tutorial
  • Howto mount USB drive in Linux
  • How to install Skype on Ubuntu 16.04 Xenial Xerus Linux 64-bit
  • How to check CentOS version
  • How to install Steam on Ubuntu 16.04 Xenial Xerus
  • Check what Debian version you are running on your Linux system
  • How to stop/start and disable/enable Firewall on Redhat 7 Linux system
  • How to setup and use FTP Server in Ubuntu Linux
  • How to mount partition with ntfs file system and read write access
  • How to install the latest Nvidia drivers on Ubuntu 16.04 Xenial Xerus
  • How To Upgrade From 16.04 and 17.10 To Ubuntu 18.04 LTS Bionic Beaver
  • How to install Ubuntu 18.04 Bionic Beaver

About

LinuxConfig.org team is determined to provide you with simple to follow Linux tutorials, various tips, tricks and programming guides as well as with GNU/Linux system administration tutorials in general to help you to learn Linux faster and use it with ease.

Any comments, constructive feedback or your involvement is welcome.

Contact:
web ( at ) linuxconfig ( dot ) org
© 2007 - 2018 LinuxConfig.org
Twitter