Monday, 8 October 2018

Mounting your Google Drive as a file system on OpenSUSE Linux (42.3)


Mounting your Google Drive as a file system on OpenSUSE Linux (42.3)

I know I've talked about this in the past and some of you have been using it for a long time as well, but I never really felt like it was the best solution. I kept hoping something better would come along, or Google themselves would stop being dicks and release a proper, official Google Drive Client for Linux. Alas neither has happened and the OCAML solution isn't that bad actually. So here it is.
If you're not using OpenSUSE, oh well, you'll have to figure out the install part for yourself, but the setting up and running should be similar.

For OpenSUSE 42.3 users, just do as follows, for users of other OpenSUSE releases, you can go to the repo link in your browser, hit up (parent dir) and move into the folder for your version and copy the repo link and substitute that into the following.

Step 1 - Open a root shell
Step 2 - type
zypper ar https://download.opensuse.org/repositories/home:/inescid:/grid/openSUSE_Leap_42.3/home:inescid:grid.repo
Step 3 - type
zypper in google-drive-ocamlfuse
Answer "a" when asked about trusting the repo.
Step 4 - leave root shell, go to regular user shell
Step 5 - Make a directory to mount your Google Drive on, eg.
mkdir ~/G-Drive
Step 6 - Run the application
google-drive-ocamlfuse
Step 7 - Authorize the application
step 6 should have caused a browser window to pop up and taken you to your Google Login page. Login, pick your google account with the G-Drive you want to mount, and follow the directions to allow the ocaml client to access your G-Drive.
Step 8 - Be patient.
Wait until the following message appears in the terminal window under the command you typed in step 6.
"Access token retrieved correctly."
Step 9 - Mount your G Drive by typing
google-drive-ocamlfuse ~/G-Drive
Step 10 - Test / Enjoy
Either type ls ~/G-Drive or open it in your file manager

Monday, 24 September 2018

Linux from the command line | Linux for sysadmins -- analyzing net traffic with TCPflow

Linux from the command line | Linux for sysadmins -- analyzing net traffic with TCPflow

FTA:
TCPflow is a free, open source, powerful command line based tool for analyzing network traffic on Unix-like systems such as Linux. It captures data received or transferred over TCP connections, and stores it in a file for later analysis, in a useful format that allows for protocol analysis and debugging...
https://www.tecmint.com/tcpflow-analyze-debug-network-traffic-in-linux/

Tuesday, 18 September 2018

Linux from the command line | Linux tips & tricks - powerful document conversion with Pandoc

Linux from the command line | Linux tips & tricks - powerful document conversion with Pandoc

We've all been there. You like application A, but some place you deal with, IE Work, school, etc., only accepts documents in application B's format.

Document conversion to the rescue.
https://opensource.com/article/18/9/intro-pandoc

Sunday, 22 July 2018

Manage your torrents with Linux and Deluge

Manage your torrents with Linux and Deluge

Who want's to leave their desktop PC logged in and running all day for a Torrent? What if you want to play a game or need to reboot?
Solution: Setup a Deluge server and let it deal with these things.
https://linuxconfig.org/set-up-a-headless-deluge-server-on-linux

Saturday, 21 July 2018

Linux tips & tricks -- monitoring hard drive temperature with hddtemp

Linux tips & tricks -- monitoring hard drive temperature with hddtemp
https://www.cyberciti.biz/tips/howto-monitor-hard-drive-temperature.html

Linux from the command line -- Take control of your files with chattr

Linux from the command line -- Take control of your files with chattr

File attributes are one of the more powerful features of Unix like operating systems like Linux. Learning to use them is an important skill.
https://www.howtoforge.com/linux-chattr-command/

Saturday, 7 July 2018

Linux from the command line | Learning Linux -- The basename command

Linux from the command line | Learning Linux -- The basename command

FTA:
Sometimes, while working on the command line (especially when dealing with shell scripts), you might be interested in only the filename, but what's available to you is the complete path of the file. So, the requirement is to strip the directory component of the path. You'll be glad to know there exists a command - basename - that does this job.
https://www.howtoforge.com/linux-basename-command/

Linux from the command line -- Learning VIM by playing games

Linux from the command line -- Learning VIM by playing games

You're not a real sysadmin until you've mastered Vim of course ;')
But it doesn't have to be painful. Learn by playing a game.
https://www.tecmint.com/learn-vi-commands-with-pacvim-game/#

Learning Linux -- Using dd to copy drives and partitions without destroying your data

Learning Linux -- Using dd to copy drives and partitions without destroying your data
https://opensource.com/article/18/7/how-use-dd-linux

Tuesday, 26 June 2018

Linux from the command line | Linux for sysadmins -- Automating with SSH

Linux from the command line | Linux for sysadmins -- Automating with SSH

It's more than just a remote terminal tool, ssh has a lot of other powerful features for Linux users and sysadmins.

Once you get things in this article worked out, look up and play with ssh -Y

https://www.linuxjournal.com/content/easy-ssh-automation

Linux from the command line -- Checking disk space

Linux from the command line -- Checking disk space

One note here, with df you'll probably want to use "df -h" and not "df -H" as the latter will use the stupid damned si units nonsense where 1k=1000 bytes instead of a proper 1024.
Other than that, carry on.
https://www.linux.com/learn/intro-to-linux/2018/6how-check-disk-space-linux-command-line

Friday, 22 June 2018

Linux for sysadmins -- Removing Docker images, containers, and volumes

Linux for sysadmins -- Removing Docker images, containers, and volumes

So you're done with that Docker container. It served you well, but you don't need it any more. Now what?
https://www.tecmint.com/remove-docker-images-containers-and-volumes/#

Linux from the command line -- using the netstat command

Linux from the command line -- using the netstat command

What's going on with your Linux box's network?
https://www.howtoforge.com/linux-netstat-command/

Wednesday, 20 June 2018

Linux for sysadmins -- checking user groups

Linux for sysadmins -- checking user groups

The Linux user and group systems allow powerful, fine-grained access control to system applications, files, and resources. It's important to know how to list and manage user and group membership.

As an example, to use VirtualBox on Linux, users must be a member of the vboxusers group.
Other applications require a user to be a member of the group dialout.
https://www.2daygeek.com/how-to-check-which-groups-a-user-belongs-to-on-linux/#

Linux from the command line -- manipulating text file formatting with expand and unexpand

Linux from the command line -- manipulating text file formatting with expand and unexpand


The link is for the expand command. Find info on it's counterpart, unexpand, at this link: https://www.howtoforge.com/linux-unexpand-command/
https://www.howtoforge.com/linux-expand-command/

Linux for sysadmins -- Processes and process management for Linux

Linux for sysadmins -- Processes and process management for Linux
https://www.tecmint.com/linux-process-management/

Linux tips & tricks -- Managing multiple monitors with umonitor

Linux tips & tricks -- Managing multiple monitors with umonitor

The umonitor app basically lets you backup and restore multiple display configurations. An ability which you can use to switch between multiple monitors easily.
https://linoxide.com/linux-how-to/umonitor-update-positions-resolutions-monitors/

Linux for sysadmins -- Backing up and restoring MySQL databases with Mysqldump

Linux for sysadmins -- Backing up and restoring MySQL databases with Mysqldump

Backups are for more than just file systems, your databases need to be backed up too..

Monday, 18 June 2018

Linux from the command line -- Setting up Passwordless SSH Logins

Linux from the command line -- Setting up Passwordless SSH Logins

This is an important thing to know how to do and it makes your life much easier too. Once you learn this, you can expand this technique to use with less PC like devices. For example the ConnectBot app for your phone.

Learning Linux | Linux from the command line -- Useful Linux shortcuts

Learning Linux | Linux from the command line -- Useful Linux shortcuts

Here is a collection of everyday shortcuts that usually take a new user a long time to pick up the hard way.
https://linuxtechlab.com/informative-guide-to-useful-linux-shortcuts/

Linux from the command line -- Renaming multiple files at once

Linux from the command line -- Renaming multiple files at once

OK Grasshopper, time to learn a little basic command line kung-fu. By combining some simple commands along with some regular expression magic, you can perform some pretty complex operations quickly and easily.
https://www.ostechnix.com/how-to-rename-multiple-files-at-once-in-linux/

Sunday, 17 June 2018

Display Calibration in Linux


Display Calibration in Linux

So yesterday I scored a new in box ColorVision Spyder2 at a garage sale for TWO BUCKS!!
I don't do any kind of for profit photo editing or anything, but I've always wanted a colorimeter to calibrate my displays and $2 is hard to pass up.
Basically a colorimeter is a device to measure the colour response of your display device. In concert with the appropriate software, you can then create a colour profile for the display. This allows your computer's colour management software to adjust what it outputs based on that colour curve in order to compensate for any deficiencies in your display and force it's output to be as accurate as possible. Why? Well, at a minimum so that what you see on the screen most closely matches the original image, but also so that when combined with a properly calibrated printer, what you print looks the same as what you see on the screen.

This device, being a little bit older model, doesn't work well with Windows 10. At least with the official, included software, but I don't care about that for several reasons. Not the least of which being I don't use Windows 10 at home. A bigger reason is that I found third party software that works on Windows, Linux, and Mac and so I used that instead.

The DisplayCal software creates calibration profiles in concert with, and for use by, the ArgyllCMS colour managament system.
You'll need to install both on your computer first.
I tested this all on my ThinkPad running OpenSUSE Linux LEAP 42.3.
This software isn't beginner level and a good RTFM is probably in order. However I managed to get it started on a profile run in a few minutes. The profile creation itself took a couple of hours and the results are impressive. ThinkPads are not content creation devices so they don't come with colour calibrated screens or high colour range screens. Despite that, once calibrated, the photo image quality is amazing. At least compared to stock.
I plan to run it on all my devices soon.

Meanwhile, if you get an opportunity to grab a good deal on a DisplayCal supported colorimeter, go for it.

https://displaycal.net/

Friday, 15 June 2018

Wednesday, 13 June 2018

Linux for sysadmins -- Getting started building a firewall with iptables

Linux for sysadmins -- Getting started building a firewall with iptables

Linux has firewall capabilities built in and the iptables tools are what you use to configure them.
https://www.rosehosting.com/blog/common-firewall-rules-and-commands-in-iptables/

Linux for sysadmins | Linux from the command line -- What version of Linux am I running?

Linux for sysadmins | Linux from the command line -- What version of Linux am I running?

This may sound like a ridiculous task, finding out what version and distro of Linux you're using, I mean you're sitting in front of it and you installed it!
Yes, it may be silly for home users, but for sysadmins and IT consultants, it's a common question. When you remote into a customer's system you may get no signs as to what type and version of system it is and you'll need to know that before you can diagnose and repair it effectively.
https://opensource.com/article/18/6/linux-version

Linux for sysadmins | Linux from the command line -- basic storage partitioning with parted

Linux for sysadmins | Linux from the command line -- basic storage partitioning with parted

These days parted is the defacto basic command line tool for examining, creating, and editing partitions on storage media. It's well worth learning.
Keep in mind though that these days most Linux distros have their own partitioning tool, at least for use during the installation process, if not from the administration interface.
https://opensource.com/article/18/6/how-partition-disk-linux

Linux from the command line -- the first network diagnostic command everyone ever learns -- ping

Linux from the command line -- the first network diagnostic command everyone ever learns -- ping

Of course everyone knows ping and how to operate it in it's default mode, but too many people don't learn it's other capabilities. ping is a powerful network diagnostic tool in it's own right and can be used in a lot of creative ways.
I used to use it with the -c option back in the dial-up days in order to cause the auto-connect system to dial up to our ISP and wait for it to show replies before continuing with cron jobs that required Internet access (eg time sync, system updates, etc.)
https://www.howtoforge.com/linux-ping-command/

Tuesday, 12 June 2018

Linux from the command line -- Using screen

Linux from the command line -- Using screen

I've posted on the screen command several times before, but it's a good tool and since everyone learns differently, it's good to have different sources of reference so here's another one.

Linux from the command line -- Comparing files and directories with diff

Linux from the command line -- Comparing files and directories with diff

Did all those files copy? Are these the same version of that document?
Find out that and more with diff.
https://www.networkworld.com/article/3279724/linux/comparing-files-and-directories-with-diff-and-comm.html

Linux for sysadmins -- Setting up Puppet on CentOS 7

Linux for sysadmins -- Setting up Puppet on CentOS 7

When you step up to the Enterprise level as a Linux sysadmin, you'll need to learn, install, configure, and use an administration system. A real one. That category has two sub-categories. Open Source tools, and commercial tools.
Both are worth learning.
https://www.howtoforge.com/tutorial/centos-puppet-master-and-agent/

Linux from the command line | Linux for sysadmins --- quick and easy e-book reading from the command line with...

Linux from the command line | Linux for sysadmins --- quick and easy e-book reading from the command line with Uniread

Before you discount the idea of command line ebook reading, imagine storing all your server software, hardware, and applications manuals on the server, ready to read from anywhere.
https://www.linuxuprising.com/2018/06/read-ebooks-quicker-with-this-spritz.html

Friday, 8 June 2018

Linux for sysadmins | Linux from the command line -- Who has that package for your Linux distro?

Linux for sysadmins | Linux from the command line -- Who has that package for your Linux distro?

whohas will find sources that carry a particular package. Remember though to always check your official distros first.
https://www.ostechnix.com/find-if-a-package-is-available-for-your-linux-distribution/

Thursday, 7 June 2018

Linux for sysadmins -- Monitoring Apache Performance on CentOS 7 Using Netdata

Linux for sysadmins -- Monitoring Apache Performance on CentOS 7 Using Netdata

Running a webserver requires close monitoring to make sure you're not ticking off your customers with a slow website.
https://www.tecmint.com/monitor-apache-performance-using-netdata-on-centos/#

Linux for sysadmins -- Creating a Wildfly load-balancing cluster on Linux

Linux for sysadmins -- Creating a Wildfly load-balancing cluster on Linux
https://linuxtechlab.com/creating-wildfly-cluster-linux/

Linux from the command line -- Monitoring Docker

Linux from the command line -- Monitoring Docker

Just what are those containers up to? How much of your resources are they using?
https://kerneltalks.com/virtualization/docker-container-utilization-monitoring/

Linux from the command line | Linux for sysadmins -- modifying RPM packages with rpmrebuild

Linux from the command line | Linux for sysadmins -- modifying RPM packages with rpmrebuild

For those of you not in the Ubuntu cult, RPM packages may be a regular part of your Linux life, but nothing is perfect. What if you finally found an RPM package for that obscure piece of software you can't live without, but it's missing a file? Don't sweat it, fix it yourself.
https://linuxconfig.org/how-to-modify-an-rpm-package-using-rpmrebuild

Linux from the command line -- The sleep command

Linux from the command line -- The sleep command

Sometimes you need your system to wait before doing something, especially in a script. The sleep command is just what the penguin ordered.

There are plenty of uses outside of scripts too. Like when combined with the shutdown command.
https://www.howtoforge.com/linux-sleep-command/

Wednesday, 6 June 2018

Linux for sysadmins | Linux from the command line -- Security auditing with Lynis

Linux for sysadmins | Linux from the command line -- Security auditing with Lynis

Being proactive about security is one of the hallmarks of a good sysadmin. Security auditing and pen testing is part of that. From the early days with a handful of tools like SATAN and Metasploit to now when we have even more and better tools available, there's no excuse for not having a few in your toolbox and using them regularly. It's either that or end up on the news doing the walk of shame after getting fired because your company had a big data breach.
https://www.linuxtechi.com/lynis-security-auditing-tool-linux-servers/

Linux for sysadmins | Linux from the command line -- Testing a package without installing it using Nix

Linux for sysadmins | Linux from the command line -- Testing a package without installing it using Nix

I'm sure everyone can appreciate the ability to test or use some software without having to go through the hassle of installing it, not to mention dealing with the changes, and mess, that can make of your system. Nix lets Linux users avoid all that.

https://www.ostechnix.com/how-to-test-a-package-without-installing-it-in-linux/

Tuesday, 5 June 2018

Linux from the command line -- interactively killing Linux processes with fkill

Linux from the command line -- interactively killing Linux processes with fkill
https://www.tecmint.com/fkill-kill-linux-process-by-name-or-pid/

Linux for sysadmins | Linux from the command line -- Advanced drive usage and partitioning with LVM

Linux for sysadmins | Linux from the command line -- Advanced drive usage and partitioning with LVM

This article gives you the basics for using the powerful LVM tool in conjunction with multiple Linux file-systems. This is the basic command line method for the two basic Linux types, RH and Debian, and it's a good way for you to grasp the concepts. However keep in mind that most systems have other, preferred tools to perform these operations so RTFM for your Distro. OpenSUSE users, for example, should use the "Partitioner" module of the YaST2 administration tool to perform these functions.
https://www.linuxnov.com/create-lvm-partition-with-xfs-ext4-file-systems-on-rhel-and-debian/

Linux from the command line -- Pulling info out of proc with procinfo

Linux from the command line -- Pulling info out of proc with procinfo

Most of the system information you could ever want from your Linux system is ready and waiting for you in the proc folder. Remember, everything is a file in Linux (or at least it was until it was infected with systemd) so you can use simple tools like ls and cat to find and display this info in any way you wish. Throw in grep, sed, awk, and watch and you can create some pretty impressive output of your system's innards. However, for a quick and simple way to get the most commonly used data out, procinfo has you covered.
https://www.tecmint.com/procinfo-shows-proc-system-information/

Saturday, 2 June 2018

Linux from the command line -- Using arrays in Bash

Linux from the command line -- Using arrays in Bash

The command line in Linux is more than just a dumb terminal. It's a powerful tool that you can program. It even includes arrays. Here's an introduction to those arrays.
https://opensource.com/article/18/5/you-dont-know-bash-intro-bash-arrays

Linux for sysadmins -- Installing Webmin on Debian 9

Linux for sysadmins -- Installing Webmin on Debian 9

Webmin is a great admin tool that allows you to do extensive administration tasks on a Linux system remotely using only a web browser. It not only handles basic system administration, but administration of applications and services like web servers, database servers, etc.

https://www.rosehosting.com/blog/how-to-install-webmin-on-debian-9/

Friday, 1 June 2018

Linux for sysadmins | Linux from the command line -- Monitoring servers with Glances

Linux for sysadmins | Linux from the command line -- Monitoring servers with Glances

Being a good sysadmin requires a lot of things, two of which are monitoring in order to spot trends which may indicate impending issues so you can head them off before they do, and diagnosis skills to find problems quickly when they do happen. Good monitoring tools and skills are a major part of achieving those two things.
Luckily Linux has a huge portfolio of monitoring tools available for every kind of task and resource. Glances is one of them.
http://www.linuxbuzz.com/monitor-linux-servers-glances-tool/

Linux from the command line -- Converting multiple media files at once with FFMPEG

Linux from the command line -- Converting multiple media files at once with FFMPEG

This article is a good example of the kinds of things you can do with a little command line knowledge.
https://linuxconfig.org/how-to-use-ffmpeg-to-convert-multiple-media-files-at-once-on-linux

Wednesday, 30 May 2018

Linux for developers | Linux from the command line -- analyzing your source code with Ohcount

Linux for developers | Linux from the command line -- analyzing your source code with Ohcount


https://www.ostechnix.com/ohcount-the-source-code-line-counter-and-analyzer/

Linux from the command line -- finding readable text in non text files with strings

Linux from the command line -- finding readable text in non text files with strings

The strings command is one of those tools that you first look at and think "Why would I ever need to do that?", until the day you need to do it and then you're immensely grateful it exists.
https://www.howtoforge.com/linux-strings-command/

Linux from the command line -- Copying and renaming files on Linux

Linux from the command line -- Copying and renaming files on Linux

Copying and renaming files, seems simple enough right? Well, eventually there will be a file copying or renaming task that your GUI file manager isn't up to, or maybe you're working remotely on one of your servers. Either way you should learn to use the command line tools, they can really make your life easier, and your file management faster.
This article even taught me a new command line tool. "rename", which I'm going to have to put an effort into learning and remembering to use instead of just mv.
https://www.networkworld.com/article/3276349/linux/copying-and-renaming-files-on-linux.html

Linux from the command line -- Running Linux commands simultaneously with GNU Parallel

Linux from the command line -- Running Linux commands simultaneously with GNU Parallel

I know I've covered parallel before, but you can never have too much information. In this age of multi-core computing, being able to take advantage of those cores is a useful skill.
https://www.techrepublic.com/article/how-to-run-commands-simultaneously-with-gnu-parallel/

Linux from the command line | Linux for sysadmins -- Sending mail from the command line

Linux from the command line | Linux for sysadmins -- Sending mail from the command line

I know we all have gotten used to having access to our e-mail everywhere, on every device, so the thought of sending e-mail from the command line may seem archaic and pointless, but quite the opposite. It's a really handy and powerful tool.
A simple example might be that you're a sysadmin working away on one of a dozen remote servers and you need to finish up editing a config file later. You could, right from the command line of that box, send yourself a quick reminder note and include the config file in question.
Or, more often this is a tool that comes in handy in custom scripts and cron tasks. For example, maybe you have a script that checks the status of a few key metrics on your network every week. It would be nice to be able to e-mail yourself the output rather than having to remotely log in and read log files.
Or, maybe you might have your system e-mail you when any of a list of critical issues occur. Eg, CPU temp crosses a threshold. A certain file-system gets more than nn% full.
https://linuxtechlab.com/mail-command-send-mail-from-terminal/

Linux from the command line -- All about Linux file archiving with tar

Linux from the command line -- All about Linux file archiving with tar

The tar command is the primary archive command in Linux (and UNIX). It's powerful, versatile, and all things considered, not that hard to use.
Think of it as WinZip on steroids.

Originally tar was created to manage backing up everything from single files to entire file-systems onto backup tapes on big UNIX systems. That's how tar got it's name, from Tape ARchiver. These days tar is a jack of all trades when it comes to archiving and compressing files. You can easily backup multiple directories or whole file-systems with all of their file attributes intact. You can choose from multiple compression methods, or no compression which is great for non or poorly compressible files like PDF's.
Basically tar is a core Linux skill.
https://linuxtechlab.com/tar-command-compress-decompress-files/

Saturday, 26 May 2018

Linux tips & tricks -- understanding the mess that is Linux Audio

Linux tips & tricks -- understanding the mess that is Linux Audio

Over the years the Linux audio system has become pretty complex, in part to deal with the realities of a networked operating system. Fortunately most Linux distros have come to grips with this complexity and do a good job of detecting and correctly configuring most audio hardware. However, should a problem arise, having some background on the system can help.

See also: http://www.troubleshooters.com/linux/sound/sound_troubleshooting.htm
https://opensource.com/article/17/1/linux-plays-sound

Wednesday, 23 May 2018

Linux from the command line -- 22 essential security commands for Linux

Linux from the command line -- 22 essential security commands for Linux


https://www.networkworld.com/article/3272286/open-source-tools/22-essential-security-commands-for-linux.html

Linux from the command line -- cat's backwards twin, tac

Linux from the command line -- cat's backwards twin, tac

You should have come across the "cat" command by now. A way to view all of a file or pipe output. "tac" is the same only it displays the file backwards. IE last line first, then the second to last line, and so on.
https://www.howtoforge.com/linux-tac-command/

Tuesday, 22 May 2018

Linux vs. Unix: What's the difference?

Linux vs. Unix: What's the difference?

If you are a younger Linux admin, you may have never worked on a Unix system, unlike your older compatriots who cut their teeth on it. Unix is the foster parent of Linux and knowing your Unix and it's history will enrich your Linux experience.
https://opensource.com/article/18/5/differences-between-linux-and-unix

Sunday, 20 May 2018

Linux for sysadmins | Linux from the command line -- Managing MySQL databases and users from the command line

Linux for sysadmins | Linux from the command line -- Managing MySQL databases and users from the command line

Databases are for much more than just Enterprise data storage. They can provide really useful services for all kinds of things, including the operating system and many popular applications and services. At some point in your Linux journey, you will be faced with using one. Don't worry, it's not that hard, there's lots of help out there, and it's cool to be able to do at least the basics for yourself.

Linux from the command line -- Getting to the bottom of things with tail

Linux from the command line -- Getting to the bottom of things with tail

How often have you had some huge file or log file that you had to scroll through forever or spacebar till your fingers are sore with more?

Tail to the rescue.

https://www.howtoforge.com/linux-tail-command/

Saturday, 19 May 2018

Linux from the command line | Linux tips & tricks -- Handy bash shortcuts

Linux from the command line | Linux tips & tricks -- Handy bash shortcuts

I guarantee at least one of these will be an "Oh wow, I wish I'd known about that one a long time ago!" moment for you.

https://www.tecmint.com/linux-command-line-bash-shortcut-keys/

Learning Linux | Linux from the command line -- Compiling your own code

Learning Linux | Linux from the command line -- Compiling your own code

There are those that will tell you that you're not a real Linux user until you've compiled code for yourself. I guess I'm probably one of them.
There are lots of reasons to do this. For us old school Linux guys, you didn't used to have a choice. Back in the day you just had to compile some code from source in order to get a working Linux system installed and running. Later you had some choice in the matter, but you still compiled some key system components and libraries so that you could heavily optimize the output binaries for your specific hardware. This was because computers were slower and more resource constrained and every little bit of performance you could wring out of them was welcome. The next stage was only having to compile your own kernel to support your hardware configuration. Then modular kernels happened and the days of having to compile anything were over.
Now it comes down to mostly two cases. One is compiling code you wrote yourself, in which case you don't need this tutorial. The other case is when you've found a piece of software you've just got to have but that isn't available for your Linux distro or hardware setup or is only available in source form.
So, when that happens, here you go.


Pro Tip: My personal formula for the "-j" option is:
nproc*2-1
So if you have a 4 core processor, use make -j7
And these days, systems are pretty fast so it doesn't hurt to throw -03 in the command line, or at least -02.
http://www.linuxandubuntu.com/home/basics-of-compiling-software-from-source-code-in-linux

Friday, 18 May 2018

Linux from the command line -- Letting your scripts compare things with test

Linux from the command line -- Letting your scripts compare things with test

The Linux shell is a powerful thing. It's almost a programming language and provides the user with the ability to compare things, make decisions based on the outcome, etc. just like a real programming language.
The 'test' command is a part of that capability.
https://www.howtoforge.com/linux-test-command/

Sunday, 13 May 2018

Linux tips & tricks -- Casting videos to Chromecast from Linux via Gnomecast

Linux tips & tricks -- Casting videos to Chromecast from Linux via Gnomecast

Here's an option for viewing your local video files from your Linux box on your Chromecast.
https://www.linuxuprising.com/2018/05/cast-videos-to-chromecast-on-linux-with.html

Saturday, 12 May 2018

Linux from the command line | Linux for sysadmins -- getting serious about command line text processing with AWK

Linux from the command line | Linux for sysadmins -- getting serious about command line text processing with AWK

When you're ready to do some advanced command line acrobatics and make some powerful scripts, AWK and SED are your go to tools. Here's a brief, hands on intro to AWK.

If you really want to master these tools, I suggest you pick up the O'Reilly books on AWK and SED.
https://www.rosehosting.com/blog/awk-command-examples/

Linux for sysadmins -- Installing and using Docker on CentOS 7

Linux for sysadmins -- Installing and using Docker on CentOS 7

Speaking of the latest CentOS release*, here's how to go about setting up Docker on it and using it. This is great for both sysadmins, and people wanting to learn and practice Enterprise tasks at home, or in their test lab.

Linux for sysadmins | Linux from the command line -- Take advantage of that multi-core system with parallel

Linux for sysadmins | Linux from the command line -- Take advantage of that multi-core system with parallel

The parallel command, no surprise, lets tasks run in parallel. If you have multiple CPU cores, this can really make things go a lot faster. It's great for bulk jobs like converting files.
https://opensource.com/article/18/5/gnu-parallel

Learning Linux | Linux for sysadmins -- Blacklisting kernel modules

Learning Linux | Linux for sysadmins -- Blacklisting kernel modules

The Linux kernel is fairly intelligent about detecting and identifying hardware and then loading the correct driver. In Linux these drivers are called kernel modules.
Sometimes though Linux either gets it wrong, or you want to stop a driver from loading for other reasons. That's when you need to blacklist a kernel module. nVidia GPU owners will want to learn how to work this so they can blacklist the horrible nouveau* driver after they install the nVidia driver.



*nouveau apologists can stifle it before they open their mouths, not interested. It's junk, get over it and use the nVidia driver.

https://www.networkworld.com/article/3270624/linux/blacklisting-modules-on-linux.html

Linux from the command line -- Save the repetition with watch

Linux from the command line -- Save the repetition with watch

Did you ever find yourself typing the same command over and over again?
Want to see how a background download is going?
If you said yes, then watch is the command for you.

Suppose a program you are running is downloading something in the background and you want to see how it's coming along?
"watch ls -lah /path/to/Downloads/somefile.tar.gz "

Or maybe you're worried that the USB hard drive you're backing up to is going to fill up.
"watch -n 15 df /path/to/usb-stick"
will let you monitor how much free space is on your USB drive, but only every 15 seconds so as to not overly interfere with the transfer.
https://www.ostechnix.com/run-a-linux-command-every-x-seconds-forever-using-watch-command/

Linux from the command line -- take out the trash and kill those bad tasks

Linux from the command line -- take out the trash and kill those bad tasks

So you've got a task running and it won't respond to it's UI, what can you do?
Linux has you covered.
https://opensource.com/article/18/5/how-kill-process-stop-program-linux

Linux from the command line -- Don't hang up on your tasks, use hup

Linux from the command line -- Don't hang up on your tasks, use hup

Back in the old days, computers were slow, serial connections were even slower, and getting disconnected and losing your tasks could cost you a day's work. Or maybe you just wanted to start a task running and logout and let it do it's thing.
Either way, hup is your friend. Learn it, love it, use it.
https://www.maketecheasier.com/nohup-and-uses/

Learning Linux with comics

Learning Linux with comics

Great series of comics about some common Linux commands.
https://boingboing.net/2018/05/11/b0rkb0rkb0rk.html

Monday, 7 May 2018

Linux from the command line -- format those unreadable numbers with numfmt

Linux from the command line -- format those unreadable numbers with numfmt

You can do some cool things with scripts and programs in Linux, but when you're dealing with numbers, the computer outputs numbers in a format it likes instead of one people like. You can fix this with numfmt.

https://www.ostechnix.com/the-numfmt-command-tutorial-with-examples-for-beginners/

Sunday, 6 May 2018

Linux from the command line | Linux tips & tricks -- Turning Vim into a Word Processor

Linux from the command line | Linux tips & tricks -- Turning Vim into a Word Processor

If you're a real Vim lover of course you want to use Vim all the time for everything. No you can use it as a Word Processor too.
https://www.maketecheasier.com/turn-vim-word-processor/

Linux tips & Tricks | Linux for sysadmins -- Setting up your own VPN with OpenVPN

Linux tips & Tricks | Linux for sysadmins -- Setting up your own VPN with OpenVPN

https://www.maketecheasier.com/create-own-linux-vpn/

Linux tips & tricks -- Installing the BookStack Documentation Wiki on CentOS

Linux tips & tricks -- Installing the BookStack Documentation Wiki on CentOS

A documentation server is a great and powerful resource for one or groups.
It can be especially useful for dev groups and engineering teams or classrooms.
https://www.howtoforge.com/tutorial/centos-bookstack-nginx/

Linux from the command line | Linux for sysadmins -- Learning Cron

Linux from the command line | Linux for sysadmins -- Learning Cron

Scheduled tasks are in important part of Linux administration. You'll need to learn to manage them effectively and correctly. Here's a start.
https://www.ostechnix.com/a-beginners-guide-to-cron-jobs/

Friday, 4 May 2018

Linux from the command line -- Customizing your text colours in bash

Linux from the command line -- Customizing your text colours in bash

The Linux terminal uses colour to help you identify and discriminate between different types of information. You can customize those colour hints to your liking. Here's how.
Warning, there be dragons here!
Be careful what you change and make backups first. You could easily make your terminal output unreadable.
https://www.networkworld.com/article/3269587/linux/customizing-your-text-colors-on-the-linux-command-line.html

Linux tips & tricks| Linux from the command line -- writing bootable USB sticks from an ISO file in BASH

Linux tips & tricks| Linux from the command line -- writing bootable USB sticks from an ISO file in BASH

It can be very handy to have a quick and simple way to take an ISO file and spit it out to a bootable USB stick. Here's one method.

Side note:
My most common GUI tool to perform this task is SuSE Studio Image Writer which is of course available for the various SUSE versions, but it is available for other Linux distros as well. See https://software.opensuse.org/package/imagewriter
In fact there's even a Windows version floating around out there.

https://www.tecmint.com/create-bootable-usb-in-linux-commandline/

Learning Linux | Linux from the command line -- 25 common Linux commands with examples

Learning Linux | Linux from the command line -- 25 common Linux commands with examples

This is one of those pages you give to someone that just installed Linux for the first time.
https://linuxhint.com/top-25-linux-commands-with-examples/

Learning Linux | Linux from the command line -- Watching commands with the watch command

Learning Linux | Linux from the command line -- Watching commands with the watch command

Did you ever type the same command over and over again just to monitor some ongoing process? Well you can automate that with the watch command.

Here's one I've used when downloading to a nearly full drive.

watch 'df |grep -i /storage'

Or, suppose you have a file being downloaded or created in the background by another process and you want to see show it's coming along and how much has been transferred.

watch 'ls -la ~/Downloads/somefile.tar.gz'
https://www.howtoforge.com/linux-watch-command/

Monday, 30 April 2018

Linux tips & tricks -- Search and install Google Web Fonts with Font Finder

Linux tips & tricks -- Search and install Google Web Fonts with Font Finder
https://www.ostechnix.com/font-finder-easily-search-and-install-google-web-fonts-in-linux/

Linux for sysadmins -- Configure Active/Passive NFS Server on a Pacemaker Cluster with Puppet

Linux for sysadmins -- Configure Active/Passive NFS Server on a Pacemaker Cluster with Puppet

If you need to setup a storage server using NFS, here's how you can setup a nice resilient NFS cluster.
https://www.lisenet.com/2018/configure-active-passive-nfs-server-on-a-pacemaker-cluster-with-puppet/

Linux tips & tricks -- A Beginners Guide to Flatpacks

Linux tips & tricks -- A Beginners Guide to Flatpacks

Flatpacks, one of several Linux portable application distribution formats.
https://www.ostechnix.com/flatpak-new-framework-desktop-applications-linux/

Linux from the command line | Linux for sysadmins -- Reigning in the Devil, using Chkservice to manage systemd units

Linux from the command line | Linux for sysadmins -- Reigning in the Devil, using Chkservice to manage systemd units

We're all pretty much stuck with systemd, at least we have tools to control it.
https://www.maketecheasier.com/use-chkservice-manage-systemd-units-linux/

Linux from the command line -- which and whoami

Linux from the command line -- which and whoami


https://www.howtoforge.com/linux-which-whoami-command/

Sunday, 29 April 2018

Linux from the command line -- Find your stuff with find

Linux from the command line -- Find your stuff with find

The find command is a classic, core UNIX command that you can use to dig the location of files out of the depths of your system.
What's more find is much more powerful than most of the graphical search tools that come with your system.
https://opensource.com/article/18/4/how-use-find-linux

Linux from the command line -- Using debugfs to track file times

Linux from the command line -- Using debugfs to track file times

Sometimes you need to find out what's going on with certain files. Maybe you want to see if your application is updating it's data files or if the system's tmp files are being written when they should. Whatever the reason, you can get it done with debugfs.
https://www.tecmint.com/debugfs-command-show-file-creation-time-in-linux/#

Saturday, 28 April 2018

Linux from the command line | Linux tips & tricks -- "What is this box anyway?"

Linux from the command line | Linux tips & tricks -- "What is this box anyway?"

It may seem silly to want to find out about the brand and model of computer you're using when you're looking at it. But sometimes it's handy info. For example, if you're working on a friend or family member's computer and you need to lookup that model's reference info on the manufacturer's website. It's also really handy for sysadmins doing remote maintenance when you can't just look at the computer.

So here you go. Several ways to find out what you're computer's details are.
https://www.2daygeek.com/how-to-check-system-hardware-manufacturer-model-and-serial-number-in-linux/

Linux for sysadmins -- Randomizing DNS

Linux for sysadmins -- Randomizing DNS

I've been saying for a while now that DNS would, at some point, become an attack vector for both censorship and police state surveillance. Fortunately, there's people working on this and here's one solution. This system will distribute DNS requests randomly among a list of TLS encrypted DNS servers.
This is a pretty good idea and a good solution and I hope to see more down the road.
https://www.ctrl.blog/entry/kresd-random-dns-forwarding

Friday, 27 April 2018

Linux tips & tricks -- Installing Adobe Creative Cloud Apps in Linux

Linux tips & tricks -- Installing Adobe Creative Cloud Apps in Linux

OK, big caveat here. PlayOnLinux currently has a huge bug with regards to HiDPI screens that makes it almost unusable. So, if you have a 4k screen, be forewarned not to count on this solution if you need Adobe CS on Linux.

This bug has been reported, and I've been tracking it for almost a year, but the PoL devs have done nothing about it.
https://www.maketecheasier.com/install-adobe-creative-cloud-linux/

Linux tips & tricks -- Sharing files between Windows and Linux

Linux tips & tricks -- Sharing files between Windows and Linux

This article gives two ways, there are quite a few others. Share your's in the comments.
https://www.networkworld.com/article/3269189/linux/sharing-files-between-linux-and-windows.html

Linux from the command line -- Introducing the GNU Core utils

Linux from the command line -- Introducing the GNU Core utils

These are the core command line tools that are part of every GNU/Linux distribution.
https://opensource.com/article/18/4/gnu-core-utilities

Linux from the command line -- Using seq to iterate over sequences in bash

Linux from the command line -- Using seq to iterate over sequences in bash
https://linuxhint.com/bash_range/

Friday, 20 April 2018

Linux tips & tricks -- Backup and restore Linux system settings with Mackup

Linux tips & tricks -- Backup and restore Linux system settings with Mackup

Backup your Linux system settings to your Dropbox the easy way.
https://www.ostechnix.com/backup-and-restore-application-settings-on-newly-installed-linux-system/

Linux for sysadmins -- OSWatcher Black Box for system monitoring

Linux for sysadmins -- OSWatcher Black Box for system monitoring

https://www.2daygeek.com/oswbb-how-to-install-and-configure-oswatcher-black-box-for-system-diagnostics/

Linux from the command line | Linux tips & tricks -- Math on the command line

Linux from the command line | Linux tips & tricks -- Math on the command line

Thanks to it's UNIX roots, Linux is very good at math and provides multiple ways to do various kinds of math, both simple and complex, from the command line. This of course means you can also do it from a script.


https://www.networkworld.com/article/3268964/linux/how-to-do-math-on-the-linux-command-line.html

Linux for sysadmins -- Configuring network interface bonding in Ubuntu Linux

Linux for sysadmins -- Configuring network interface bonding in Ubuntu Linux

Bonding is a great, standards supported method of increasing network bandwidth or reliability by logically combining multiple network interfaces into one logical interface.
Bonding is the standards referenced name, but Microsoft being Microsoft for some damned reason calls it "Teaming". Please don't promote that improper terminology nonsense. It's Bonding.
Note that to use Bonded Ethernet interfaces, you must have a network switch that also supports Bonding.

Notes:
For RH like systems, see https://www.tecmint.com/configure-network-bonding-or-teaming-in-rhel-centos-7/
For OpenSUSE users of course, you should use YaST2 to create and set up bonded devices.
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.basicnet.html#sec.bond


https://www.tecmint.com/configure-network-bonding-teaming-in-ubuntu/

Linux from the command line | Linux for sysadmins -- Mastering the shutdown command

Linux from the command line | Linux for sysadmins -- Mastering the shutdown command

Many PC Desktop Linux home users may never have come across the shutdown command, but it's handy to know and learn for a lot of reasons. For sysadmins, it's an essential tool for remote management.

For home users, imagine you're downloading a large file that's going to take an hour but you have to leave for work. You want to finish your download, but you don't want to leave your computer running all day. Shutdown is your tool.

Let's try it. OK, so your download says it's going to take an hour, let's be safe and wait 90 minutes before shutting off the computer, in case the download slows down a bit.
Open a shell, become root with su, and type the following

shutdown -P +90

That's it. Leave the shell open and go to work. In 90 minutes your computer will shutdown and power off cleanly unattended.
https://www.howtoforge.com/linux-shutdown-command/

Tuesday, 10 April 2018

Linux from the command line -- Mixing it up with the shuf command

Linux from the command line -- Mixing it up with the shuf command

The bash shell is very powerful and the plethora of commands it provides can be combined into scripts as powerful as full on applications. The shuf command is an example of a tool you might use to build such a powerful script.

Make sure to check out the "sort" command too, it's the ying to shuf's yang.
They will also both teach you why you should use leading zero's instead of the way it's done in the shuf demo. For example, where the demo uses
line1
line2
.
.
.
line10

You should use

line01
line02
.
.
.
line10

Play with shuf and sort to see why.
https://www.ostechnix.com/the-shuf-command-tutorial-with-examples-for-beginners/

Linux tips & tricks -- 14 tools to backup your Linux box

Linux tips & tricks -- 14 tools to backup your Linux box

If there's one piece of advice you'll hear on every computing advice list, it's backup your computer!
Luckily for Linux users, it's UNIX heritage brings with it a sysadmin's mindset of backup soon and often. This in turn has lead to the availability of a lot of great tools and options for backing up. Even better many of these tools can backup more than just your one Linux box, many can backup the other computers on your network as well, be they Linux, Windows, or Mac.
So check out the list, pick a tool, and get backing up.

Pro Tip:
For a lot of smaller customers and home business users, I take an old, low power PC (eg a Small Form Factor) or even laptop, throw a USB 3.0 card in it, and grab two of the same Terabyte or larger external USB 3.0 drives from whoever has them on sale this week. Then set them up to automount by UUID, configure them as RAID 1 (Mirrored), and install Amanda on the system to let it operate as a backup server for critical files. IE "My Documents" on Windows systems, and "/home/*" on Linux systems.
Be sure to setup SMARTD on the server box to check the drives regularly and to e-mail you if it finds any issues.
If you use an old PC/Laptop you already have, and Hard Drives on a good sale, you can setup a pretty decent backup server for under $200. Money well spent.
In fact these days, the Raspberry Pi 3 B+ could even serve in this role reasonably well, as long as you run your backups at night and use compression on the client side to minimize bandwidth, USB utilization.
Whatever hardware you use, plug it all into a small APC UPS and setup the comm cable so the system can auto-shutdown in the event of a power failure.
https://www.tecmint.com/linux-system-backup-tools/

Sunday, 8 April 2018

Linux from the command line -- Command line history with fc

Linux from the command line -- Command line history with fc

We've talked about some of the bash shell command line history tools before, but there's always something new to learn.
https://www.ostechnix.com/the-fc-command-tutorial-with-examples-for-beginners/

Thursday, 5 April 2018

Linux from the command line -- Going overboard demonstrating the many ways there are to do things on Linux by...

Linux from the command line -- Going overboard demonstrating the many ways there are to do things on Linux by checking your memory


https://www.2daygeek.com/easy-ways-to-check-size-of-physical-memory-ram-in-linux/

Linux for sysadmins -- Installing Rancher Docker manager on Debian

Linux for sysadmins -- Installing Rancher Docker manager on Debian
https://www.howtoforge.com/tutorial/debian-rancher-docker-container-manager/

Linux from the command line | Linux for sysadmins -- Reading compressed text files

Linux from the command line | Linux for sysadmins -- Reading compressed text files

While this is a convenient tool for people that save space by compressing their ordinary text files, it's a really handy tool for system administrators that want to view old log files...assuming you have your system setup to still store them this way and haven't given in to systemd's log storage nonsense.
https://bash-prompt.net/guides/read-write-gzip/

Learning Linux -- An overview of the ext file-system family

Learning Linux -- An overview of the ext file-system family

ext and it's descendants have been the default file-system in Linux for a very long time. Here's what they are and what the difference are as well as a brief overview of a few file-system alternative options.
https://opensource.com/article/18/4/ext4-filesystem

Tuesday, 3 April 2018

Linux tips & tricks | Linux for sysadmins -- IPFire, a user friendly Linux firewall

Linux tips & tricks | Linux for sysadmins -- IPFire, a user friendly Linux firewall

For advanced home LAN users, small businesses, and charity organizations a great way to build an inexpensive but powerful firewall is to throw two network cards in an old PC and installing Linux.
If you don't have advanced Linux firewall/networking skills yet, there are a few ways to make it work. Pfsense is one way. This looks like another one.
I've never used it myself, but I thought it was worth sharing.
One thing I find interesting about it is that it's a purpose built, from scratch system. Not a general purpose distro like Fedora or Ubuntu hacked up and modified for firewall duty. It also seems to have a pretty decent administration system and firewall management interface.
https://www.linux.com/learn/intro-to-linux/2018/4/ipfire-user-friendly-linux-firewall-distribution

Linux for sysadmins -- Managing virtual machines with Vagrant

Linux for sysadmins -- Managing virtual machines with Vagrant

This is a system to help manage virtual machines and it looks like it might be helpful for some regular VM users. However, be sure to read the docs for your Linux distribution because some, especially ones that are for Enterprise use come with built in or integrated tools to perform these functions.
https://www.chris-shaw.com/blog/how-to-install-and-setup-vagrant#2018

Linux from the command line -- 10 fundamental commands for new Linux users

Linux from the command line -- 10 fundamental commands for new Linux users

This is Linux 101. Worth saving for reference to send to your new Linux convert friends when they ask you how to get started.
https://opensource.com/article/18/4/10-commands-new-linux-users

Friday, 30 March 2018

Linux from the command line | Linux tips & tricks -- benchmarking Linux

Linux from the command line | Linux tips & tricks -- benchmarking Linux

At some point you just have to know, how fast is it? Your car, your hamster, and your Linux box. Here you go.

Lately I've been running sysbench after every system update in order to try and track any change in performance due to the ongoing fixes for Meltdown/Spectre using:
sysbench --test=cpu --cpu-max-prime=10000 run --num-threads=
https://www.howtoforge.com/how-to-benchmark-your-system-cpu-file-io-mysql-with-sysbench

Linux for sysadmins -- Installing SquidGuard & Squid proxy server on CentOS 7

Linux for sysadmins -- Installing SquidGuard & Squid proxy server on CentOS 7

The combination of Squid and SquidGuard is one that most businesses should consider. It allows you to reduce Internet bandwidth usage, monitor usage, increase speed and responsiveness to the users, and filter unwanted sites and content easily but at as fine a grained level as you need for your application. CentOS is a great choice to host this combo and the whole system runs well on everything from virtual machines, to last year's upcycled desktop PC, to high end dedicated server hardware.

In smaller shops I've often taken desktop PC's that were pulled when new PC upgrade cycles were complete, maxed out their RAM, and added a quality hard drive and an external storage solution, like a RAID enclosure, or simple external SATA drive. Throw it all on a UPS and keep some cold spares handy from the rest of the old PC's and away you go.

I've even run this at home at times when I lived in locations with slow and or metered Internet access.
http://linuxtechlab.com/install-squidguard-with-squid-proxy-server-complete-guide/

Linux tips & tricks | Linux for sysadmins -- creating and expanding swap partitions with LVM

Linux tips & tricks | Linux for sysadmins -- creating and expanding swap partitions with LVM

LVM is a great tool that every sysadmin and many home users should be familiar with. It let's you remove the hard connection between volumes and partitions on your storage devices, enabling you to grow, shrink, move, and span your partitions across multiple physical devices and partitions.
Using it under your swap partition allows you to grow your swap size down the road should your swap needs grow.

Note that OpenSUSE users can, and should, perform these functions using the YaST2 administration tool's partition manager function ("Partitioner").
https://www.2daygeek.com/how-to-create-extend-swap-partition-in-linux-using-lvm/

Linux from the command line -- Getting your news from the terminal

Linux from the command line -- Getting your news from the terminal

OK, this is a bit much even to me, but hey if you really don't like to use the GUI or the web, here's your answer.

https://www.tecmint.com/newsroom-commandline-linux-news-reader/#

Linux from the command line -- Working with calendars on Linux

Linux from the command line -- Working with calendars on Linux

If you think about it, there are a lot of reasons to want calendar tools available from the command line, especially for sysadmins. Some of these tools can be integrated into scripts as well for even more utility.
https://www.networkworld.com/article/3265752/linux/working-with-calendars-on-linux.html

Learning Linux | Linux from the command line -- How to read man pages, a core Linux skill

Learning Linux | Linux from the command line -- How to read man pages, a core Linux skill

People often say Linux (UNIX) is hard to learn or use, but really they are not. They are simply unfamiliar. Luckily the system has built in tools to teach you how to use it. The man command is key to that. For any Linux, or UNIX, command there is a corresponding MANual page that will teach you how to use it. Just type "man "
Here's how to get the most out of the result.
https://www.maketecheasier.com/read-linux-man-page/

Linux from the command line -- Using tar to backup files and directories

Linux from the command line -- Using tar to backup files and directories

The tar command is one that has been around since the early days of Unix. It's a simple yet powerful tool that is the grandfather of zip and other tools like it.
https://www.ostechnix.com/how-to-archive-files-and-directories-in-linux-part-1/

Monday, 26 March 2018

Linux tips & tricks -- One simple way to capture video

Linux tips & tricks -- One simple way to capture video

One of the nice things about Linux is that there are lots of ways to do things. From elaborate GUI programs to simple command line options.
https://opensource.com/article/18/3/digitizing-vhs-fedora

Linux tips & tricks -- Tools for writers

Linux tips & tricks -- Tools for writers

So you've moved to Linux but you're a writer by trade or hobby and need good tools. No problem.
https://opensource.com/article/18/3/top-Linux-tools-for-writers

Linux from the command line -- Making named pipes on Linux with mkinfo

Linux from the command line -- Making named pipes on Linux with mkinfo
https://www.howtoforge.com/linux-mkfifo-command/

Linux from the command line -- Search DuckDuckGo from the command line with ddgr

Linux from the command line -- Search DuckDuckGo from the command line with ddgr
https://www.2daygeek.com/ddgr-duckduckgo-search-from-the-command-line-in-linux/

Linux from the command line | Linux tips & tricks -- transferring files from the command line with QR Codes

Linux from the command line | Linux tips & tricks -- transferring files from the command line with QR Codes

Superbeam is my go to file transfer app, but this is pretty cool. It let's you do a quick file transfer to your phone right from the command line.
https://www.ostechnix.com/transfer-files-from-computer-to-mobile-devices-by-scanning-qr-codes/

Sunday, 25 March 2018

Linux from the command line -- Using Meltdown/Spectre to learn a few new command line tricks


Linux from the command line -- Using Meltdown/Spectre to learn a few new command line tricks

So today I was getting ready to post a little trick about using egrep to highlight things you're looking for when I also discovered something really cool.
But let's start with the egrep trick.
By now if you've been following my "Linux from the command line" posts then you should have learned the basics of grep which let's you find things in other things. Like a word or phrase in a file or command output.
But what if the line grep returns is a long, cluttered line with a lot of kinda random words? egrep to the rescue.
Suppose you want to know if your CPU supports virtualization and you want the command to work with either an Intel or AMD CPU. Try this.
egrep --color -i "svm|vmx" /proc/cpuinfo
If your CPU supports either of those virtualization functions you'll see them highlighted in the output.

OK, now to the cool part
Since Meltdown and Spectre the CPU manufacturers have been working hard along with the Linux kernel developers to fix these bugs. One place this is happening is in the CPU's microcode and another is in the kernel CPU tables.
SO, try this.
egrep --color -i "meltdown|spectre" /proc/cpuinfo

The Linux CPU identification process includes an entry for bugs which simply enough lists the known bugs for that CPU. If you're using any kind of modern CPU, that line should have returned some interesting info.
On one of my AMD systems I got this output
bugs : tlb_mmatch fxsave_leak sysret_ss_attrs spectre_v1 spectre_v2
and on an Intel system
bugs : cpu_meltdown spectre_v1 spectre_v2
Note that I can't show the egrep highlighting here on Google Plus but you should be seeing the Meltdown/Spectre bugs highlighted.

Now, lets check for the fix and see if your CPU has been patched yet.
egrep --color -i "retpoline|kaiser" /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dtherm retpoline kaiser tpr_shadow vnmi flexpriority

And there you go. The Intel system has both Meltdown and Spectre patches.
On my AMD system I get similar output, but only for Spectre (because the AMD's are only susceptible to Spectre).
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate rsb_ctxsw retpoline retpoline_amd npt lbrv svm_lock nrip_save vmmcall

So I would recommend that you just look at your cpuinfo for your various CPU's and see what new info is in there.
cat /proc/cpuinfo

Bonus command - Let's throw it all in there at once.
egrep --color -i "retpoline|kaiser|meltdown|spectre" /proc/cpuinfo

That will show you what bugs your CPU has and what fixes are applied.
If this command returns no output, your CPU and kernel have not been patched and you are vulnerable! In this case you need to update your system and try again. If you still get no output, you may need to do a full distro update to the newest release. If you are already running the latest version of your Linux distro and they have not patched yet, it may be time to consider switching distros.

Note: I assume most everyone out there has a CPU with at least two cores. Most of us even more. Because of this the output from most of the above commands will be repeated identically a number of times equal to the number of cores in your CPU. No biggie, just ignore all but the last entry.

Wednesday, 21 March 2018

Linux from the command line | Linux for sysadmins -- Managing your Docker containers from the command line with Dry

Linux from the command line | Linux for sysadmins -- Managing your Docker containers from the command line with Dry

A command line Docker manager is a great tool for remote management, especially over a WAN or the Internet (via VPN of course). It also eliminates the need for a full client device, letting you manage a container from many kinds of devices.
https://www.2daygeek.com/dry-an-interactive-cli-manager-for-docker-containers/

Monday, 19 March 2018

Linux from the command line -- Manage disk partitions with parted

Linux from the command line -- Manage disk partitions with parted
https://www.2daygeek.com/how-to-manage-disk-partitions-using-parted-command/

Linux from the command line -- Digging into the 'who' command

Linux from the command line -- Digging into the 'who' command

Granted there aren't as many use cases for the who command as traditional multi-user logins aren't as common as they used to be. But who is still a useful command.
https://www.tecmint.com/linux-who-command-examples/#

Linux tips & tricks -- Encrypting files from your file manager

Linux tips & tricks -- Encrypting files from your file manager

With security being a bigger issue all the time, encryption is a necessary tool. The easier it is to use, the more likely you are to use it. So here's how to setup and use encryption right from your file manager.
https://www.linux.com/learn/intro-to-linux/2018/3/how-encrypt-files-within-file-manager

Linux tips & Tricks -- taking back control of your resolve.conf

Linux tips & Tricks -- taking back control of your resolve.conf

I'm posting this as informational and mostly for reference purposes. You should really RTFM the docs and or wiki for your distro before messing with something like your resolver setup. For example, SUSE distros usually control things like this using the system administration tool, YaST2.
https://www.ctrl.blog/entry/resolvconf-tutorial

Linux tips & tricks -- create shortcuts to long paths with gogo

Linux tips & tricks -- create shortcuts to long paths with gogo

I hesitate to share this because although it's handy, it really sets you up for getting into bad habits. That said, you're all (supposedly ;') grownups so you can decide for yourself.
Mainly it's not something you want to use for generic tasks, especially for sysadmins that use multiple systems as it won't be available to you on every system. However, I know that personally I have a few specific machines that I end up cd'ing into long, deep directory paths multiple time per day and this would save some time and frustration.
https://www.tecmint.com/gogo-create-shortcuts-to-long-directory-paths-in-linux/

Sunday, 18 March 2018

Linux from the command line -- Cli.FYI

Linux from the command line -- Cli.FYI

Cli.Fyi is a potentially useful command line query tool that allows you to quickly retrieve information about emails, IP addresses, URLs and lots more either from the command line...
https://www.2daygeek.com/cli-fyi-a-tool-to-fetch-information-ips-emails-domains/

Monday, 12 March 2018

Linux tips & tricks -- Overclocking your AMD GPU

Linux tips & tricks -- Overclocking your AMD GPU
https://www.maketecheasier.com/overclock-amd-gpu-linux/

Linux from the command line -- viewing images with feh

Linux from the command line -- viewing images with feh

feh is a great way to view image files fast from the command line. Great when looking through directories, cleaning up your hard drive, etc.

Oh, and to install it on OpenSUSE, just do
zypper in feh
https://www.maketecheasier.com/feh-image-viewer/

Linux for sysadmins | Linux security -- Snort, another Intrusion Detection System (IDS) option for Linux

Linux for sysadmins | Linux security -- Snort, another Intrusion Detection System (IDS) option for Linux

There are many security tools available for Linux and like most things, the best solution for you is going to be a combination of tools that best suits the particular setup and configuration you are using it for. Snort is one of the tools to put in that mix.
https://linuxhint.com/configure-snort-ids-create-rules/

Friday, 9 March 2018

Learning Linux | Linux from the command line -- Linux Fu: regular expressions

Learning Linux | Linux from the command line -- Linux Fu: regular expressions

Hackaday has a great article series called "Linux Fu" and this is the latest in the series. You can get to the rest from the resources at the bottom of the article. Meanwhile, you can learn more about the all important regular expressions.
https://hackaday.com/2018/03/09/linux-fu-regular-expressions/

Linux from the command line | Linux tips & tricks -- move binaries safely from one machine to another with exodus

Linux from the command line | Linux tips & tricks -- move binaries safely from one machine to another with exodus

Now this is cool and handy. You know you wished you could do this before.
https://www.tecmint.com/exodus-copy-linux-binaries-to-remote-linux-system/

Thursday, 8 March 2018

Linux from the command line -- Making command line skills fun to learn

Linux from the command line -- Making command line skills fun to learn

By now everyone that follows my stream should know that I think everyone should learn and use the command line (in addition to their GUI desktop) because it's a fast and powerful part of your Operating System. That doesn't mean learning it has to be boring.
https://www.ostechnix.com/test-your-bash-skills-by-playing-command-line-games/