Archive

Archive for the ‘Guinea Pigs’ Category

Let your computer continue to boot even if it can’t mount something in fstab

July 23rd, 2017 No comments

I have a Drobo, basically a consumer grade NAS or network file share device, that I store the majority of my media and documents on. The files are accessed via an exposed Windows share folder and because Linux doesn’t always play the nicest with that I’ve taken to force mounting these shares on my machine via fstab. The usual approach is to add something like this to your /etc/fstab file:

//{IP address of server}/Media    /media/Drobo/Media    cifs    guest,uid=1000,iocharset=utf8    0    0

I won’t get into all of the gory details here (for that see this older post) but essentially this tells the computer to map the shared Media folder on my Drobo to a location on my computer under /media/Drobo/Media. The problem with this approach is that if the Drobo is offline or if there is a network problem then it will cause the boot process to pause with an error and prompt me if I want to continue without mounting it. While this is fine it isn’t always ideal. For instance what if I wanted to do something similar with my laptop but not have to go through the hassle of OKing the boot every time it failed to find the Drobo when I’m away from home? Well thankfully there are a few more switches we can add to the fstab line to do just that!

Here is what my new fstab line looks like:

//{IP address of server}/Media    /media/Drobo/Media    cifs    nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,guest,uid=1000,iocharset=utf8    0    0

I’ve bolded the new portion but it should be fairly obvious what is happening here. Basically the nofail option says “I don’t care if you can’t mount it, don’t stop with an error just keep going” where the other options specify requirements to even try such as network connectivity as well as a timeout value so I don’t have to wait long for it to realize that it can’t find the Drobo. With these added options I can easily boot with or without the Drobo being there and I’m never prompted with an error message.

Now a few things to note:

  • Adding nofail to devices you do need to mount, such as your root drive, is probably a terrible idea.
  • If the computer boots up when the Drobo isn’t there but later I bring the computer back to the network where the Drobo lives, it won’t automatically find and mount it for me. So that’s something you’ll still need to remember to do manually (by running sudo mount -a or something like that).

 

Categories: Linux, Tyler B Tags: ,

Open Document Formats: A Successful Transition?

July 22nd, 2017 No comments
Some Background

Years ago I wrote about my interest in switching away from proprietary binary blob formats (primarily things like Microsoft .doc, .xls & .ppt formats) and instead move to their more open alternatives (OpenDocument .odt, .ods & .odp and Office Open XML .docx, .xlsx & .pptx). The genesis for this drive was an article by Vincent Cerf where he was talking about the problems around reading these proprietary formats in the future, when the original vendors are either out of business or no longer interested in supporting them. By using a well defined and open standard instead we can not only preserve our data but we’ll also have more options and software choices available to us as well.

Where Are We Now?

OpenDocument is at version 1.2 with a 1.3 currently in the draft stage. It is supported by many office applications (including Microsoft Office) and has been adopted as the standard by many governments and organizations. Here are just some examples: Belgium, Brazil, Croatia, Denmark, France, Germany, Hungary, India, Italy, Japan, Latvia, Malaysia, Netherlands, Poland, Portugal, Slovakia, South Africa, Sweden, United Kingdom, Norway, Russia, Serbia, South Korea, Switzerland, Turkey, Uruguay and Venezuela as well as NATO and the European Union.

Office Open XML is currently standardized under ISO/IEC 29500:2008 and is the default file format for the Microsoft Office suite. As such it likely enjoys a much larger market share being the de facto file type for individuals and corporations who are using Microsoft Office.

Both formats are now very mature and stable and offer good feature sets and interoperability. However there are still application specific issues that may impact users. For instance as of this writing both Microsoft Office and LibreOffice applications still do not always represent the same document in the same way leading to formatting inconsistencies.

So How Did My Transition To Open Document Formats Go?

Personally I can’t remember the last time I chose to use any of the binary blob formats. Sure you occasionally come across them online or get them e-mailed to you but by and large the world has moved on. The Microsoft backed Office Open XML formats seem to be much more prevalent but that’s to be expected as the default file format for the most popular office suite in the world. Still I think it’s a win for everyone that we’ve been able to make such a large and mostly seamless transition to open document formats.

This post originally appeared on my personal website here

Learn Linux Environment Variables Step-By-Step Easy Guide

July 12th, 2017 No comments

In the previous posts, we talked about some of the basic Linux commands, today we continue our journey, and we will talk about something very important in Linux which is Linux Environment Variables.

So what are Environment Variables and what is the benefit of knowing them?

Well, the bash shell uses a feature called Environment Variables to store some values which are required by the running programs or scripts from that shell, actually, this is a very handy way to store data and make it available for any script or a program when you run it from the shell.

There are two types of environment variables in the bash shell:

  • Global variables
  • Local variables

Global variables are visible from the shell session and for any running process that runs from the shell.

Local variables are visible in the shell that creates them.

Global variables

The Linux system sets some global environment variables when you log into your system and they are always CAPITAL LETTERS to differentiate them from user-defined environment variables.

To see these global variables, type printenv command:

printenv command

As you can see, there are a lot of global environment variables, to print only one of them, type echo command followed by $VariableName. Ex: to print HOME variable type echo $HOME.

home variable

Local variables

Actually, the Linux system also defines some standard local environment variables for you by default.

Unfortunately, there is no command that displays only local environment variables, but if you type the set command, you will see the global and local variables for the shell you are running and available to that shell.

Setting Local Environment Variables

You can set your own environment variables directly from the shell, once you open the shell you’re allowed to create local variables that are visible within your shell process. You just type variableName you want, followed by an equal sign and the variable value.

You just type variableName you want, followed by an equal sign and the variable value WITHOUT any spaces:

mysite=likegeeks

And to print the variable value, use the echo command:

echo $mysite

Sure enough, it prints likegeeks.

local environment variables

OK, what if your variable is more than one word; may be a long string, you can put the string between single quotations:

mysite=’likegeeks is a website that offers tech tutorials for geeks’

And if we type echo $mysite

set environment variables

If you forget the single quotation, the shell will assume that the second word is another command and will give you an error.

As you can see, I use lower case characters for my variable not upper case and this is recommended  NOT required, this helps you distinguishing your environment variables from the system environment variables.

Once you have set your local variable, it will be visible in the currently running shell scope and that means if you start another shell window the variable will not be available in that new window.

Setting Global Environment Variables

To create a global environment variable, you have to create a local environment variable then export it to the global environment like this:

myvar=’I will do it likegeeks’

echo $myvar

export myvar

global enviroment variables

As you can see I don’t use dollar sign with the export command so make sure of that.

But there is something, when I close the shell and open it again the variable is gone, so how to make it persistent?

Persisting Environment Variables

Just edit $HOME/.bashrc  and type   export myvar=‘welcome to likegeeks’  and save the file:

print persistent enviroment variable

Removing Environment Variables

This can be done by using the unset command:

unset enviroment variable

Default Shell Environment Variables

As we know, the system defines some variables for us, one of those variables is the PATH variable, this variable holds the paths of the directories that the shell uses to look for commands, each directory is separated by a colon.

Setting the PATH Environment Variable

If you to add a directory to the PATH variable, the shell will search in that directory also for an executable to run when you type any command.

Just append the path variable followed by a colon and the new directory like this:

add path to enviroment variable

And if you want to persist the PATH variable, you have to edit the .bashrc file and add type it like this:

persistent path variable

There is a useful trick that some sysadmins do which is adding a period . to the path variable so the shell will search for an executable in the current directory you are in wherever you are.

This is relatively risky, you might give the attacker the opportunity to run a malicious script or malware in his current directory, so if you do this trick, you should know what you are doing.

Locating System Environment Variables

There are three ways of starting a bash shell:

  • default login shell at login time
  • the interactive shell that is not the login shell
  • non-interactive shell to run a script

login shell

When you log into the Linux system, the bash shell starts as a login shell. The login shell looks.

There are four startup files that you can process the commands from:

  • /etc/profile
  • $HOME/.bash_profile
  • $HOME/.bash_login
  • $HOME/.profile

/etc/profile runs on every startup with every user, the other 3 files run for every specific user, you can call them user specific environment variables.

Interactive shell

If you start a bash shell without logging into a system like when you go to the rescue mode, this is the interactive shell.

If you start an Interactive shell, the system will not look for /etc/profile but instead will look for .bashrc in your HOME directory.

Non-interactive shell

This shell starts by the system to execute a shell script.

Users can customize the above-mentioned files to include environment variables and startup scripts for their own use, just edit the desired file and type the variable you want and save it.

Variable Arrays

One of the cool features of environment variables is that they can be used as arrays which hold multiple values.

myvar=(first second third fourth)

Now if you check the value of that array using echo command, you will find it returns the first element only.

To get a specific element, just reference it by its position, and the positions start from zero so to get the third one, type it like this:

echo ${myvar[2]}

To display the entire array type asterisk instead of a number:

echo ${mytest[*]}

variable array

You can remove an element of the array using unset command:

unset mytest[2]

Or you can remove the whole array:

unset myvar

This post was originally published on Like Geeks site here.

KWLUG: Rust (2017-07)

July 11th, 2017 No comments

This is a podcast presentation from the Kitchener Waterloo Linux Users Group on the topic of Rust published on July 10th 2017. You can find the original Kitchener Waterloo Linux Users Group post here.

To subscribe to the podcast add the feed here or listen to this episode by clicking here or choose from one of the following direct links:

You can find the original Kitchener Waterloo Linux Users Group post here.

Categories: Linux, Podcast, Tyler B Tags: ,

Basic Linux Commands Made Easy Part2

July 9th, 2017 No comments

In the previous post, we discussed some Linux commands and we saw how to show files, traverse directories, make them, and much more. Now, that was just the first level of the basic Linux commands. Let’s take one more step and see more of the basic Linux commands that you will use.

We talked about the ls command in the previous post and we’ve discussed only 2 parameters. Let’s dig deeper and see more parameters that can make you more powerful.

ls R  to recursively list all files in a directory

The -R parameter will traverse deeply till it finishes all directories. As you can see, for large directory structures, this can become quite a large output listing.

ls -R command

ls r  Reverses the sorting order for the displayed files and directories.

ls -r- command

ls S  Sorts the output by file size.

ls -lS command

ls t  Sorts the output by file modification time.

ls -lt command

Filtering Output

ls l myfile?

A question mark is used to represent one character.

ls l myprob*

An asterisk is used to represent zero or more characters.

The question mark and asterisk are called wild characters.

ls wild character

Creating Files

touch test1

The touch command is used to create an empty file. You can use the touch command to change the access and modification times of an existing file without changing the file contents.

touch command

If you use it against an existing file, it will change the access time, if the file doesn’t exist, it will create it.

In order to change the modification time,  just type it with -t followed by the time with the following format YYYYMMDDHHMM

touch t 202012011200 test1

touch existed file

Linking files

We know from the previous post that cp command is used to copy files.

What about creating a shortcut to that file in a different place. In Linux, this is called linking files.

There are two different types of file links in Linux:

  • hard link
  • symbolic, or soft link

cp l file1 file2

Hard Links

The hard link creates a separate file which contains information about the original file and where it is located.

Keep in mind that you can only create a hard link between files on the same physical drive, you can’t create hard links between files under separate mount points.

If you need to create links on a different physical drive, you’ll have to create a soft link instead.

cp hardlink

Symbolic Links

The -s parameter creates a symbolic or soft link:

cp s file1 file2

cp softlink

Here we should mention also another command that makes links other than cp which is ln command, you can create hard and soft links with it like this:

ln myfile myfile2

This command creates a hard link.

ln command

ln s myfile myfile2

This command creates a soft link.

ln softlink

Viewing the file type

file myfile

Determines the kind of the file.

file command

Viewing parts of a file

We know also from the previous post the cat command and the less command. Another important command that you will use a lot in your daily work which is the tail command.

The tail command

This command displays the last 10 lines of a file.

-n parameter to specify the number of lines

-f parameter to stay on the file and continue to watch the last lines you specified like monitoring, and this is very important when looking at log files.

tail command

The head command

Like tail command, but this command displays the first 10 rows of a file with the same tail command parameters.

head command

Running Processes

ps aux

This command is to see the currently running processes.

ps aux

top command shows the running processes.

-c parameter to show the command path that is running.

top command

kill command to kill a running process.

To kill a process

pkill processName

kill command

type xkill and press Enter to kill any nonresponsive window.

xkill command

 

df command shows the disk free space.

df h

-h for human readable value

df command

That was some of the basic Linux Commands. I hope you enjoy it. Keep coming back.

This post was originally published on Like Geeks site here.

Categories: LikeGeeks, Linux Tags:

Off to a rocky start with Zorin OS

July 2nd, 2017 No comments

In my previous post I mentioned that I installed Zorin OS onto an older laptop I had lying around.

Very nice first impression

Since that post went up I have been messing around with Zorin OS and decided to run a system update to make sure I had the latest packages and security fixes installed. Unfortunately after the update finished and I rebooted I logged in to find that things just weren’t what they used to be… Instead of the nice Zorin OS interface (shown above) I ended up logging in to a standard GNOME Shell interface. It seems as though the update had reset some of the customization that the Zorin team had made.

Thankfully I was able to find the Tweak tool and re-enable many of those customizations again!

Once I enabled all of the Zorin OS extensions almost everything was back to normal!

The one thing that I couldn’t get back to normal was the duplicate top bar showing open applications. You can see it in the screenshot above but basically I now had both the Zorin OS styled open window bar at the bottom as well as the GNOME Shell version at the top.

The solution it turns out is to turn off all of the Zorin OS extensions that I had tried in the tweak tool and instead open up the Zorin Appearance tool and select the first of the three window options at the top.

Both the first or second selections should work

The last key to the puzzle was to log out and then log back in for everything to take. And now my desktop is back to normal again!

Great success!

Distro hopping around DistroWatch challenge: Zorin OS

July 1st, 2017 No comments

I have an older Lenovo X60 laptop lying around that I don’t really use for anything these days and I decided that it might make for a decent computer to use to play around with some random distributions. It’s not the best machine in the world but does come packed with an Intel Core2Duo (T7200) @ 2GHz and 2GiB of RAM.

OK so it’s not the newest laptop in the world but it’ll do 🙂

OK so I have the machine and now to install a new distribution! …Unfortunately when I went to finally pick which distribution to actually install I couldn’t make up my mind and instead figured that I should first come up with an interesting way to help out with that process. So I went over to everyone’s favourite website DistroWatch.com and, after loading up their big list of distributions, I kind of just scrolled up and down while randomly moving the mouse for a while. Yeah not the most scientific approach but whatever. When I stopped my mouse was highlighting a link for Zorin OS and so the decision was made.

Designed for Windows XP but not limited to it!

I also came up with a simple rule for this round of distro hopping: stick to the base included software if possible. So for example if a distribution ships with Evolution as its e-mail client then use that instead of installing Thunderbird or something else. The point of this ‘rule’ is simply to try and use it in the way the packagers intended, rather than simply falling back to my standard set of software choices.

Very nice first impression

Zorin OS is a distribution that I’ve never actually used before and so this was a good first stop. According to its website it positions itself as:

“…the perfect blend of power and usability for everyone. Zorin OS was built to be as easy as possible, so you won’t need to learn a thing to get started thanks to its familiar user interface. It comes loaded with all the apps and tools you need out of the box for browsing the web, working, playing and everything in between.”

OK so let’s see what major software Zorin OS comes with by default:

I must say I’m actually quite impressed by this list. This is extremely close to what I would normally install on my systems and I think it will offer an excellent experience to Linux newcomers. I should also point out that even though it doesn’t look like it, Zorin OS is running on top of GNOME Shell and is actually based on Ubuntu so you inherit a lot of nice things (e.g. online help, PPAs, etc.) as a result.

Even something as boring as the menu is really, really nice!

My first impressions of Zorin OS in the brief time that I’ve used it so far are that the team spent a lot of time really polishing the presentation of their desktop. There is a lot of attention to detail here in the small things, for example how the logo fades in during boot or how the menu animates and slides as you move through it, that you just don’t find in a lot of other major distributions.

In terms of how it performs, even on this old laptop it seems pretty decent. On cold start it uses about 900 MiB of RAM which is a tad bit high but after a few hours of using it I was only up to around ~1.5 GiB or so which isn’t too bad.

I’ll be playing around with Zorin OS more over the coming days/weeks/whatever and will post anything interesting that I find as I go. Then it’ll be off to hop to another DistroWatch link. If you’re interested in joining me on this crazy made up challenge we would love to feature your write ups here at The Linux Experiment as well. Simply head over to this link and get in touch!

Main Linux Commands Easy Guide

June 21st, 2017 No comments

In the previous post, we discussed how to install Linux, now we are going to talk about the most powerful features in Linux which is Linux commands or shell commands.

For the whole documentation of Linux Commands, you can check Linux Documentation.

If you will use Linux, you should know that the power of Linux resides in its shell and the commands that you can use on that shell which gives you the ultimate power.

I’m going to talk about the main Linux commands with their main parameters that you might use daily.

ls Command

List the content of the current directory.

Parameters

–l

to list the content as a detailed list.

-a

Display all files includes hidden files.

You can combine parameters like this:

linux ls command

cd Command

Change directory from the current directory to another one.

Will go to home directory

linux cd command

cp Command

Copy the source to target.

Parameters

-i

Interactive mode means wait for the confirmation if there are files on the target will be overwritten.

-r

Recursive copy means include subdirectories if they found.

Example

linux cp command

mv Command

Move the source to target and remove the source.

Parameters

-i

Interactive mode means wait for the confirmation if there are files on the target will be overwritten.

Example

linux mv command

rm Command

Delete file or directory and you must use –r in case you want to delete a directory.

Parameters

-r

Recursive delete means delete all subdirectories if found.

-i

Interactive means wait till confirmation

linux rm command

mkdir Command

Create new directory

linux mkdir command

rmdir Command

Delete a directory

linux rmdir command

chown Command

Change the ownership of a file or directory to the user you specify.

Parameters

-R

Capital R here means to change ownership of all subdirectories if found and you must use this parameter if you use the command against a directory.

linux chown command

chmod Command

Change the permission of a file or directory.

Parameters

The mode which is divided into 3 parts, ownergroup, and others means what will be the permissions for these modes, and you must specify them.

Every one of the 3 modes takes a permission.

The permission is one of the followings:

Read =4

Write = 2

Execute =1

Every permission represented by a number as shown and you can combine permissions.

Example

That means set permission for the file named myfile as follows:

owner: set it to 7 which means 4+2+1 means read+write+execute.

group: set it to 5 which means 4+1 means read+execute.

other: set it to 5 which means 4+1 means read+execute.

Note: execute for a folder permission means opening it.

linux chmod command

locate Command

To find a file in your system, the locate command will search the system for the pattern you provide.

linux locate command

updatedb Command

updates the database used by the locate command.

date Command

Simply prints today’s date. Just type date on the shell.

tar Command

Combines several files into archive and compression if you want.

Parameters

-c

Create new archive.

-z

Compress the resulting archive using gzip package.

-j

Compress the resulting archive using bzip2 package.

-v

Verbose mode show the processed files.

-f

Write the output to a file and not to screen.

-x

Unpack files from archive.

Example

linux tar command create

This command will pack and compress all files in folder myfiles to a compressed archive named myfiles.tar.gz.

linux tar command extract

This command will decompress the archive.

cat Command

Display file content to screen without limits.

Example

linux cat command

less Command

Displays file content with scroll screen so you can navigate between pages using PgUp, PgDn, Home, and End.

grep Command

Searches for a string in the specified files and displays which line contains the matched string.

Parameters

-R

Recursive search inside subdirectories if found.

-i

Insensitive search and ignore case.

-l

Display file name, not the text lines.

 

Example

linux grep command

passwd Command

Used to change your user password.

linux passwd command

du Command

Calculates the disk usage of a file or a directory.

Parameters

-h

Display human readable form.

-s

Summarize the output total size.

Example

linux du command

reboot Command

Reboot the system immediately. Just type reboot.

halt Command

Shuts down the system, but make sure to close all of your files to avoid data loss.

That was just some of the main Linux commands.

Notice that, if you forget any command parameters,  just type the command with – -help as a parameter and it will list the used parameters so you don’t have to remember all those parameters at the beginning.

cat help

to be continued.

This post was originally published on Like Geeks site here.

Categories: LikeGeeks, Linux Tags:

KWLUG: Saltstack, XMPP (2017-06)

June 7th, 2017 No comments

This is a podcast presentation from the Kitchener Waterloo Linux Users Group on the topic of Saltstack, XMPP published on June 5th 2017. You can find the original Kitchener Waterloo Linux Users Group post here.

To subscribe to the podcast add the feed here or listen to this episode by clicking here or choose from one of the following direct links:

You can find the original Kitchener Waterloo Linux Users Group post here.

Categories: Linux, Podcast, Tyler B Tags: ,

Using SoundConverter to convert between file formats

May 15th, 2017 No comments

SoundConverter is an excellent little utility that makes it super simple to convert from one audio format to another. As an example case I had some WAV files that were taking up far too much space and so I wanted to convert them to FLAC files instead.

After firing up SoundConverter I clicked Preferences and selected my options:

Lots of options but nothing too overwhelming

Then I clicked Add File and selected the WAV file I wanted to convert:

You can also drag & drop into the window if that’s more your style

Finally I clicked Convert and watched the program make the change. It was as simple as that!

Do you have a neat little utility like this that you can’t live without? Let us know about it in the comments below!

What Is Linux File System? Easy Guide

May 7th, 2017 2 comments

What Is Linux File System?

As we’ve talked about Linux on the previous post and we have chosen the best Linux distro already and also we learn how to install Linux not it is the time to dig down and understand Linux from inside and we will start with what we’ve  mentioned on load post which is what is the Linux file system.

If we want to talk about Linux File System we need to talk about it from download level and top level in order to fully understand it

You can check this link for a general overview File System

Down Level Explanation

Linux File System or any other file system is the layer which is under the operating system that handles the positioning of your data on the storage without it the system cannot know which file starts from where and ends where.

We talk about Linux, which supports many filesystems windows. MacOS and many other file systems, you can even download software that can handle a new file system when it comes and deal with it

Linux File System Types

So what are Linux file system types?

When you try to install Linux you will see that in order to install Linux you have to install it on a partition or a disk that is one of the following file systems

Ext, Ext2, Ext3, Ext4, JFS, XFS, btrfs and swap

So what are those file systems that Linux use?

Ext: old one and no longer used due to limitations

Ext2: first Linux file system that allows 2 terabytes of data allowed

Ext3: came from Ext2, but with upgrades. It keeps the backward compatibility and you can upgrade your Ext2 to Ext3 without problems

The only problem about it that the servers use this kind of file system because this file system does not support file recovery  or disk snapshots

Ext4: faster and allow large files with significant speed

It is a very good option for SSD disks and you notice when you try to install any Linux distro it is the default file system that Linux suggests

JFS: old file system made by IBM it has a Good performance for both large and small files and because of its low CPU usage but failed and files corrupted after long time use reports says

XFS: old file system which shows a bad performance with small files and you can’t compare it with Ext versions rich features

Btrfs: made by oracle it is not stable as Ext in some distros but you can say that it is a replacement for it if you have to, it has a good performance

You may notice From the comparison above  that Ext4 is the best Linux File System

 Top Level Explanation

Now you know what file system Linux offers you ok what is inside that system and what is the system structure

You may come from windows background and windows has partitions like C:\ and D:\ and folders and you install the windows on any of those partitions usually C:\

What about Linux File System Hierarchy well it has a different structure than windows. If you navigate to the root partition which is / and see the structure of the Linux File System. Most distros have the same structures like this:

Linux File System Directories

/bin: Where Linux core commands reside like ls, mv

/boot: Where boot loader and boot files are located.

/dev: Where all physical drives are mounted like USBs DVDs.

/etc: Contains configurations for the installed packages.

/home: Where every user will have a personal folder to put his folders with his name like /home/likegeeks.

/lib: Where the libraries of the installed packages located since libraries shared among all packages. Unlike windows, you may find duplicates in different folders.

/media: Here is the external devices like DVDs and USB sticks are mounted and you can access their files from here.

/mnt: Where you mount other things Network locations and some distros you may find your mounted USB or DVD.

/opt: Some optional packages are located here and this is managed by the package manager.

/proc: Because everything on Linux is a file, this folder for processes running on the system and you can access them and see much info about the current processes.

/root: The home folder for the user root.

/sbin: Like /bin but here binaries for root user only.

/tmp: Contains the temporary files are located.

/usr: Where the utilities and files shared between users on Linux.

/var: Where variable data is located, like system logs.

Now you should understand what the Linux file system is.

Different file system lead to different performance so it is very important to know the file system at least a bit

This post was originally published on Like Geeks site here.

Categories: LikeGeeks, Linux Tags: ,

KWLUG: Functional Programming and Haskell (2017-05)

May 7th, 2017 No comments

This is a podcast presentation from the Kitchener Waterloo Linux Users Group on the topic of Functional Programming and Haskell published on May 1st 2017. You can find the original Kitchener Waterloo Linux Users Group post here.

To subscribe to the podcast add the feed here or listen to this episode by clicking here or choose from one of the following direct links:

You can find the original Kitchener Waterloo Linux Users Group post here.

Categories: Linux, Podcast, Tyler B Tags: ,

KWLUG: OSSIM, A Brief History of Linux and Open Source (2017-04)

May 7th, 2017 No comments

This is a podcast presentation from the Kitchener Waterloo Linux Users Group on the topic of OSSIM, A Brief History of Linux and Open Source published on April 3rd 2017. You can find the original Kitchener Waterloo Linux Users Group post here.

To subscribe to the podcast add the feed here or listen to this episode by clicking here or choose from one of the following direct links:

You can find the original Kitchener Waterloo Linux Users Group post here.

Categories: Linux, Podcast, Tyler B Tags: ,

Kodi – Your One Stop Entertainment Solution On Linux

March 29th, 2017 No comments

Linux – The open-source OS we’ve all come to use and love and then use some more. I’ve been using Linux since 2009 at least and I have got to say, it’s capabilities have always managed to one-up my expectations. This is one operating system where I learn something new every other day. Across the years I’ve used various builds of Red Hat, Fedora, Ubuntu, Xubuntu, Mint, Debian and many more and I’m still not through. In fact, my love for Linux gets stronger with each day.

“It’s Not Meant For Entertainment”

Or so they say. Keeping Linux’s technical superiority aside, one of the most common criticisms directed towards Linux is its lack of compatibility with third party software. The general belief of an average user like me that is Linux is an absolute fit for developers and programmers but lacks that entertainment aspect for a normal user.

If it were 2012 when I was still struggling with it, I would have agreed. Not today though. The criticism is not really applicable anymore because today, Linux also supports one of the best free and open-source media player, Kodi.

“So, What is Kodi?”

Kodi is an impressive free multi platform media player that has also emerged as a great resource to watch films and TV for free. Kodi was introduced on Xbox as the Xbox Media Center (or XBMC), but that didn’t last for much long and now, the software exists in more than 65 languages, over a great number of platforms, and blending the work of hundreds of programmers.

Kodi as a free open-source media player plays all sorts of digital media comprising of TV (live and recorded), films, other videos, music, podcasts, photos, and slideshows. It’s also highly regarded for watching free ‘pirated’ copyrighted content.

“Is It Compatible With Linux?”

The Kodi application is available on multiple operating systems and hardware platforms such as Linux, OS X, Windows, iOS, and Android, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.

How to install Kodi on Linux

Installing Kodi on Linux is a piece of cake. Just add the PPA to your system, update the local repository index and install the Kodi package:

  • $ sudo add-apt-repository ppa:team-xbmc/ppa
  • $ sudo apt-get update
  • $ sudo apt-get install kodi

Or, use the below command to install audio codecs and other addons as well:

  • $ sudo apt-get install –install-suggests kodi

Optional, to remove kodi, do:

  • $ sudo apt-get remove kodi*

These installation instructions support Ubuntu 16.10 Yakkety Yak, Ubuntu 16.04 Xenial Xerus, Ubuntu 14.04 Trusty Tahr, Linux Mint 18.x, Linux Mint 17.x, Elementary OS 0.3 Freya and other Ubuntu derivative systems.

Moreover Kodi permits you to install third-party plugins that may grant access to free content available on the official content provider website. Team Kodi does not endorse the usage of illegal or pirated content which would otherwise need to be paid.

“One More Thing”

Since listening and watching pirated content can constitute trouble for the user it is recommended to employ a VPN which would hide your activities from the concerned authorities. Your online freedom is important. Stay out of the radar of data snoopers and online spies with the best VPN for Kodi. You are as vulnerable in the digital world as you are in the real world. Use a VPN to stay secure & safe online.

Despite the piracy linked criticisms, Kodi media player has established itself as a very popular application. Version 17 of Kodi has been released recently and is now available to be installed on Linux computers.

Brad is a tech blogger fascinated by technology, gadgets, latest developments the geek culture. Much as he loves writing about technological innovations and IoT, when he’s not, he can found playing games on his Xbox or hanging out with his beloved pets.

Categories: Brad H, Linux Tags:

Alternative software: QupZilla Browser

March 19th, 2017 No comments

I’m back at it, looking for the latest open source alternative software gem. This time around I’m trying out the QupZilla web browser. Never heard of QupZilla before? Well it’s another alternative web browser but this one is built on top of Qt WebEngine, comes with a built in ad blocker and strives to have a native look and feel for whichever distribution/desktop environment you’re running.

QupZilla on first launch

QupZilla supports a number of extensions that expands the browser’s capabilities. These are presented in an easy to use settings dialog.

Extensions for you! And you! And You!

I figured that it would be a good test to quickly see memory usage when loading up a number of tabs:

Number of tabs Memory Usage
1 184.4MB
2 238.8MB
3 275.3MB

While it’s hard to say if that’s a lot of memory usage or not it does seem like quite a bit of RAM to use up for just a single tab. The other thing I noticed was that the browser seems to use quite a bit of CPU when initially rendering the web page. I don’t know if that’s just related to my particular configuration or what but I regularly saw spikes up to ~70% CPU which seems excessive.

Overall though QupZilla seemed to work fine for the websites I tried in it. I suppose if you’re looking to run a browser that no one else is then this one is for you but just like Midori and Konqeror I don’t have a compelling reason to recommend this for every day use.

How To Install Linux Step-By-Step

March 18th, 2017 No comments

How To Install Linux? By Video

Before we dig into how to install Linux lets review what We’ve talked about choosing the best Linux distro that fits your need on this post

Best Linux Distro

and hope you choose the one that is suitable for you

If you want to install Linux there are 2 ways to do that

First way is to download the Linux distribution you want and burn it to a DVD or USB stick and boot your machine with it and complete the installation process

The second way is to install it virtually on a virtual machine like VirtualBox or VMware and continue working on your windows or mac system without rebooting so your Linux system will be contained in a window you can minimize it and continue working on your system.

For me I prefer VirtualBox it’s a free and runs fast on my PC than VMware and natively support installing windows Linux mac OS with all versions

Let’s choose any Linux distro and install it using both 2 ways

Ok I’m going to choose Linux mint they call it the mac os of Linux

It is good distro for laptops and desktops for personal use

The version we are going to install is 18.1 “Serena” at the time of writing that article.

Go to this link and download it

https://www.linuxmint.com/download.php

I prefer Cinnamon desktop version it is promising and elegant

Once you download the iso file you will have to burn it on DVD or the easy way copying it on USB stick using a program called universal USB installer from that link

https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

After downloading the program open it and choose from the list the distro you want to install in our case Linux mint and make sure you put your memory stick on the computer and click next and wait till copying process is finished.

how to install linux using usb
how to install Linux using USB

how to install linux mint

install linux choose iso

Now Finally we click create to create bootable USB

create bootable usb install linux

And now you can boot with this memory stick

Then Restart you PC and go to BIOS settings  and select boot options and make sure the USB is the first one then it will show the installation screen press Enter it will load the live CD content which is on the USB or DVD

boot linux

install linux boot menu

Then desktop will appear like that

linux boot complete

Click install Linux mint

Then choose the language used for installation

choose language

install third party

Then choose the installation type and TAKE CARE if you are installing Linux on a disk that contains another system you MUST choose the option called something else

delete partitions

But if you installing it on new disk choose the option Erase disk

Linux requires 2 partitions to work on root partition and swap partition

Now we will create them by clicking the plus button and choose about 12 GB or more as you need but not less than that for root partition and choose mount type as / which stands for root and of course format will be Ext4

linux create partitions

Now we create swap partition choose the remaining free space and click the plus button and choose swap area as shown

create root partition

choose free space

Then Create swap area

create swap area

Then click install now and agree about writing changes to disk

click install linux

confirm install

Now you choose the time zone and click continue the choose the language

choose timezone

choose linux language

Now you write your username and password and click continue

choose username

Finally, installation started

linux installlation started

After finishing installation it will prompt you to reboot the machine and remove the installation media DVD or USB

linux installation finished

And yes this is how to install Linux on Physical machine

linux welcome screen

linux start menu

The second way it to install Linux is to install it on VirtualBox First download VirtualBox from here

https://www.virtualbox.org/wiki/Downloads

Then install it easy steps then

there are 2 ways to use Linux on VirtualBox

The first way is easy it like the normal installation process

Open VirtualBox and click new and choose Linux and ubuntu 64

linux virtualbox create vm

Then choose the RAM required not less than 1 GB and choose the disk file type or leave it as VDI and dynamically allocated and the size not less than 12 GB and hit ok

linux virtualbox assign ram

linux virtualbox hdd type

linux virtualbox hdd file

linux virtualbox dynamic allocated
Then file location for disk to be used

linux virtualbox hdd size

So now the VirtualBox is created we just need to make it boot from the DVD we’ve downloaded

Choose from settings > Storage and choose the iso image and click ok.

linux virtualbox settings
Then choose the iso image
linux virtualbox boot iso
Then Click start

linux virtualbox start

After loading the desktop click install Linux mint and the rest of the steps are as the mentioned above without any change And this is how to install Linux on a virtual machine.

This post was originally published on Like Geeks site here.

Categories: LikeGeeks, Linux Tags:

Blast from the Past: Create a GTK+ application on Linux with Objective-C

March 15th, 2017 No comments

This post was originally published on December 8, 2010. The original can be found here.

Note that while you can still write GTK+ applications on Linux using Objective-C as outlined in this post you may want to check out my little project CoreGTK which makes the whole experience a lot nicer 🙂


As sort of follow-up-in-spirit to my older post I decided to share a really straight forward way to use Objective-C to build GTK+ applications.

Objective-what?

Objective-C is an improvement to the iconic C programming language that remains backwards compatible while adding many new and interesting features. Chief among these additions is syntax for real objects (and thus object-oriented programming). Popularized by NeXT and eventually Apple, Objective-C is most commonly seen in development for Apple OSX and iOS based platforms. It ships with or without a large standard library (sometimes referred to as the Foundation Kit library) that makes it very easy for developers to quickly create fast and efficient programs. The result is a language that compiles down to binary, requires no virtual machines (just a runtime library), and achieves performance comparable to C and C++.

Marrying Objective-C with GTK+

Normally when writing a GTK+ application the language (or a library) will supply you with bindings that let you create GUIs in a way native to that language. So for instance in C++ you would create GTK+ objects, whereas in C you would create structures or ask functions for pointers back to the objects. Unfortunately while there used to exist a couple of different Objective-C bindings for GTK+, all of them are quite out of date. So instead we are going to rely on the fact that Objective-C is backwards compatible with C to get our program to work.

What you need to start

I’m going to assume that Ubuntu will be our operating system for development. To ensure that we have what we need to compile the programs, just install the following packages:

  1. gnustep-core-devel
  2. libgtk2.0-dev

As you can see from the list above we will be using GNUstep as our Objective-C library of choice.

Setting it all up

In order to make this work we will be creating two Objective-C classes, one that will house our GTK+ window and another that will actually start our program. I’m going to call my GTK+ object MainWindow and create the two necessary files: MainWindow.h and MainWindow.m. Finally I will create a main.m that will start the program and clean it up after it is done.

Let me apologize here for the poor code formatting; apparently WordPress likes to destroy whatever I try and do to make it better. If you want properly indented code please see the download link below.

MainWindow.h

In the MainWindow.h file put the following code:

#import <gtk/gtk.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>

//A pointer to this object (set on init) so C functions can call
//Objective-C functions
id myMainWindow;

/*
* This class is responsible for initializing the GTK render loop
* as well as setting up the GUI for the user. It also handles all GTK
* callbacks for the winMain GtkWindow.
*/
@interface MainWindow : NSObject
{
//The main GtkWindow
GtkWidget *winMain;
GtkWidget *button;
}

/*
* Constructs the object and initializes GTK and the GUI for the
* application.
*
* *********************************************************************
* Input
* *********************************************************************
* argc (int *): A pointer to the arg count variable that was passed
* in at the application start. It will be returned
* with the count of the modified argv array.
* argv (char *[]): A pointer to the argument array that was passed in
* at the application start. It will be returned with
* the GTK arguments removed.
*
* *********************************************************************
* Returns
* *********************************************************************
* MainWindow (id): The constructed object or nil
* arc (int *): The modified input int as described above
* argv (char *[]): The modified input array modified as described above
*/
-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv;

/*
* Frees the Gtk widgets that we have control over
*/
-(void)destroyWidget;

/*
* Starts and hands off execution to the GTK main loop
*/
-(void)startGtkMainLoop;

/*
* Example Objective-C function that prints some output
*/
-(void)printSomething;

/*
********************************************************
* C callback functions
********************************************************
*/

/*
* Called when the user closes the window
*/
void on_MainWindow_destroy(GtkObject *object, gpointer user_data);

/*
* Called when the user presses the button
*/
void on_btnPushMe_clicked(GtkObject *object, gpointer user_data);

@end

MainWindow.m

For the class’ actual code file fill it in as show below. This class will create a GTK+ window with a single button and will react to both the user pressing the button, and closing the window.

#import “MainWindow.h”

/*
* For documentation see MainWindow.h
*/

@implementation MainWindow

-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv
{
//call parent class’ init
if (self = [super init]) {

//setup the window
winMain = gtk_window_new (GTK_WINDOW_TOPLEVEL);

gtk_window_set_title (GTK_WINDOW (winMain), “Hello World”);
gtk_window_set_default_size(GTK_WINDOW(winMain), 230, 150);

//setup the button
button = gtk_button_new_with_label (“Push me!”);

gtk_container_add (GTK_CONTAINER (winMain), button);

//connect the signals
g_signal_connect (winMain, “destroy”, G_CALLBACK (on_MainWindow_destroy), NULL);
g_signal_connect (button, “clicked”, G_CALLBACK (on_btnPushMe_clicked), NULL);

//force show all
gtk_widget_show_all(winMain);
}

//assign C-compatible pointer
myMainWindow = self;

//return pointer to this object
return self;
}

-(void)startGtkMainLoop
{
//start gtk loop
gtk_main();
}

-(void)printSomething{
NSLog(@”Printed from Objective-C’s NSLog function.”);
printf(“Also printed from standard printf function.\n”);
}

-(void)destroyWidget{

myMainWindow = NULL;

if(GTK_IS_WIDGET (button))
{
//clean up the button
gtk_widget_destroy(button);
}

if(GTK_IS_WIDGET (winMain))
{
//clean up the main window
gtk_widget_destroy(winMain);
}
}

-(void)dealloc{
[self destroyWidget];

[super dealloc];
}

void on_MainWindow_destroy(GtkObject *object, gpointer user_data)
{
//exit the main loop
gtk_main_quit();
}

void on_btnPushMe_clicked(GtkObject *object, gpointer user_data)
{
printf(“Button was clicked\n”);

//call Objective-C function from C function using global object pointer
[myMainWindow printSomething];
}

@end

main.m

To finish I will write a main file and function that creates the MainWindow object and eventually cleans it up. Objective-C (1.0) does not support automatic garbage collection so it is important that we don’t forget to clean up after ourselves.

#import “MainWindow.h”
#import <Foundation/NSAutoreleasePool.h>

int main(int argc, char *argv[]) {

//create an AutoreleasePool
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

//init gtk engine
gtk_init(&argc, &argv);

//set up GUI
MainWindow *mainWindow = [[MainWindow alloc] initWithArgCount:&argc andArgVals:argv];

//begin the GTK loop
[mainWindow startGtkMainLoop];

//free the GUI
[mainWindow release];

//drain the pool
[pool release];

//exit application
return 0;
}

Compiling it all together

Use the following command to compile the program. This will automatically include all .m files in the current directory so be careful when and where you run this.

gcc `pkg-config –cflags –libs gtk+-2.0` -lgnustep-base -fconstant-string-class=NSConstantString -o “./myprogram” $(find . -name ‘*.m’) -I /usr/include/GNUstep/ -L /usr/lib/GNUstep/ -std=c99 -O3

Once complete you will notice a new executable in the directory called myprogram. Start this program and you will see our GTK+ window in action.

If you run it from the command line you can see the output that we coded when the button is pushed.

Wrapping it up

There you have it. We now have a program that is written in Objective-C, using C’s native GTK+ ‘bindings’ for the GUI, that can call both regular C and Objective-C functions and code. In addition, thanks to the porting of both GTK+ and GNUstep to Windows, this same code will also produce a cross-platform application that works on both Mac OSX and Windows.

Source Code Downloads

Source Only Package
File name: objective_c_gtk_source.zip
File hashes: Download Here
File size: 2.4KB
File download: Download Here

Originally posted on my personal website here.

Blast from the Past: How to migrate from TrueCrypt to LUKS file containers

March 13th, 2017 No comments

This post was originally published on June 15, 2014. The original can be found here. Note that there are other direct, compatible, alternatives and proper successors to TrueCrypt these days, including VeraCrypt. This post is simply about a different option available to Linux users.


With the recent questions surrounding the security of TrueCrypt there has been a big push to move away from that program and switch to alternatives. One such alternative, on Linux anyway, is the Linux Unified Key Setup (or LUKS) which allows you to encrypt disk volumes. This guide will show you how to create encrypted file volumes, just like you could using TrueCrypt.

The Differences

There are a number of major differences between TrueCrypt and LUKS that you may want to be aware of:

  • TrueCrypt supported the concept of hidden volumes, LUKS does not.
  • TrueCrypt allowed you to encrypt a volume in-place, without losing data, LUKS does not.
  • TrueCrypt supports cipher cascades where the data is encrypted using multiple different algorithms just in case one of them is broken at some point in the future. As I understand it this is being talked about for the LUKS 2.0 spec but is currently not a feature.

If you are familiar with the terminology in TrueCrypt you can think of LUKS as offering both full disk encryption and standard file containers.

How to create an encrypted LUKS file container

The following steps borrow heavily from a previous post so you should go read that if you want more details on some of the commands below. Also note that while LUKS offers a lot of options in terms of cipher/digest/key size/etc, this guide will try to keep it simple and just use the defaults.

Step 1: Create a file to house your encrypted volume

The easiest way is to run the following commands which will create the file and then fill it with random noise:

# fallocate -l <size> <file to create>
# dd if=/dev/urandom of=<file to create> bs=1M count=<size>

For example let’s say you wanted a 500MiB file container called MySecrets.img, just run this command:

# fallocate -l 500M MySecrets.img
# dd if=/dev/urandom of=MySecrets.img bs=1M count=500

Here is a handy script that you can use to slightly automate this process:

#!/bin/bash
NUM_ARGS=$#

if [ $NUM_ARGS -ne 2 ] ; then
    echo Wrong number of arguments.
    echo Usage: [size in MiB] [file to create]

else

    SIZE=$1
    FILE=$2

    echo Creating $FILE with a size of ${SIZE}MB

    # create file
    fallocate -l ${SIZE}M $FILE

    #randomize file contents
    dd if=/dev/urandom of=$FILE bs=1M count=$SIZE

fi

Just save the above script to a file, say “create-randomized-file-volume.sh”, mark it as executable and run it like this:

# ./create-randomized-file-volume.sh 500 MySecrets.img

Step 2: Format the file using LUKS + ext4

There are ways to do this in the terminal but for the purpose of this guide I’ll be showing how to do it all within gnome-disk-utility. From the menu in Disks, select Disks -> Attach Disk Image and browse to your newly created file (i.e. MySecrets.img).

Don't forget to uncheck the box!

Don’t forget to uncheck the box!

Be sure to uncheck “Set up read-only loop device”. If you leave this checked you won’t be able to format or write anything to the volume. Select the file and click Attach.

This will attach the file, as if it were a real hard drive, to your computer:

attachedindisksNext we need to format the volume. Press the little button with two gears right below the attached volume and click Format. Make sure you do this for the correct ‘drive’ so that you don’t accidentally format your real hard drive!

Please use a better password

Please use a better password

From this popup you can select the filesystem type and even name the drive. In the image above the settings will format the drive to LUKS and then create an ext4 filesystem within the encrypted LUKS one. Click Format, confirm the action and you’re done. Disks will format the file and even auto-mount it for you. You can now copy files to your mounted virtual drive. When you’re done simply eject the drive like normal or (with the LUKS partition highlighted) press the lock button in Disks. To use that same volume again in the future just re-attach the disk image using the steps above, enter your password to unlock the encrypted partition and you’re all set.

But I don’t even trust TrueCrypt enough to unlock my already encrypted files!

If you’re just using TrueCrypt to open an existing file container so that you can copy your files out of there and into your newly created LUKS container I think you’ll be OK. That said there is a way for you to still use your existing TrueCrypt file containers without actually using the TrueCrypt application.

First install an application called tc-play. This program works with the TrueCrypt format but doesn’t share any of its code. To install it simply run:

# sudo apt-get install tcplay

Next we need to mount your existing TrueCrypt file container. For the sake of this example we’ll assume your file container is called TOPSECRET.tc.

We need to use a loop device but before doing that we need to first find a free one. Running the following command

# sudo losetup -f

should return the first free loop device. For example it may print out

/dev/loop0

Next you want to associate the loop device with your TrueCrypt file container. You can do this by running the following command (sub in your loop device if it differs from mine):

# sudo losetup /dev/loop0 TOPSECRET.tc

Now that our loop device is associated we need to actually unlock the TrueCrypt container:

# sudo tcplay -m TOPSECRET.tc -d /dev/loop0

Finally we need to mount the unlocked TrueCrypt container to a directory so we can actually use it. Let’s say you wanted to mount the TrueCrypt container to a folder in the current directory called SecretStuff:

# sudo mount -o nosuid,uid=1000,gid=100 /dev/mapper/TOPSECRET.tc SecretStuff/

Note that you should swap your own uid and gid in the above command if they aren’t 1000 and 100 respectively. You should now be able to view your TrueCrypt files in your SecretStuff directory. For completeness sake here is how you unmount and re-lock the same TrueCrypt file container when you are done:

# sudo umount SecretStuff/
# sudo dmsetup remove TOPSECRET.tc
# sudo losetup -d /dev/loop0

This post originally appeared on my personal website here.

Best Linux Distro For 2017 That Fits Your Needs

March 11th, 2017 No comments

What Is The Best Linux Distro For 2017?

So what is the best Linux distro? If you know Linux you may know that there are a lot and a lot of Linux distros out there and you can check most of them from distro watch website

https://distrowatch.com/

 

You may try few of them so what is the difference between them and which one of them suitable for you and what is the best Linux distro?

Well that question needs you to walk around and what other provide and Pros and Cons of everyone but I gather some information from the web about the most used and loved distros that you might use and fit yourself with one of them

I’m going to walk through every one of those distros and you will choose the best Linux distro yourself according to your needs

 

Elementary OS: Elegant Looking and fast speed

best linux distro elementary-os
best Linux distro elementary-os

Elementary OS is a Linux distribution based on Ubuntu. It uses Pantheon desktop environment which gives the distro the beautiful looking and lightweight on your PC

So if your concern about the best looking this is the best Linux distro for you

https://elementary.io/

 

Linux Mint: Best Distro for Desktop Computers

best linux distro linux mint

They call this distro Mac OS X of the Linux because it is the best Linux distro for laptops and desktops some people might say they do not prefer it because of the desktop environment which is called Cinnamon But now it is LTS (long term support) and is more stable than ever and developers of that desktop spend a lot of time to make it better than ubuntu so if you are searching about powerful computing this is the best Linux distro that you might need

https://www.linuxmint.com/

 

Tails: Best Distro for Privacy

best linux distro tails os

Nothing beats tails distro in privacy and security because that was the purpose of that distro It’s a Debian-based distribution that gives you privacy

So if your privacy matters this is the best Linux distro you should choose

https://tails.boum.org/

 

CentOS: Best Distro for Servers

best linux distro centos

If you check the servers around the world you will notice that the huge percent of servers uses centos specially and this is because of one very important thing

The famous and cool hosting control panel cPanel runs only on CentOS

And for many people that might let them choose it

So for Servers CentOS is the best distro that you should go with

https://www.centos.org/

 

Arch Linux: Simplicity and Customization

best linux distro arch linux

Arch Linux is the best Linux distro for those who want to learn everything about Linux

Experts categorize this distro as the most customizable Linux distro on the web and with the rich documentation on their website that makes it the best one Geeks

https://www.archlinux.org/

 

Lubuntu and Xubuntu: old hardware compatible

best linux distro lubuntu

If your hardware is a bit old then you might need something light that you can run without problems and Hang

For this sake, there is a lightweight desktop environment like LXDE and XFCE

Lubuntu comes with LXDE and Xubuntu comes with XFCE and both are lightweight

So if the old hardware is your limit these might be the best one that you should try

http://lubuntu.net/

http://xubuntu.org/

 

Steam OS: Linux Gaming

best linux distro steamOS

Many gamers use windows for gaming and if they love Linux they may dual boot with Linux till coming to that distro of Linux which is dedicated for gamers and games so if you are a gamer this is the best one for you

http://store.steampowered.com/steamos/

 

Keep in mind that all the mentioned distros are the best when writing that article, the world is changing everyday who knows what will be the best next? see you then

This post was originally published on Like Geeks site here.

Categories: LikeGeeks, Linux Tags:

Using a swap file instead of a swap partition in linux

March 11th, 2017 2 comments

Historically linux distributions have created a dedicated partition to be used as swap space and while this does come with some advantages there are other issues with it as well. Being a fixed size partition means it is relatively difficult to later change your mind about how much swap your system actually needs.

Thankfully there is another way: using a swap file instead of a swap partition.

To do this all you need to do is create a file that will hold your swap, set the right permissions to it, format it and use it. The ArchWiki has an excellent guide on the whole process here but I’ve re-created my steps below.

I like to use fallocate but you could also use dd or whatever. For example the following will create a 2GB swap file in the root directory:

sudo fallocate -l 2G /swapfile

Next up set the permissions:

sudo chmod 600 /swapfile

Format it:

sudo mkswap /swapfile

Use it:

sudo swapon /swapfile

That’s pretty much it. At this point you have the ability to add as much swap (via swap files) as you’d like. If you ever want to stop using swap, for example to get rid of the file when you’re done, simply issue the following command:

sudo swapoff /swapfile

One other thing to note is that every time you reboot your system you will have to re-run the swapon command above. To avoid this you can add it to your fstab file so that it is done on startup.

/swapfile none swap defaults 0 0

The nice thing about using swap files is that they are really flexible, allowing you to allocate as much or as little as you need at any given time.

Categories: Linux, Tyler B Tags: ,