Linux, Unix and BSD: Tips, Tricks, Useful Commands and Interesting ways to get things done! Share your knowledge!

Recommended Posts


When I get off of The TP Program in June or July, I am going to give Linux another shot. Not sure how it would boot with Win 10 and I do not want to do it while I am Testing Previews.

Link to post
Share on other sites
  • 2 weeks later...

check the status of your bios/mainboard battery with the following command (can be run without root privileges)


[~] cat /proc/driver/rtc | grep batt_status                            15:15:35 
batt_status     : okay

if it says not okay but dead you better exchange it asap. 

  • Like 2
Link to post
Share on other sites
Unobscured Vision

Next couple of Tips N Tricks articles are forthcoming ... you folks are gonna love these. :yes: I'll post them as time permits (starting College Term #2 this week). Shoulder is doing a bit better too, thankfully. Maybe I'll escape another surgery after all.

Link to post
Share on other sites
Unobscured Vision

Get a Canon Multifunction (All-In-One) Printer/Scanner/Copier Working:





This one was a real problem, up until I ran across a very obscure (and actually quite simple) procedure. Thought I'd pass this one along. Hope it helps someone else. The reason the fix eluded me was primarily because the Proprietary blobs are available for my device, but aren't listed as such for my very common model (Canon-MG-2970, also called a Pixma-2970). The Printer part of the driver? No problem getting that working. The Scanner part was a different story entirely; for weeks I was banging my head against a brick wall trying to get it working. No solution worked, until I tried (literally!) "Door #3 -- the 'this is what the Simple-Scan and the SANE routines should have been doing from the start, but aren't doing for whatever reason!'" solution. To my utter shock and complete amazement, the Scanner which thus far had been totally non-compliant was working -- and working BETTER than on Windows! HUZZAH! The obscure reference about invoking scangearmp2 from the command line had worked!


So here's how I got it installed and working:


The difference is that instead of following the VERY convoluted and INCORRECT instructions about installing SANE and Simple-Scan, which will result in nothing working except the Printer part; we install the Proprietary Debian Printer Driver (called "cnijfilter") then the Scanner Driver (called "scangearmp2") manually. Download each of the drivers from Canon-Asia (link to the website above), agree to their T&C. Open Terminals in each archive after decompressing, run the ./ files for each as sudo. The only real constraint is that you should probably install the Printer Driver (cnijfilter) first to get the device registered with the system, and that I didn't have any luck getting it working wirelessly so you'll need to connect it via USB cable. After we install cnijfilter, install scangearmp2. Afterwards, make a launcher in whatever way works best for you (I use Linux Mint/Cinnamon, so I had the use of a GUI Menu Editor available) to create a launcher for "scangearmp2". That's the actual application we use to scan with, too.


Your results may differ according to Model, but generally the instructions should work for all Canon Multifunction Printer/Scanner/Copiers.


Good luck!

Edited by Unobscured Vision
  • Like 1
Link to post
Share on other sites
Unobscured Vision

Sadly, my next article for the Tips N' Tricks thread "Install an OS (including Windows) using an ISO from Hard Disk via GRUB" has run into a major snag; meaning that the information and procedures are woefully convoluted, tangled, and don't always work. The major factor is the ISO preparation (for whatever reason, which makes no sense to me). Windows, oddly enough, is pretty forgiving and installs relatively fine -- it's the LINUX Distros that are the problem! Imagine that.


And bear in mind that it isn't the "stock" Distros -- Ubuntu, Debian, Red Hat, they're straightforward. It's the more "specialty/derivative" ones that put up a fuss. Mint, for example, has one of the more oddball setups I've ever seen. Why? Who knows. Might explain why LM 17.3 is impossible to get onto a USB Stick cleanly. I've always, always had to use 17.2 and then upgrade ... 


still want to do this article .. just not sure how to go about it. Until then, it's delayed. Apologies to all.

Link to post
Share on other sites
Unobscured Vision

Get newer Nvidia binary Drivers sooner on currently supported Debian, Ubuntu, Debian-derivative and Ubuntu-derivative Distributions:

(Credits go to @Boo Berry for this one.)



Background and Purpose:

Generally we all like having the latest driver for our GPU. Bugfixes, new/improved features, better performance; the list goes on. While we generally can deal with the drivers we've been offered, there are occasionally issues -- most often when new cards are released that the old drivers don't support properly (if at all), or when we're using an LTS release and those old drivers don't get updated for two years ... Case and point, Linux Mint. Great Distribution, large following -- but much to our eternal sadness their hands are tied. They can't offer driver updates because that's Ubuntu territory and they can't pre-add PPA's to the sources list because it violates some kind of licensing with Ubuntu ... ugh. Who knows.


So, users are left to deal with the problem themselves when getting newer hardware. Either switch to Ubuntu's non-LTS releases or "find our own drivers". In the past, that option was limited to the Xorg-Edgers PPA; and their offerings weren't always completely reliable or up-to-date. They did try, though.


Now there's another option that is much more current, and receives far more benchmarking and testing. Problems are addressed immediately and fixes are pushed to users as quickly as they have been tested and found to be good to go.


Currently, the Graphics-Drivers PPA Team is only doing Nvidia Drivers for now. Hopefully that will change in the future.


Enough talk! How do I install the new hotness?

In your Terminal:

sudo add-apt-repository ppa:graphics-drivers/ppa

Press Enter to add it after the obligatory text about what the PPA contains. Then issue the command:

sudo apt-get update

At this point, you can either fire up your Driver Manager (Linux Mint Cinnamon and MATE or any other Distro using Driver-Manager) or the Drivers tab in Software and Updates (Ubuntu and derivatives); or (Debian users will most likely need to do it this way) via the open Terminal (replace the '364' with whatever version is current now ... check the above link. They'll have it there):

sudo apt-get install nvidia-364

Press 'y' to accept the changes, wait for everything to install, restart.


Please note that it is possible that some users of the Geforce GTX 900-series cards will need to enter 'nomodeset' to GRUB options when loading their Distro. I say 'possible' because some do, and some don't. There's something else going on with that particular issue that I haven't been able to replicate (sorry @T3X4S). Is it different combinations of chipsets and CPU's and GPU's? I've no idea.

  • Like 2
Link to post
Share on other sites

it might also be suggested to disable the ppa afterwards to avoid potential security risks.  i don't know a case yet where malicious software got installed due to an optional ppa and i had many enabled in my ubuntu days, however at the end, i also disabled them after they did their purpose. plus, sudo apt-get update will be quite faster when it does not have to read many ppas. 

  • Like 2
Link to post
Share on other sites
Unobscured Vision
8 hours ago, T3X4S said:

Thanks for the tips.

For my end, not a problem. Sorry I wasn't able to track down what's happening.

8 hours ago, Simon Lang 9047 said:

it might also be suggested to disable the ppa afterwards to avoid potential security risks.  i don't know a case yet where malicious software got installed due to an optional ppa and i had many enabled in my ubuntu days, however at the end, i also disabled them after they did their purpose. plus, sudo apt-get update will be quite faster when it does not have to read many ppas. 

That's not a bad idea; however I prefer to have updates across-the-board. The nvidia-364 driver is a little on the flaky side, and needs some further optimizations. I might revert back to the one I was using before if things keep up the way they are.

Link to post
Share on other sites
  • 1 month later...

if you have got one of these top notch laptops where windows just would not let linux dualboot even if you set UEFI correctly in BIOS and have turned off secure boot, here is your help:



bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

this magic code did the trick for me. 

  • Like 1
Link to post
Share on other sites
  • 10 months later...

Just to push topic ahead, i'd like to mention useful utility unshare: sometimes it's very needful to block any network activity for given app ==>> unshare -n --user opera --no-sandbox


ah, that's russian :) would you like to change locale?  ==>> LANG=en_UK.utf8 unshare -n --user opera --no-sandbox


for some apps, var LANG doesn't work well or doesn't run at all, so use LC_ALL.

Link to post
Share on other sites
  • 4 weeks later...
Unobscured Vision

How to deal with a hibernated NTFS drive or partition:





You've installed Linux after using Windows 8 or 10 and you attempt to mount your NTFS-formatted partition(s). You're presented with an error message that reads (for example):

Error mounting: mount exited with exit code 14: Windows is hibernated, refused to mount.
Failed to mount '/dev/sda5': Operation not permitted
The NTFS partition is hibernated. Please resume and shutdown Windows
properly, or mount the volume read-only with the 'ro' mount option, or
mount the volume read-write with the 'remove_hiberfile' mount option.

In essence, the filesystem is in a hibernated (locked) state. Frozen. (Let it go ... let it gooo .... darn it, now that stupid song is in my head. :laugh:)



There's an easy way to unfreeze it. No fuss, no muss -- although the Terminal output will suggest otherwise, things are gonna be okay. -ish. Nah, just kidding. All is well. :yes: 


Step 1: Fire up the Terminal.

Step 2: Type in the following and hit Enter:

sudo ntfsfix /dev/sdc1 (for example -- whichever drive or partition is hibernated)

(The Terminal output will complain about it being an unclean filesystem, etc etc ... yeah, we already know.)


Things should be fine now. It won't take any time at all to complete. You can mount the location normally, or use udiskctl to create your startup mounts. Whatever floats your boat.

  • Like 1
Link to post
Share on other sites
Unobscured Vision

The "Easier Way" to handle Filesystem Mounts at Startup:

(Updated from: Forum post: Mount a local Hard Disk/Partition at Login instead of at Startup)


Some time ago, I described a safe way for a user to automount Hard Disks and Partitions at login rather than at system start that won't hose your system if one or more of these filesystems aren't available. Over the course of time, it occurred to me that I was actually making the process more difficult than it needed to be.


Instead of using archaic "crypto-speak" which makes things harder, I'd forgotten that we can reference our disks and partitions by label. Furthermore, we can mount those items in the same manner. And chances are we'll even remember the names of our items too. Better this way, all-around. :yes: 


So. Let's get to it.


Step 1We still need the Terminal. Fire it up. Issue the command:

ls -al /dev/disk/by-label

You'll get something like this:


Now you've got your proper labels for the disks and partitions. Easy peasy.


Step 2: Go into your Control Center -> Application Autostart. Add a new entry. If it asks, you're looking for 'custom command'.


Your command will be:

udisksctl mount --block-device /dev/disk/by-label/<label>

Where <label> is the label of the disk or partition you'd like to have automounted when you log in. In my example, my commandline would read:

udisksctl mount --block-device /dev/disk/by-label/Storage

Step 3: Give it a name that you want the autostarted command to be known by, and click ok.


Step 4: Rinse and repeat. :)


And yes, it's really that easy. Enjoy!

Link to post
Share on other sites

Is there a "hard way", too? :laugh:


  • Like 1
Link to post
Share on other sites
Unobscured Vision
14 minutes ago, Mindovermaster said:

Is there a "hard way", too? :laugh:


Yes. Several. :laugh::rofl:

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By zikalify
      Ubuntu 20.10 ‘Groovy Gorilla' is available to download now
      by Paul Hill

      Canonical has announced the immediate availability of Ubuntu 20.10 ‘Groovy Gorilla’. While this version is considered stable and fit to be run as a daily driver, it is not a Long Term Support (LTS) release and will therefore only receive security updates for nine months.

      The new version comes with a variety of new software including Linux Kernel 5.8 and GNOME 3.38. Developer tools such as programming languages and compilers have also received updates - this release ships with glibc 2.32, OpenJDK 11, rustc 1.41, GCC 10, LLVM 11, Python 3.8.6, ruby 2.7.0, php 7.4.9, perl 5.30, and golang 1.13.

      Another notable point about this upgrade is that Canonical has spun a new desktop image aimed at Raspberry Pi 4 devices that have at least 4GB of RAM. Raspberry Pi’s new Compute Module 4 is also supported by the Groovy Gorilla but you’ll need to have 4GB of RAM and 16GB of eMMC or equivalent SD card storage.

      Those who want to download and try the new version can download it from the Ubuntu download page. If you’re running Ubuntu 20.04 LTS and want to upgrade you’ll need to open Software & Updates, head to the Updates tab, and change the Notify me of a new Ubuntu version drop down to For any new version. From there, open the update manager and you’ll be offered the upgrade.

    • By Abhay V
      Microsoft finally brings its Chromium-based Edge in preview form to Linux
      by Abhay Venkatesh

      Microsoft today announced that Edge is finally available for download on Linux. The Dev channel version of the Chromium-based browser makes it to the platform almost a year after the official announcement and as promised last month.

      The Redmond giant says that the release supports Ubuntu, Debian, Fedora, and openSUSE distributions. The browser will be updated weekly, just like the Dev channel builds on other platforms. The company has also posted instructions for the process of installing the packages on various distributions using their standard package management tools, for those interested. However, the easier way is to download and install the .deb or .rpm packages from the Insider website here.

      As for features, the company is “aiming to provide a representative experience for developers who want to build and test their sites and apps on Linux”. The preview release for Linux currently does not feature many user-facing features such as support for signing into Microsoft accounts – which means that there will be no sync capabilities. However, the company does promise to release these features with a future update.

      Considering that the release is still in early development, the firm cautions that there will be many “bugs and unexpected behaviors“ and urges developers to send feedback through the browser. Lastly, the company is also accepting submissions for the Microsoft Edge Bounty Program on Linux for security researchers.

      With the addition of support for Linux, the Redmond firms offering is now present on all platforms that support Chromium.

    • By News Staff
      Get the Complete Computer Networking eBook & Video Course Bundle for only $29.99
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store where you can save 95% off this Complete Computer Networking eBook & Video Course Bundle. Attain systems efficiency & security with 14+ hours of video content and 5 comprehensive e books on DevOps, Programming, AWS, CCNA, and more.

      This bundle consists of the following courses:

      The Ultimate Kubernetes Bootcamp by School of Devops [Video]
      Prepare for the CKA Exam — Master Container Orchestration with Kubernetes One Step at a Time AWS Certified Advanced Networking: Specialty Exam Guide [eBook]
      Build Your Knowledge & Technical Expertise as an AWS-Certified Networking Specialist Hands-On Network Programming with C [eBook]
      Learn Socket Programming in C & Write Secure and Optimized Network Codes Analyzing Network Traffic with Wireshark 2.6 [Video]
      Delve Into Network Traffic & Analyze Individual Protocol Data Units Active Directory Administration Cookbook [eBook]
      Actionable, Proven Solutions to Identity Management & Authentication on Servers and in the Cloud Hands-On PowerShell for Active Directory [Video]
      Use PowerShell for Active Directory to Eliminate Manual Labor with Quick Automation Tasks & Functions Effective Jenkins: Getting Started with Continuous Integration [Video]
      Learn Continuous Integration, Automate Your Jenkins Projects & Get Continuous Feedback for Your Upstream/Downstream Projects Hands-On Kubernetes Networking [Video]
      Unravel the Mystery of Networking in Your Kubernetes Cluster in a Pragmatic Manner CCNA Cyber Ops SECOPS: Certification Guide 210-255 [eBook]
      Develop Your Cybersecurity Knowledge to Obtain CyberOps Certification Hands-On Linux for Architects [eBook]
      Design & Implement Linux-Based IT Solutions Good to know
      Updates included Length of time users can access after purchase: lifetime Redemption deadline: redeem your code within 30 days of purchase For a full description, specs, and author info please click here.

      Here's the deal:
      This Complete Computer Networking eBook & Video Course Bundle normally costs* $746 but it can be yours for just $29.99 for a limited time, that's a saving of $716.01 (95%) off the price.

      >> Get this deal, or learn more about it here <<
      See all Online Courses on offer. This is a time limited deal.
      Get $1 credit for every $25 spent · Give $10, Get $10 · 10% off for first-time buyers.

      Not for you?
      If this offer doesn't interest you, why not check out the following offers:

      The Win Your Dream 2020 Tesla Model 3 Giveaway
      The Nintendo Gaming Bundle Giveaway 20% off Ivacy VPN subscription with coupon code IVACY20 NordVPN subscription at up to 68% off for a 2 year plan Private Internet Access VPN subscription at up to 71% off Unlocator VPN or SmartDNS unblock Geoblock with 7-day free trial Disable Sponsored posts · Other recent deals · Preferred partner software

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By News Staff
      Linux Administration Cookbook (normally $35.99) - free offer ends today
      by Steven Parker

      Claim your complimentary copy (worth $35.99) for free, before the offer expires ends today Oct 6.

      What's it about?
      Insightful recipes to work with system administration tasks on Linux.

      Linux is one of the most widely used operating systems among system administrators, and even modern application and server development is heavily reliant on the Linux platform.

      The Linux Administration Cookbook is your go-to guide to get started on your Linux journey. It will help you understand what that strange little server is doing in the corner of your office, what the mysterious virtual machine languishing in Azure is crunching through, what that circuit-board-like thing is doing under your office TV, and why the LEDs on it are blinking rapidly.

      This book will get you started with administering Linux, giving you the knowledge and tools you need to troubleshoot day-to-day problems, ranging from a Raspberry Pi to a server in Azure, while giving you a good understanding of the fundamentals of how GNU/Linux works.

      Through the course of the book, you’ll install and configure a system, while the author regales you with errors and anecdotes from his vast experience as a data center hardware engineer, systems administrator, and DevOps consultant.

      By the end of the book, you will have gained practical knowledge of Linux, which will serve as a bedrock for learning Linux administration and aid you in your Linux journey.

      This free offer expires on October 6.

      How to get it
      Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last!

      >> Linux Administration Cookbook ($35.99 Value) - free download <<
      Offered by Packt Publishing, view their other free resources. Expires 10/06/20.

      Not for you?
      That's OK, there are other free eBooks on offer you can check out here, but be aware that these are all time-limited offers. If you are uncomfortable sharing your details with a third-party sponsor, we understand. Or via our preferred partner:

      How can I disable these posts? Click here.

      Disclosure: A valid email address is required to fulfill your request. Complete and verifiable information is required in order to receive this offer. By submitting a request, your information is subject to's Privacy Policy.

    • By eRajesh
      The best hidden Gboard features that you must know about
      by Rajesh Pandey

      Gboard is one of the most popular keyboards for Android devices right there and rightfully so because of the sheer number of innovative features it packs. The keyboard is also a perfect example of how virtual keyboards for today's smartphones are more than just a keyboard with the amount of functionality they pack.

      If you have been using Gboard only for typing out messages and emails so far, you have been using it wrong then. You can use the keyboard for quick Google search, translations, adding GIFs, and do so much more. Below is a look at some useful Gboard features that you might not know about and which will help improve your overall typing experience.

      If you use SwiftKey, you can read about some of its hidden features here.

      Custom mini stickers

      Forget emoji and GIFs. You can create custom "minis" stickers based on you in Gboard as well. Simply tap the sticker button in Gboard's toolbar, scroll to the right in the toolbar and tap on the cog (Settings) button. Then go to the Browse tab and select the option to create your custom "minis" in the banner at the top. You will then have to click a selfie and then wait for a few seconds for Gboard to create the custom mini stickers.

      Quickly add punctuations

      You can quickly add punctuations other than a comma or full stop by simply long pressing on the full stop button. A list of the most common punctuations will then pop up and you can slide your finger to select the one you want to use.

      Switch to one-handed layout

      The displays on Android smartphones are getting taller and wider which makes one-handed typing on them a frustrating experience. Gboard does come with a one-handed layout that you can use in such situations though. You can easily activate one-handed mode in Gboard by long-pressing the "," button and then dragging your finger to the second icon you see. Once activated, you have the option of moving the keyboard to the left or right edge of the display as per your requirement.

      Delete words using a gesture

      Want to quickly delete a word or a sentence that you just typed? No need to repeatedly press the backspace button. Instead, you can just swipe to the left from the backspace button to select the text you want to delete. The longer you swipe, the more words will get selected and they will be automatically deleted once you lift your finger from the display.

      In case you change your mind and want to keep the sentence or word you just deleted, Gboard will automatically show you the deleted word or sentence as a suggestion.

      Translate text easily

      With Google Translate integration in Gboard, you can easily translate text on the fly without having to leave the current chat window or text compose window. Simply tap the Google Translate icon in the Gboard toolbar and proceed to enter the word or sentence that you want to convert. Gboard can automatically detect the language that you are entering and convert it into a language you want, though you can select the input language manually as well.

      Use the keyboard as a trackpad

      You can use Gboard as a trackpad as well to quickly move the cursor where you want while formatting or editing text. On iPhone, you need to long-press on the spacebar and then drag your finger around to move the cursor. Gboard has a similar implementation as well. Simply long-press on the spacebar and then drag your finger around to turn the keyboard into a virtual trackpad and move the cursor around easily.

      Add fractions easily

      Want to quickly add a fraction? Simply long-press on the number and Gboard will show a list of common fractions that you can add easily.

      What are some of your favorite Gboard tips and tricks? Drop a comment and let us know!