Bring Your Linux Knowledge Up with Required Command Line Settings | Rob Braxman Tech

Categories
Posted in: News, Patriots, Rob Braxman Tech
SPREAD THE WORD

BA WORRIED ABOUT 5G FB BANNER 728X90

 

Summary

➡ This Rob Braxman Tech article explains the importance of switching to Linux for privacy reasons, despite its complexities. It provides a tutorial on how to use the command line in Linux, navigate directories, edit text files, and understand the structure of Linux’s folders. It also guides on how to format storage devices using exfat file system for compatibility with other operating systems, and how to ensure these devices are always pre-mounted when the computer is turned on. The article is targeted at new Linux users, particularly those using Debian-based systems like Ubuntu, Mint, Pop OS, and Zorin.
➡ This text explains how to install apps on Linux, a process that can be confusing due to the many methods available. It covers five ways to install apps, including using the command line, Snap and Flatpak package installers, downloading a .dev file, or using an app image file. It also explains how to create icons for apps, which is not always provided on Linux distributions like Ubuntu. Lastly, it discusses the use of .sh files, which are bash scripts that manage the installation process.
➡ You can give files execute permissions in Linux either through the files app or using a command line. Installing a VPN on Linux is simple, just download the OvPN file from your VPN provider and import it from your downloads folder. However, setting up OpenVPN to start automatically is more complex and not recommended for average users. The author also mentions a privacy-focused company they started, offering products like virtual phones, no-metadata email services, and VPN services on their platform, Braxme.

 

Transcript

I’ve already explained to you in prior videos why it is critical to move to Linux. I’ll just restate it in one sentence. Only Linux can offer us privacy. Other operating systems are inserting privacy invading features constantly that we have to avoid at all costs. However, switching to Linux always has complications. You need to be able to do things that are trivial in windows, but are very complicated in Linux. You will need to use the command line. No escaping that unless you are a browser only type of user. So today I will give you some really common but critical things you need to do in Linux, and I will show you how to do it using a command line.

This stuff will trip up even someone who’s already exposed to Linux. These are the kinds of questions that will get you nasty responses from Linux experts. So we will avoid those folks and explain it here. Ready to take notes? You will need to. And when you’ve got your notepad, stay right there. This tutorial will be targeted to someone who just moved to Linux, has some idea of what’s going on, perhaps from Windows, but will likely be searching the interwebs for solutions that I will discuss here. I expect that most new users will be on Linux distros that are Debian based, so that will be our premise.

Examples of this are ubuntu, mint, pop os and zorin. So that’s the target audience. Bear in mind that methods I will explain may be different for arch, Rpm or other non debian based distros. I will always recommend that new users stick to Debian based systems. Otherwise you will likely be confused by instructions since they may be different. Most of the stuff we will do today requires the use of terminal which you will find in the show applications window. We will be typing commands in the command line on terminal. That’s the terminology, since it is used frequently.

I will typically add terminal in my favorites taskbar. I’m just going to go through this extremely quickly. More like a review in terminal to navigate through the different directories, which is a tree structure. The command is Cd directory and just specify the tree hierarchy using the forward slash like cd home worker documents, which goes down three levels. This is the same in windows, except in windows. The slash is a backslash. Ls l lists the files in the directory. Here’s a quick example. Cd home username this is your home directory, by the way, and my username here is worker.

Now here’s a shortcut to access your home directory cd squiggly character now let’s edit a text file. To do that we just use the program called nano. The syntax is sudo nano filename examples sudo nano squiggly document test txt and now we have a blank document. Type some stuff, then use control o to save and control x to exit or change directories first and then use nanowithout a directory. As I show here. Cd squiggly documents pseudo nano test txt same thing sudo in front of a command ensures you have root rights. Some commands will fail if you have no rights.

That’s why you always see sudo. In Linux everything is really a directory. There are no drives or special area for drivers or devices. Everything is in a directory. As you can see here. I’m using the term directory, but the user friendly term is folder, so these terms are interchangeable. Let me switch to calling it folder. These folders can be accessed via the files app. In Linux, each folder is given a specific purpose. I’m just giving these examples as these are the ones we’ll be working on today. So for example, all devices are in slash dev. Most system setup is done in Etsy and user files are in home which also has documents, downloads, music, pictures, videos and most apps are installed in some of the bin folders, which by the way means binary.

All app icons are in user share applications. The reason we do not use the files app for system changes is that files does not get pseudo rights, so this is why we use the command line if that permission is required. Now here’s a trick to use both file manager and terminal simultaneously. This will avoid having to use cd and it’s just faster navigation. Let’s go to your files app and right click on any empty space and open terminal and you will be in the current directory in that session wherever files app happens to be pointed to.

For this example, I’m using an SD card that I inserted into my laptop. By default, SD cards are pre formatted to use the Fat 32 file system. This has space limitations and is not suited to hard drives. So the best file system that is compatible with other operating systems and can be used on large storage devices is called exfat. We can use exfat for any secondary storage device, but on Linux the main partition has to always be the ext four file system, so you can’t use exfat on everything. But if we format using exfat then it can be read by both Linux and Windows.

If you’re doing dual boot with Windows, for example, this will make your experience less error prone. Then using other file systems like ntfs, the first command will show the storage devices currently available on my computer, lsblk l e seven. As you can see here, my system is fairly complex. I have a USB stick, an SD card, an SSD drive, and lots of partitions in each. First you will see storage devices prefixed with SDA, as shown here. In this case, mine is a USB stick. Other devices, like magnetic disks, will often use SDA or SDB and so on as prefixes.

Those devices marked as MMC are typically SD cards, and NVMe is an SSD flash drive. So just look at the first part of the name as a clue. If you’re confused as to which is which, just look at the sides of the disk and that may give you a clue. For example, I see a device that starts with the name MMC and is approximately the same as the 64 gb card I have in my slot. Also note that each drive is listed, and then separately each partition is listed. This is something basic, even in Windows. Storage devices may have multiple partitions, but we won’t get into that.

When you buy a fresh disk or SD card, it will have one partition. Just look at the list and you will see that there are items marked as disks and ones marked as partitions. By the way, in Windows, each partition is just assigned a drive letter, often starting with C. So in this way Windows is easier, but Linux has more flexibility, especially with more complex configurations. Formatting is always targeted to a partition, so just pick the partition you need to work with that you want to format. In this case, I will format the SD card, which is Mmc block zero disk, and then specify the first partition.

So Mmc block zero p one the p one indicating the first partition. Now let’s format it now with this command. Sudomkfs exfat n mysd card slash dev Mmc block zero p one you will see here that the device name is appended to dev, which indicates that you’re referring to a device. The optional n gives a name to the mediaev, and in this example I called it my SD card. If the mkfs command is not found in your system, then install it with this command. Sudo apt y install util linux this is such a common request, and it’s so trivial on Windows.

In fact, in Windows you do nothing special. You install your hard drive and assuming it’s partitioned and formatted correctly against something Windows users know about, it just works. But on Linux it doesn’t just work. By default, devices need an extra step called mounting. If you don’t mount a device, it’s not visible. What we will do now is to always make sure that when we turn on our computer, the storage device always pre mounted. In this example, we are presuming that your storage partition is formatted using exfat. As I explained before, the very first thing we need to do is to find the unique identifier of our storage partition, which is called a Uuid.

The easiest way to do this is lsblock FDA e seven, which shows this. As you will see here, all the devices are listed, but there is a column marked uuid. In my particular case, the uuid of the MMC block zero P one device is shown here, so make a note of your uuId because that’s the partition we will mount. Now run this command sudo nano etc Fstab and you will see the nano editor with the fstab contents. Fstab is the file system mounting instructions for Linux. You will then paste the text I’m showing here as one line on fstab.

The uuid is my own and that will be different for you. Username is your username and will of course also be different for you. And the folder I show as home username documents SD is where I choose to place my device, which is again up to you. Now the rest of the values here should just be taken as is. This should work for most scenarios, so just copy it exactly. I like to put my devices in my documents folder because it is always accessible and easy to find in the files app. Now in order to mount this device into that folder called SD, it must exist.

Currently it does not exist, so the final step is to go to files and make the SD folder in documents and we’ll just use the files app or via command line. It is makedir home username documents slash SD. Then the only thing you need to do here is reboot and then you should see the new drive or SD card in your documents SD folder installing app should be trivial, as it is with Windows, but it’s not on Linux. There are so many ways of installing apps and it is really difficult to figure out because no one explains it to you, not even the app developers who give you a download.

So we’re going to talk about five ways to install apps and then also show you how to make icons for the apps, since that is not always provided on distros like Ubuntu. Many apps are available on the Ubuntu store or whatever the store is for that particular distro. In my case it’s the pop OS store, but I usually don’t rely on the store as the version may be slightly different, so I go to the website of the app developer to see what their instructions are. But a common example is where the app developer tells you to use the command sudo apt install and then whatever their app name is.

Here’s an example using brave browser sudo apt update Sudo apt install brave browser so that’s simple enough, but there are assumptions made here. This assumes that the developer has the latest version of their software on the apt repository of Debian. What’s happening here first is that the update command refreshes the software index from that apt repository which is managed by Debian. This is important to get the latest version. Then the install command downloads the file and installs it. A repository is like a store where developers will place their code and each major Linux distro maintains such a repository.

The Debian one is called apt advanced packaging tool. The problem is that some developers will keep their stuff in their own repository, or you have additional stuff being done and then you get new strange commands just to teach you something for your own basic understanding. If you go to the etc apt folder and open the sources list file, you will see the repositories preloaded on my disk drop. If a developer wants to point to their own repository, they will give a command to update the repositories with a command like this sudo add apt repository and then the location and this will update the sources list file.

I’m just showing you this as an example. Each developer may add repository that’s in a different format, but this will be in the app’s installation instructions and this just updates the sources list file. There are two popular package installers in Linux. One is Snap and the other is flatpak. Sometimes the developer will include a snap option and this is common for Ubuntu. The snap packaging was created by Canonical, the developers of Ubuntu. If you install an app from the Ubuntu store, these will be snap packages. You can install snap packages from a command line like this.

Sudo Snap install Firefox using a Firefox example again, you’re just following the instructions of the developer. If they have a snap option, then this is all it takes to install it. Some people like to use snap and some don’t. If it’s an isolated app, then snap is usually fine. If the app has to interact with the system, then usually snap is not the best way. In any case, the app developer will tell you how they want it installed. What’s unique about snap packages is that they’re self contained so they don’t interact with other existing software on the system.

This makes them reliable when there are versioning issues. Now flatpaks are similar to snap, they’re also self contained. Their command is very similar. Flatpak install firefox but to set up flatpak requires lot of commands that you need to run once and here it is. To be honest, I never use flatback because these commands were never handy. But now I’ve made it handy for you. So just cut and paste. Sometimes the app developer will just give you a dev file to download and of course a Windows user will just click on this expecting something to happen. Nothing will happen.

This is because this is just a packaging of an app that is exactly in the same format as you would find in the Debian repository. It just needs an installer. You could use file manager and select open the file with other application and then select software installer and that will install it. This is something most new Linux users do not know. The depth file is actually the same format used by apt when it downloads from the apt repository. So you can also from the command line just use apt install like this sudo apt install and then the dev filename.

Thus a dev file is just being given to you directly and is bypassing the repository. This can be dangerous if taken from an unknown source. So some developers like Firefox want to check it against a signing key. Here’s an example of the complex instruction from Firefox. So here the developer is asking you to set up a signing key. You just cut and paste the tedious instructions to the terminal. So absolutely no memorization is involved here. But it is overwhelming to see so many commands. So if there’s an option to not use a raw dev file, then that would be a safer method and usually easier.

A developer may provide a software as a file with an app image extension and you download this and click on it and nothing happens. More Linux confusion. Now this one is actually simple at first, but needs extra steps because by default the app has no icon to click. I’ll deal with the icon later. In the meantime, the easiest way to make an app image active is just to go to files, find the appimage file in your downloads folder and then activate the execute permissions. And then when you click on the app image file in files it will actually run.

Now the interesting thing about an app image is that the whole software is in this one file. This makes it very easy to manage. It is self contained like a snap package and doesn’t require other apps to run here’s the important tip, you do not want to leave your appimage file in your downloads folder officially. Documentation for Linux recommends that the app image files be moved to the opt folder. However, this is not easy to access and is not really necessary if you’re the only user. My method is to just make an apps folder in home and copy it there, and that’s where I put all my appimage files.

Assuming they’re given app execute permissions from files, it will be easy to find and easy to run. The problem with appimage files is that they do not come with any icons. So here we are left with another manual command line process to create this icon. Icons are useful because they allow you to put an application in your favorites taskbar and it allows you to find it in show applications. So let’s show you how to make an icon. Desktop icons on distros like Ubuntu are kept in user share applications. So if you list the contents of your applications folder, you will see a list like this and this will match all the icons in your show applications window.

For this example, we will create an icon for the App Keepass Exe appimage, which is my preferred password manager. As I said, to create an icon I can just use Nanod to make a text file with the name Keepassxe desktop or the name of the app desktop and then the format of the contents is shown in the example here. The important thing here is the location of the appimage file which I specified in the exec area. As I explained, I tend to keep my apps in my home apps folder and separately I downloaded some icon from the Internet in PNG format and put it with the app image also in the apps folder.

Search the Internet for a ping icon file for the app in question and you will find one or just use any other icon after you save this file. You will now see that the icon will be callable from the show applications area in your distro and if I search for it I can then add it to my favorites taskbar. Some developers will just give you an sh file which means it’s a bash script and this will be something you just execute and it manages the installation. This is the same concept as the Windows batch file. The only important thing here is that by default an SH file will not automatically run.

You have to give it execute permissions just like I described for other files before. You can do it in the files app, but just as an advanced technique you can also give execute permission via command line using this command sudo chmod x and then the file name of the sh file. Of course specify the proper location and folders of the file name. Then you can execute an. Sh file from that folder like this slash and then the file name of the. Sh file. The is there to prevent Linux from searching everywhere for this sh file. This will execute the one in the same folder.

Installing the VPN on most Linux distros is extremely easy nowadays. All you need really is the OvPN file from your VPN provider. Download that and it should be in your downloads folder. The reason it is super easy is that the OpenVPN is pre installed on all popular Debian distros that I’m aware of. I tried them all. In fact it was installed in most arch and rpm distros as well. To access it I just go to settings network and you will find VpN settings. Then there is a plus sign on the upper right hand corner. When you tap on that you get the option import from file.

Then you find your Ovpn file in the downloads folder. After selecting the Ovpn file it will pre fill your entries as shown here and you do not need to do anything else other than put in your username and password and hit add. Then just switch the VPN to on whenever you want to use it. Now there is a very long instruction on how to set up OpenvPN to start automatically, but there are a lot of steps and you need extra steps to turn it off. Since it won’t rely on the network manager in settings anymore. You will rely instead on system d by turning the service on and off which is all command line.

So I don’t necessarily recommend this as it is not really designed for the average user. So there you go. These are kind of complicated as you can see compared to windows. Usually though this is only done once and so it’s not as bad as it looks. And most of this is just cut and paste and you don’t need to memorize anything. Only mister robot can remember every linux command and hacking stuff on Tv. The rest of us require notes and we all cut and paste. If there’s something else you’d like me to expand on, just pop your requests in the comments and I can do a follow up video.

Folks, I started a company to develop privacy oriented tools for use by people who care about privacy. Our store and our community are all on my platform, Braxme. We have products like the Brax virtual phone. This gives you no KYC voice over IP phone numbers for texts and calls. We have the Google phones that are no identity devices and have nothing that makes them visible to big tech. In other words, invisible phones. We have the Braxmail service which is a no metadata email service with many domains and unlimited aliases so you can have multiple email addresses.

We have the bytes VPN service which protects your ip address. All these and other products are on the store on my app Braxme. Join the over 100,000 users that discuss privacy issues daily and be part of this community. Thank you for watching and see you next time.
[tr:tra].

See more of Rob Braxman Tech on their Public Channel and the MPN Rob Braxman Tech channel.

Author

Sign Up Below To Get Daily Patriot Updates & Connect With Patriots From Around The Globe

Let Us Unite As A  Patriots Network!

By clicking "Sign Me Up," you agree to receive emails from My Patriots Network about our updates, community, and sponsors. You can unsubscribe anytime. Read our Privacy Policy.

BA WORRIED ABOUT 5G FB BANNER 728X90

SPREAD THE WORD

Leave a Reply

Your email address will not be published. Required fields are marked *