Friday, 29 December 2017

Linux from the command line - Using the Word Count (wc) command

Linux from the command line - Using the Word Count (wc) command

wc is a very simple program that is very handy and very powerful.
It allows you to count things. The obvious use is counting the words in an essay to make sure you've reached the assigned 5000 word minimum for example. But when combined with bash scripts, wc has a lot more diverse and powerful uses, especially when combined with pipes and redirects.

For example, if you want to know how many PCI devices are in your system, type:
lspci | wc -l

USB devices?
lsusb | wc -l


https://www.howtoforge.com/linux-wc-command-explained-for-beginners-6-examples/

Friday, 22 December 2017

Linux from the command line - Scheduling tasks for later with 'at'

Linux from the command line - Scheduling tasks for later with 'at'

Yesterday I posted about cron and crontab and using them to schedule tasks to run regularly. But what if you want to run a task once at a later time?
That's where 'at' comes in.


https://linuxconfig.org/how-to-schedule-tasks-using-at-command-on-linux

Wednesday, 20 December 2017

Linux for sysadmins - Using crontab

Linux for sysadmins - Using crontab

Automating repetitive tasks is a huge time saver and important skill for every Linux user, especially sysadmins. Crontab is where that gets done.
http://linuxtechlab.com/scheduling-important-jobs-crontab/

Linux from the command line - Searching Duck Duck Go from the command line

Linux from the command line - Searching Duck Duck Go from the command line

With Google getting more and more Orwellian and political, users are moving to Duck Duck Go for the privacy it provides. Here's how you can search it from the command line.
https://www.tecmint.com/search-duckduckgo-from-linux-terminal/#

Monday, 18 December 2017

Linux Command Line - putting commands together

Linux Command Line - putting commands together

Here's an example to get you on the road to understanding the Linux Command Line's secret superpower. The ability to combine multiple commands to perform complex tasks in simple ways.

"Use the pipe Luke!"
https://www.cyberciti.biz/faq/linux-unix-find-tar-files-into-tarball-command/

Thursday, 14 December 2017

Using pdfgrep to search PDF files on Linux

Using pdfgrep to search PDF files on Linux

This is a really handy tool to let you search one or a directory full of PDF files.

This is Debian oriented, but a great tool for all Linux versions.


For OpenSUSE users, just add the Publishing repo then add the package.
eg. do the following from a root shell

zypper ar https://download.opensuse.org/repositories/Publishing/openSUSE_Leap_42.3/Publishing.repo

zypper in pdfgrep

You might also want to add pdftk with
zypper in pdftk

https://www.maketecheasier.com/search-pdf-files-pdfgrep/

Thursday, 7 December 2017

Linux from the Command Line - finding text in files and directories with grep

Linux from the Command Line - finding text in files and directories with grep

grep is a core tool in Linux and one every user should get to know.
https://www.tecmint.com/find-a-specific-string-or-word-in-files-and-directoires/#

Linux from the Command Line - using ncat

Linux from the Command Line - using ncat

ncat is a highly useful tool for pulling information from network streams.
https://www.linuxtechi.com/nc-ncat-command-examples-linux-systems/

Linux for sysadmins - Using sudo

Linux for sysadmins - Using sudo

This is the way to use sudo to delegate the rights to run privileged applications to non root users.
https://opensource.com/article/17/12/using-sudo-delegate

Tuesday, 5 December 2017

Advanced Linux - Writing udev rules

Advanced Linux - Writing udev rules

Due to it's UNIX heritage, Linux gives you powerful, fine grained control over the system. udev is a prime example of that power.
https://linuxconfig.org/tutorial-on-how-to-write-basic-udev-rules-in-linux

Sunday, 3 December 2017

Monday, 30 October 2017

Linux shared libraries

Linux shared libraries

Just like most other operating systems, Linux supports shared libraries and it supports dynamic libraries, which can be shared between different applications saving space on the system, and static libraries which are built into the application at compile time, which improves compatibility with multiple Linux systems and versions.

If only the geniuses at Canonical had read this before wasting time creating snaps. Static libraries were all they needed.
https://www.tecmint.com/understanding-shared-libraries-in-linux/

Learning the Linux command line - Using find....safely

Learning the Linux command line - Using find....safely

find is a key command to learn and use on Linux or UNIX, but make sure you use it safely. Here's how.
https://www.networkworld.com/article/3233305/linux/using-the-linux-find-command-with-caution.html

Monday, 16 October 2017

Understanding what "Everything is was a file" means in UNIX/Linux

Understanding what "Everything is was a file" means in UNIX/Linux

This is and was a key concept of UNIX, and therefore Linux since their inception. Recently however this idea has been heavily shat upon by systemd's designers and as this blight's mission creep continues to take over more and more utterly init unrelated systems and processes, more of the "Everything is a file" simplicity and power of Linux is destroyed.

#Linux

More on Linux files and hard and soft links here:
https://www.tecmint.com/create-hard-and-symbolic-links-in-linux/#
https://www.tecmint.com/explanation-of-everything-is-a-file-and-types-of-files-in-linux/

Wednesday, 11 October 2017

Linux tips & tricks - using stow to manage source installs

Linux tips & tricks - using stow to manage source installs

Modern Linux distributions have great repositories of software available, so much so that many people never need to go looking elsewhere to meet their needs. Sometimes however you find a piece of software that, for whatever reason, you install from source. This is fine, but it also means that this package is now your responsibility to manage. Updates, dependencies, recompiling, etc. all become your responsibility instead of being automagically handled by your distribution's package manager. "stow" is a tool to help with that.

Note: OpenSUSE users simply type the following from a root command prompt to install stow.
# zypper in stow
at Y prompt

That's it.
https://linuxconfig.org/how-to-use-gnu-stow-to-manage-programs-installed-from-source-and-dotfiles

Monday, 9 October 2017

Learning Linux: Don't leave your terminal sessions logged in - enable auto logout with TMOUT

Learning Linux: Don't leave your terminal sessions logged in - enable auto logout with TMOUT

This is an important consideration for sysadmins. Especially if you frequently get called away from your desk.

Sure this is a simplistic tool and not overly useful, but combined with screen it can be a wonder.
https://www.tecmint.com/tmout-auto-logout-linux-shell-idle-sessions/

Saturday, 30 September 2017

Learning Linux - Get ahead with 'head'

Learning Linux - Get ahead with 'head'

Inherited from it's UNIX ancestors, the Linux command line has a lot of powerful tools. 'head' and 'tail' are bookends of a set of commands for manipulating and viewing the contents of a file or pipe.
https://www.howtoforge.com/linux-head-command/

Load test your Linux system

Load test your Linux system

Need to stress test your hardware? Verify that new server before you deploy it? Put your system under load to test your apps?

Here's how.
https://bash-prompt.net/guides/create-system-load/

Tuesday, 5 September 2017

WoeUSB - Create Windows bootable USB sticks from Linux

WoeUSB - Create Windows bootable USB sticks from Linux

Attn. sysadmins and techies. This seems like a really handy tool.
https://www.fossmint.com/woeusb-create-bootable-windows-usb-sticks-from-linux/

Monday, 4 September 2017

Learning Linux - killing processes

Learning Linux - killing processes

In Windows when a program goes nuts, you un-intuitively hit CTRL-ALT-DEL to bring up the task manager and select the task from the list and try and kill it.
Linux, like it's UNIX ancestors has multiple command line tools for process management and this guide will get you started on some of the tools used to stop tasks that you've determined you don't want running anymore. As always, be careful with these tools, using them carelessly can not only lock-up or crash your system, but cause data loss too.
https://kerneltalks.com/commands/beginners-guide-to-kill-process-in-linux/

Monday, 24 July 2017

Using screen with UNIX/Linux

Using screen with UNIX/Linux

One wise sysadmin trick is to always type "screen" as soon as you log into any remote system. The reason being that if you need to come back to something, a long download or file transfer for example, then you can always detach the screen session, log out, and come back later. The session will remain open and whatever you were doing will keep running.
I recently downloaded a large backup file from a far away, remote server on a slow connection. Thanks to screen I was able to start the transfer from the far remote system to another, nearby remote system and then logout. I could then login periodically to that system, reattach the screen session, look at the progress, and detach it again and log back out. I was also able to do this multiple times, from multiple systems. It's a super handy tool and something every Linux user should know how to use.
https://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/

Friday, 21 July 2017

Advanced Linux - using TCP BBR

Advanced Linux - using TCP BBR

I've looked at BBR and it certainly looks like a great innovation in network performance. That said I only recommend its use right now by advanced Linux admins with a pressing need for the improved performance, and then only after serious load testing on non critical network links.
For everyone else I recommend you wait until it is integrated into your Linux distribution and the mainline kernel. That way you are not messing with your vendor's highly tuned and optimized kernel configuration and you're getting something tested and integrated into the system as a whole.

#Linux #SysAdmin #Networking
https://www.cyberciti.biz/cloud-computing/increase-your-linux-server-internet-speed-with-tcp-bbr-congestion-control/

Wednesday, 5 July 2017

Watch out for security patches for anything you use that uses GnuPG's crypto library!

Watch out for security patches for anything you use that uses GnuPG's crypto library!

That may actually be more things than you think. Things like routers, phones or phone apps, etc. and not just on Linux. GnuPG is widely used cross platform.

#linux #Security #SysAdmin #Windows
http://www.theregister.co.uk/2017/07/04/gnupg_crypto_library_cracked_look_for_patches/

Saturday, 17 June 2017

OpenSUSE ups the security game in Tumbleweed with PIE support enabled as the default for all binaries

OpenSUSE ups the security game in Tumbleweed with PIE support enabled as the default for all binaries

FTA:
"Tumbleweed is now built with PIE (Position Independent Executables) as default. [...] This allows full ASLR (address space randomization) for all binaries without specific need to change your actual package, making attacks much harder,"

#Linux #Security #OpenSUSE
http://news.softpedia.com/news/opensuse-tumbleweed-os-is-now-built-with-pie-as-default-for-increased-security-516527.shtml?utm_content=buffer68f37&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer

Tuesday, 13 June 2017

Linux Tips & Tricks - Listing installed repositories

Linux Tips & Tricks - Listing installed repositories

This is a simple but handy thing to know. This page will show you how to list what software repositories are installed on your Linux system. Instruction are given for each of the major package managers.

When might you use this? Well for one it's common to go looking for an application to accomplish a certain task and in reading through forums and whatever you come across something like "Oh yeah, I use for that. It's in the so just install it from there." OK, but how do you know if you have installed? Well, here's your answer. ;')

https://www.ostechnix.com/find-list-installed-repositories-commandline-linux/

Friday, 2 June 2017

Monitoring hard drive health in Linux

Monitoring hard drive health in Linux

Using and setting up tools like smartd are essential sysadmin skills, particularly setting up e-mail notifications. However, smartd is simple enough to setup that home users should consider using it too.

https://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html

Saturday, 27 May 2017

Linux Tips & Tricks - Using alias

Linux Tips & Tricks - Using alias

While alias is a great way to shorten commonly used commands, I rarely recommend that people do so. Why? Because those alias' won't be on any other system you might use and it's easy to forget the syntax of the original commands they replaced. I especially don't recommend this for consultants and admins that work on a lot of other systems for this reason. It becomes a crutch that you will not have anywhere but on your machines.
However, I've posted this anyway because there are certainly cases where it's very useful. Just be careful to use them sparingly, only where necessary, and only on systems that you use constantly.

#Linux
https://opensource.com/article/17/5/introduction-alias-command-line-tool

Tuesday, 23 May 2017

Linux box won't boot? - Revive a dead grub with these tips

Linux box won't boot? - Revive a dead grub with these tips

If you use computers long enough that you've installed Linux on, you'll probably have this happen to you eventually. The easiest way in the past has been to try installing a dual boot Windows and Linux system and forgetting to install Windows first. However there are other ways it can happen
Here are several solutions, pick one and try it.

#Linux #Windows
http://www.linuxandubuntu.com/home/ways-to-rescue-or-recover-grub-menu

Sunday, 14 May 2017

Linux Tips & Tricks - Quick FFMPEG tutorial

Linux Tips & Tricks - Quick FFMPEG tutorial

So you want to do some quick operations on some video files and you don't want to deal with loading up some big GUI video editor package. No problem. FFMPEG can do a lot of basic (and not so basic) operations on video quickly and easily right from the command line. Want to convert from FLV to MP4? No problem. Want to scale a video's resolution? No problem.
https://www.ostechnix.com/20-ffmpeg-commands-beginners/

Linux Tips & Tricks - Deleting Huge Files

Linux Tips & Tricks - Deleting Huge Files

If you have a busy server, or just want to get on with using your desktop PC, some big file operations can take a long time. Use this great tip with any long file operation, not just deleting files.

https://www.tecmint.com/delete-huge-files-in-linux/#

Sunday, 7 May 2017

Learning Linux - A beginners guide to syscalls

Learning Linux - A beginners guide to syscalls

If you ever get into advanced Linux usage, you'll run across syscalls. Here's a start to learning about them.
Though I wonder if it's worth learning because no doubt effing systemd will replace them eventually, but for now you may want to get the basics down.
https://opensource.com/article/17/5/beginners-guide-syscalls

Saturday, 29 April 2017

Learning Linux - Mastering the Command Line: Comparisons in Bash

Learning Linux - Mastering the Command Line: Comparisons in Bash

At some point in your Linux journey you'll start creating shell scripts, and at some point in that process you'll find it necessary to perform logical comparisons. Is this bigger than that? Is that the same as this? And so on. Here's a tutorial to get you started.

#Linux #CommandLine #Sysadmin
http://www.linuxtechi.com/compare-numbers-strings-files-in-bash-script/

Linux Tips & Tricks - Monitoring disk space from the command line with ncdu

Linux Tips & Tricks - Monitoring disk space from the command line with ncdu

ncdu is a great tool for Linux users in general, but especially for sysadmins that administer machines remotely via ssh.
It's a way to view your systems disk usage in a semi-graphical way from a simple ncurses based command line tool.

#Linux #Sysadmin
https://www.ostechnix.com/check-disk-space-usage-linux-using-ncdu/

Sunday, 23 April 2017

Linux tips & tricks - Waking your Linux system from hibernation or deep sleep mode

Linux tips & tricks - Waking your Linux system from hibernation or deep sleep mode

This is a great trick to let your Linux system almost shut down and therefore save a lot of power and be secure, but still wake up and do what you want it to do at the appropriate time.
https://www.ostechnix.com/automatically-wake-linux-system-sleep-hibernation-mode/

Sunday, 16 April 2017

Learning Linux - Command line tips & tricks

Learning Linux - Command line tips & tricks

This article is worth reading just to learn pv. It's a great tool I've used for years to get some info on what's going on with long rsh/scp transfers, especially over slow remote connections.
https://www.linux.com/learn/intro-to-linux/2017/4/more-unknown-linux-commands

Wednesday, 12 April 2017

Linux command line - Having a little fun

Linux command line - Having a little fun

The command line isn't all work, there's fun stuff too.

#Linux
http://www.linuxtechi.com/12-interesting-linux-commands-make-you-laugh/

Wednesday, 29 March 2017

Improving Linux system security with Firejail

Improving Linux system security with Firejail

While Linux is fairly secure by default, no system it perfectly secure. When your system is going to be online, you need special protection and Firejail is one way to add some extra protection.
https://www.ostechnix.com/improve-linux-systems-security-using-firejail/

Tuesday, 28 March 2017

Thinking of moving to Linux? Here's some things you should know

Thinking of moving to Linux? Here's some things you should know

Between Microsoft's ongoing asshattery with Windows 10 and Apple's dumbing down of Mac OSX, many people are getting fed up and looking for alternatives. The choice many people are making is Linux. Here are some things you may want to know before you head down the Linux road.
http://fossforce.com/2017/03/four-things-linux-user-know/

Monday, 27 March 2017

Learning Linux, command line tips & tricks - Mastering the find command

Learning Linux, command line tips & tricks - Mastering the find command

If you've only used the GUI search functions of your desktop OS, you will be amazed at the power of the 'find' command on Linux and Unix.
It's extremely powerful and flexible and you won't know how you got along without it once you learn it.

#Linux

https://www.howtoforge.com/tutorial/linux-find-command/

Wednesday, 22 March 2017

Learning Linux - Alternative shells

Learning Linux - Alternative shells

A lot of people don't even think about what the Linux command line is or that there are multiple versions of it. But the command line interpreter, or shell, is just a program like any other and like most programs, there are alternatives to the default.
The truth is that even advanced Linux administrators rarely use much other than Bash, but it does pay to know the alternatives that are out there and a little bit about them, particularly if you'll be working with UNIX systems as well as Linux.

#Linux
https://www.maketecheasier.com/alternative-linux-shells/

Sunday, 19 March 2017

Pushbullet integration for Linux

Pushbullet integration for Linux

Pushbullet is a nice app/service, making it work fully on Linux is even better.
http://www.webupd8.org/2017/03/pb-for-desktop-cross-platform-desktop.html

Thursday, 16 March 2017

Linux Tips & Tricks - crontab generator

Linux Tips & Tricks - crontab generator

Now you should learn how cron works and how to generate entries, but on occasion you want to rig one up quick and don't want mistakes. Here's a nice site to help you out.
http://crontab-generator.org/

Friday, 10 March 2017

Learning Linux - Start from the beginning -- the command line

Learning Linux - Start from the beginning -- the command line

I'm always pushing for Linux users to develop their command line skills and I'm not the only one. The command line is where the real power is on most OS's and Linux in particular rewards those who master the command line.
http://www.linuxinsider.com/story/84356.html

Wednesday, 8 March 2017

Learning Linux - basic command line networking

Learning Linux - basic command line networking

Here are some of the most basic Linux networking commands that a beginning Linux user must know how to use.
https://www.rosehosting.com/blog/6-basic-network-commands-in-linux/

Saturday, 4 March 2017

Linux for sysadmins - 16 tools you should learn

Linux for sysadmins - 16 tools you should learn

This is a nice intro to some basic administration tools useful for server environments. These are text based tools because a lot of real world administration happens in a remote shell environment.

Note: just to amend Steven Vaughan-Nichols comment in the article regarding the great YaST2 admin tool available in SUSE products, YaST2 also operates perfectly well in a pure text environment and doesn't require a GUI environment.
https://insights.hpe.com/articles/16-linux-server-monitoring-commands-you-really-need-to-know-1703.html

Tuesday, 28 February 2017

Linux Tips & Tricks - mastering the command line - limiting the bandwidth of rsync

Linux Tips & Tricks - mastering the command line - limiting the bandwidth of rsync

If you've been using Linux seriously at all for any length of time, you're using rsync to copy, move, or back-up files. However sometimes for long remote transfers you don't want rsync hogging up all of your bandwidth. But you can force rsync to only use a portion of your bandwidth, allowing you to run it in the background while you carry on with your business.

#Linux

https://www.cyberciti.biz/faq/how-to-set-keep-rsync-from-using-all-your-bandwidth-on-linux-unix/

Linux Tips & Tricks - mastering the command line - reptyr

Linux Tips & Tricks - mastering the command line - reptyr

Ever start a process in a remote shell then have to leave but wanted to keep the process running? With reptyr you can just migrate the process from your computer to the remote system. Of course there are a 101 other great uses for this but that's for you to discover.

For OpenSUSE users, simply type the following to install (from a root shell):
zypper in reptyr
https://www.ostechnix.com/reptyr-move-running-process-new-terminal/

Sunday, 26 February 2017

Network bonding with Linux

Network bonding with Linux

Sysadmins have been using this trick for years to get their own, inexpensive, custom, high speed network links. A primary example is from a server to a NAS device. Or a server to a backplane switch that supports bonding.
These days there are even ways to bond ISP connections to increase bandwidth if you're lucky enough to have an ISP that supports bonding.

So read on and find out how to do network bonding on Linux.



#Linux #sysadmin #Networking
http://kerneltalks.com/other/network-bonding-teaming-configuration-in-linux/

Tuesday, 7 February 2017

Learning Linux - Command line skills: Deleting a command from your bash history

Learning Linux - Command line skills: Deleting a command from your bash history

Every Linux pro lives in their Linux shell history, it makes repetitive processes fast, easy, and accurate. However, there are plenty of times when you use a command that you really don't want in your history file. For example, suppose you had to use the dreaded rm -Rf . at some point? You certainly don't want that hanging around in your history where you may accidentally re-run it.
The problem is you don't want to just delete your whole shell history either. Well here's a tutorial on deleting specific lines from your bash history.

#Linux

https://www.ostechnix.com/clear-specific-command-bash-history-linux/

Monday, 6 February 2017

Shorewall Firewall configuration tool for Linux

Shorewall Firewall configuration tool for Linux

Shorewall is a great way to do your own detailed, customized, firewall configuration. Just make sure before you use it that your distro doesn't have it's own, pre-loaded firewall configuration tool installed and already managing your firewall settings. OpenSUSE for example has it's own so read the OpenSUSE docs on how to properly disable it.

This would be especially handy for small, single purpose Linux system, eg a RasPi based firewall, but it's also a good tool for larger firewall setups too.

#Linux #Security #firewall
https://www.linux.com/learn/security/2017/2/introduction-shorewall-firewall-tool

Thursday, 5 January 2017

Linux to the rescue! - Recover "lost" photos from memory cards

Linux to the rescue! - Recover "lost" photos from memory cards

We've all been there. Maybe you accidentally deleted more pictures than you meant to from your camera, or maybe the card got corrupted. Maybe you formatted it by mistake. Whatever happened, it can be heartbreaking and devastating depending on what was stored on the card. Some photos are just irreplacable. Weddings, vacations, and many other events with sentimental value. Or photos with monetary value if you're a pro photographer.
Luckily Linux can help. Because it's designed to let users and programmers do advanced things easily, Linux is a host for a plethora of great tools and utilities to fix and recover things from all manner of devices, even if those devices were used on other platforms.
So always keep at least a Linux rescue disk or USB stick on hand, because it may just save the day.

Here is just one of the amazing tools available on Linux for data recovery. Photorec.

#Linux   #DataRecovery   #Photography  
http://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/