Jumat, 31 Maret 2023

8 Immutable Linux Distributions for Those Looking to Embrace the Future

8 Immutable Linux Distributions for Those Looking to Embrace the Future

Every distro is tailored for a range of purposes. Some are configured to work on old computers, some aim to great user experience and some focus on security.

Immutable distributions were not what users wanted a couple of years back. But, recently, more projects are focusing on the immutability aspect as a core feature of the Linux distribution.

Why is that? And, what are all the options available? Before you get to the list, let me briefly tell you more about immutability:

What is an immutable Linux distro?

An immutable distro ensures that the operating system's core remains unchanged. The root file system for an immutable distro remains read-only, making it possible to stay the same across multiple instances. Of course, you can change things if you would like to. But, the ability remains disabled by default.

How is it useful?

Traditionally, immutable distributions existed to allow for easier testing and container-based software development. Furthermore, immutability provides you with better security and reliable updates for your operating system.

Back then, the focus on such features was limited to distros aimed for professionals and developers. Now, it is being incorporated for daily desktop users.

📋
The list is in no particular ranking order. And, some options are still in their early phases of development.

1. carbonOS

8 Immutable Linux Distributions for Those Looking to Embrace the Future

carbonOS is an upcoming independent Linux distro (at the time of writing this). It focuses on providing a seamless user experience with robust tech at its core.

It takes a Flatpak-first and container-first approach. carbonOS also aims to provide safe system updates, and verified boot as some features that not all atomic distros offer.

In addition to its unique traits, it also wants to focus on providing an excellent GNOME desktop experience to users.

Suggested Read 📖

carbonOS: This Upcoming Independent Distro is All About UX and Robust Experience
carbonOS is a new upcoming distro on the radar. Explore more about it here.
8 Immutable Linux Distributions for Those Looking to Embrace the Future

2. Fedora Silverblue

8 Immutable Linux Distributions for Those Looking to Embrace the Future

Silverblue is a variant of Fedora Workstation with immutability. It is one of the most popular immutable distributions out there.

The user interface and the experience remains unchanged from a typical Fedora Workstation release. Whenever you have a new Fedora release, expect a new Silverblue release as well.

Fedora Silverblue aims to offer a stable experience which is useful for testing and container-based software development. You can always roll back to the previous version of the operating system if something goes wrong after an update.

3. Flatcar Container Linux

8 Immutable Linux Distributions for Those Looking to Embrace the Future

A community-built Linux distribution tailored for container workloads, as the name suggests.

You get a minimal OS image that includes only the tools needed to run containers, no package manager, and no configuration hassle.

If you want to have a reliable infrastructure for your containers, Flatcar can be a nice option that is scalable, secure, and simple at the same time. Explore more about it on its GitHub page.

4. openSUSE MicroOS

8 Immutable Linux Distributions for Those Looking to Embrace the Future

openSUSE MicroOS is built for servers where one needs to deploy containers or work with automated workflows.

It relies on transactional updates utilizing btrfs with snapshots, that helps save the file system's history without occupying much storage space.

Overall, MicroOS is a scalable, reliable, and secure option for server users.

5. Vanilla OS

8 Immutable Linux Distributions for Those Looking to Embrace the Future

Vanilla OS is a fairly new entrant to the immutability space. However, it managed to make waves with its release, and then switching to a Debian base, ditching Ubuntu right after its first stable release.

It aims to provide an easy-to-use desktop experience with reliability and immutable features.

6. Bottlerocket

Bottlerocket is a Linux-based open-source OS built by Amazon Web Services to run containers on its platform.

Unlike other options, its usage is limited to AWS.

It ensures that the customers using AWS services have minimal maintenance overhead and get to automate their workflows seamlessly. You can only use it as an Amazon Machine Image (AMI) when you create an Amazon Elastic Compute Cloud (EC2).

7. blendOS

8 Immutable Linux Distributions for Those Looking to Embrace the Future

blendOS is an interesting distro in development which aims to provide all the good things from other distributions.

In other words, you can install any type of package on the distro (RPM, DEB, etc.) while getting the immutability and update reliability as one would expect.

Suggested Read 📖

blendOS Aims to Replace All Linux Distributions
Ubuntu Unity’s lead has come up with a new distro that sounds like something everyone might want to keep an eye on.
8 Immutable Linux Distributions for Those Looking to Embrace the Future

8. Talos Linux

8 Immutable Linux Distributions for Those Looking to Embrace the Future

Yet another unique Linux distribution, designed for Kubernetes. Talos Linux is an intriguing option for cloud users/developers.

It is secure, immutable, and a minimal option that supports cloud platforms, bare metal, and virtualization platforms. You can easily launch a Talos cluster inside Docker too.

The OS runs in memory from a SquashFS, which leaves the entire primary disk to Kubernetes.

💬 What do you think about immutable Linux distros? Do you need them? Do you want to replace the popular options on your system with any of these in the future?



from It's FOSS https://ift.tt/zwyuCUc
via IFTTT

Rabu, 29 Maret 2023

FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

The NixOS series was concluded last week. Though NixOS is a lesser-known, niche distro, the series was appreciated by many FOSSers (It's FOSS readers).

This has given us the confidence boost to work on more tutorial series. openSUSE and Gentoo are on our target for the next distro series.

We are also starting a Rust tutorial series for beginners this week. For those who are into coding, this will provide a solid learning base for Rust programming.

💬 Let's see what else you have this week:

  • blendOS, a blend of all kinds of distributions
  • Beginning of Rust tutorial series
  • And more Linux news, open source applications, videos and memes

🫶 Newsletter sponsor: MALIBAL

MALIBAL is an innovative technology company that produces high-performance, custom Linux laptops for developers and content creators; mobile workstations for engineers, scientists, video editors, 3D modelers, and animators; and mobile servers for enterprise applications.

MALIBAL : Custom Linux Laptops, Workstations & Servers
MALIBAL is an innovative technology company that produces high-performance, custom Linux laptops, Linux mobile workstations, and Linux mobile servers.
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

📰 Linux News Round-up

Ubuntu Cinnamon Gets Official Ubuntu Flavor Status
A Cinnamon edition to the mix of Ubuntu flavors. Perfect!
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

🛒 Awesome deal for Linux users

Learn all about Linux with this mega book bundle from Packt. This library will help you deepen your understanding of the popular open-source OS—whether you’re a system administrator, network engineer, or simply interested in what Linux can do.

⏱ Ends on 10th April
💸 $1 or more
✅ Support Starlight Children’s Foundation with your purchase

Humble Tech Book Bundle: Linux MEGA Bundle by Packt
We’ve teamed up with Packt for our newest bundle. Get books like Mastering Linux Administration. Plus, pay what you want & support charity!
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

🧠 What we’re thinking about

Layoffs in the tech industry show no sign of stopping. Not just in the US, it's happening even in cost-effective geographies. This is the case when AI is still at the doorstep. As it picks up pace, Goldman Sachs predicts it will cut over 300 million jobs in the next ten years.

GitHub slashes engineering team in India
GitHub, the popular developer platform owned by Microsoft, has laid off virtually its entire engineering team in India.
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More
🗓️
On March 25, 1996, the movie Twister became the first feature film released on DVD in the United States.

⛓️️Tutorial series

This is the beginning of a new series. Rust is an increasingly popular programming language. It is also the only language other than C to be allowed in Linux Kernel.

Rust Basics Series #1: Hello World Program in Rust
In the first chapter of the Rust programming series, you learn to write and execute your first program in Rust.
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

The Terminal Basics series continues and in the seventh chapter, learn about copying files and directories.

Copy Files and Directories in Linux Command Line
Learn how to copy files and directories in Linux using the command line in this part of the Terminal Basics series.
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

‍✨ Project highlight

A new immutable Linux distro from the creator of Ubuntu Unity.  

blendOS Aims to Replace All Linux Distributions
Ubuntu Unity’s lead has come up with a new distro that sounds like something everyone might want to keep an eye on.
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

📹 What we are watching

A distro for Anime fans? Well, why not!


📱Application highlights

An advanced emoji picker for Linux

GitHub - KRTirtho/flemozi: Advanced⚡ Emoji Picker😀 for Linux🐧, Windows🪟 and macOS🍎
Advanced⚡ Emoji Picker😀 for Linux🐧, Windows🪟 and macOS🍎 - GitHub - KRTirtho/flemozi: Advanced⚡ Emoji Picker😀 for Linux🐧, Windows🪟 and macOS🍎
FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

🤣 Linux Humor

Favorite question for Linux users :)

FOSS Weekly #23.13: New blendOS Linux Distro, New Rust Series, Ubuntu Cinnamon and More

❤️ Enjoying FOSS Weekly?

Forward it to Linux-using friends and encourage them to subscribe (hint: it's here).

Become a Pro member and show your support 🙏

Join our community forum.

Something else? Share it with me by pressing the reply button.

Enjoy Linux to the fullest :)



from It's FOSS https://ift.tt/7ZdW5p9
via IFTTT

Linux Terminal Basics #7: Copy Files and Directories in Linux

Linux Terminal Basics #7: Copy Files and Directories in Linux

Copying files is one of the most basic yet crucial tasks you will be doing regularly.

Linux has a dedicated cp command for copying both files and directories (folders).

In this part of the Terminal Basics series, you'll learn to copy files and folders in the terminal.

📋
Just to recall, here's what you have learned so far in this Terminal Basics series:
- Change directories
- Make new directories
- List directory contents
- Create files
- Reading files
- Removing files and directories

Let's go on with the seventh chapter in the series.

Copying files in Linux command line

Let me show you a few examples of copying files.

Copy a file to another directory

To copy one file to another directory, all you have to do is follow the given command syntax:

cp Source_file Destination_directory

For example, here, I have copied a file named Hello.txt to the directory named Tux:

Linux Terminal Basics #7: Copy Files and Directories in Linux

And as you can see, the file has successfully been copied to the Tux directory.

Copy the file but rename it

You can choose to rename the file while copying it. Just give a different name to the 'target file'.

cp Source_file Renamed_file

For reference, here, I have copied a file named Hello.txt to the same directory by renaming it to Renamed_Hello.txt:

Linux Terminal Basics #7: Copy Files and Directories in Linux

Why would you do that? Say, you have to edit a config file. A good practice is to make a backup of the config file in the same location before editing it. This way, you can revert to the old configuration if things don't go as planned.

Copy multiple files to another location

To copy multiple files to another directory, execute the command in the following fashion:

cp File1 File2 File3 FileN Target_directory

Here, I copy multiple files to a new location.

Linux Terminal Basics #7: Copy Files and Directories in Linux
📋
When you are copying multiple files, renaming them would not be possible with just the cp command.

Deal with duplicate files while copying

By default, the cp command will override the file if a file with the same name exists in the target directory.

To avoid overriding, you can use the -n option with the cp command, and it won't override the existing files:

cp -n Source_File Destination_directory

For example, here, I have tried to copy two files that were already there in my targeted directory and used -v option to showcase what is being done by the command:

cp -n -v itsFOSS.txt LHB.txt LU.txt ~/Tux
Linux Terminal Basics #7: Copy Files and Directories in Linux

Interactively copy files

But what about when you want to override some files, whereas some should be kept intact?

Well, you can use the cp command in the interactive mode using the -i option, and it will ask you each time whether the file should be overridden or not:

cp -i Source_file Destination_directory
Linux Terminal Basics #7: Copy Files and Directories in Linux
🖥️
Practice all the above-discussed examples yourself. You already know about creating files and folders so recreate everything.

Copy directories in Linux command line

There is mkdir command to make new directories, rmdir to remove (empty) directories. But there is no cpdir command for copying directories.

You'll have to use the same cp command but with the recursive option -r to copy a directory with all its content to another location:

cp -r Source_dir Target_dir

For example, here, I have copied a directory named IF to LHB:

Linux Terminal Basics #7: Copy Files and Directories in Linux

But it copied the entire directory 🤨

So, what do you do when you only want to copy the directory's contents, not the directory itself?

Here's what you can do:

Copy only the contents of a directory (not the directory)

To copy only the contents of the directory, not the directory itself, you append /. at the end of the source directory's name:

cp -r Source_directory/. Destination_directory

Here, I want to copy the contents of a directory named IF which contains the following three files:

Linux Terminal Basics #7: Copy Files and Directories in Linux

And I will execute the following command to copy the file contents of the IF directory to LHB:

cp -r IF/. LHB
Linux Terminal Basics #7: Copy Files and Directories in Linux

You can also use Source_directory/* here.

Copy multiple directories

To copy multiple directories, you will have to execute the command in the following way:

cp -r Dir1 Dir2 Dir3 DirN Destiniation_directory

For example, here, I have copied two directories named IF and LU to the LHB:

cp -r IF LU ~/LHB
Linux Terminal Basics #7: Copy Files and Directories in Linux

You can do the same when you want to copy files from multiple directories but not the directory itself:

cp -r Dir1/. Dir2/. Dir3/. DirN/. Destination_directory
Linux Terminal Basics #7: Copy Files and Directories in Linux
🖥️
You can also rename the directories the same way you renamed files. 

Test your knowledge

Now, let's see how much you remember the lessons learned so far.

  • Create a directory called copy_practice
  • Copy the file /etc/services to this newly created folder
  • Create a folder named secrets under this directory and copy files /etc/passwd and /etc/services in it
  • Copy the services file in copy_practice to the secrets folder but don't overwrite it
  • Copy the secrets folder to your home directory
  • Delete the secrets and copy_practice directories

That would give you some practice.

It's going well so far. You have learned quite a few things. In the next chapter, you'll see about moving files and folders with mv command.



from It's FOSS https://ift.tt/ygRN2Vq
via IFTTT

Senin, 27 Maret 2023

Rust Basics Series #1: Create and Run Your First Rust Program

Rust Basics Series #1: Create and Run Your First Rust Program

The Rust programming language is one of the fastest adopted systems programming languages by developers and tech companies. It is also voted as one of the most loved programming languages by developers who use it on a daily basis. Rust has been getting this love for seven consecutive years now!

It is so popular that there are now two big efforts being carried out in the Linux ecosystem:

And that is just in the Linux ecosystem. Android's Bluetooth implementation Gabeldorsche is now written in Rust.

Do you see the rising popularity of Rust? You would probably like to learn coding in Rust.

Why should you consider Rust over other programming languages?

Rust is a programming language that has an extremely strict type system. As a result, you are "forced" to not write bad code in the first place (well, usually).

The Rust programming language has the following "goals":

  1. Speed: Rust's binaries are as fast as C binaries, sometimes outpacing C++ binaries!
  2. Memory safety: Rust has a huge emphasis on memory safety.
  3. Concurrency: Focusing on memory safety eliminates a lot of race condition-like scenarios and helps you introduce concurrency in your program.

Following are a few errors mistakes one might make in languages like C/C++ (but not with Rust):

  • Use after free
  • Double free
  • Accessing out-of-bound values
  • Using NULL
  • Inappropriate pointer arithmetic and/or access
  • Use of uninitialized variable(s)
  • Thread-unsafe multi-threading

Have a look at the issues caused by such issues at major corporations like Apple, Microsoft, Google, 0day etc,

Now that you know why one might want to choose the Rust programming language over any other one, let's start with the Rust language tutorial series!

Intended audience

For the love of Rust, I am writing this series of Rust tutorials to help you get acquainted with the concept of Rust programming.

This tutorial series is intended for folks already familiar with programming languages like C and C++. I assume you know basic terms like variables, functions, loops, etc.

The only prerequisites that I ask from you are your time and some effort.

Installing the Rust compiler

I would prefer that you have the Rust compiler installed locally. You can do so by running the following command:

curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh
Rust Basics Series #1: Create and Run Your First Rust Program
Installing Rust

Apart from the Rust Compiler, I also recommend installing a few more tools that will help you in the development process:

rustup component add rust-src rust-analyzer rust-analysis
💡
If you do not wish to install the Rust compiler, no worries. You can run the Rust code directly in your browser! Just head over to the Rust Playgrounds website and paste the code discussed here.

Hello Rust!

Since Dennis Ritchie and Brian Kernighan introduced the C programming language with the "Hello world" program, it has become a custom in the UNIX world to do so with any new programming language you learn.

So let's write our Hello World program in Rust as well.

I will create a project directory called learn-rust-its-foss in my home directory. In there, I create another directory called hello-world. Inside that, I will create a main.rs file:

// this code outputs the text
// "Hello world!" to `stdout`

fn main() {
    println!("Hello world!");
}
📋
Just like C, C++ and Java source files have the extensions .c, .cpp and .java respectively, the Rust source files have the .rs file extension.

As a C/C++ programmer, you might have used gcc on Linux, clang on macOS and MSVC on Windows. But to compile Rust code, the language creators themselves provide an official rustc compiler.

Running a Rust program is the same as executing C/C++ program. You compile the code to get the executable file and then run this executable to run the code.

$ ls
main.rs

$ rustc main.rs

$ ls
main  main.rs

$ ./main
Hello world!

Nice!

Deciphering Rust code

Now that you wrote, compiled and ran your first ever Rust program, let's de-structure the "Hello world" code and understand each part.

fn main() {
}

The fn keyword is used to declare a function in Rust. Following it, main is the name of this particular function that was declared. Like many compiled programming languages, the main is a special function used as your program's entry point.

Any code written inside the main function (between the curly brackets { }) gets executed upon program start-up.

println macro

Inside the main function, there is one statement:

    println!("Hello world!");

Like the C language's standard library has the printf function, Rust language's standard library has the println macro. A macro is similar to a function but it is distinguished by the exclamation mark. You'll learn about macros and functions later in this series.

The println macro takes in a format string and puts it to the program's output (in our case, that is terminal). Since I wish to output some text instead of a variable, I will enclose the text inside double quotes ("). Finally, I end this statement using a semi-colon to denote the end of the statement.

📋
Just know that anything that looks like a function call but has an exclamation mark (!) before the opening parentheses is a macro in the Rust programming language.

Comments

Rust follows the known commenting style of the C programming language. A single line comment starts with two forward slashes (//) and a multi-line comment is started by /* and ends with */.

// this is a multi-line comment
// but nothing stops me to doing the same
// on the second or third line too!

/*
 * this is a "true" mutli-line comment
 * because it is _fancy_
 */

Conclusion

You just took the first step towards coding in Rust with the Hello World program.

As a practice, perhaps you can write and execute a Rust program that prints "Yes! I did Rust".

In the next part of the series, you'll learn to use variables in your Rust program. Stay tuned!



from It's FOSS https://ift.tt/BPaMX39
via IFTTT

Sabtu, 25 Maret 2023

How to Install and Use Neovim on Ubuntu and other Linux Distributions

How to Install and Use Neovim on Ubuntu and other Linux Distributions

You must have heard about the famous Vim text editor already. However, this article is about its fork, Neovim.

Vim is also a fork of vi which makes Neovim fork of a fork. So, you can end up using anything for some of its unique traits.

If you decide to use Neovim, let me help you get started with it on Ubuntu and other Linux distributions.

Neovim: Overview

How to Install and Use Neovim on Ubuntu and other Linux Distributions
Neovim with a GUI

Neovim is a project known for its simple maintenance and community contributions. Moreover, the development effort is distributed well between multiple developers.

For end-users, Neovim is much more extensible than one would expect. The aim of Neovim is to provide better applications of it without compromising the traditional capabilities of Vim.

With a GUI for Neovim, you can get an enhanced editing experience.

Suggested Read 📖

Vim vs Nano: What Should You Choose?
Vim and Nano are two popular terminal text editors. How are they different? What’s best for you? Let us find out.
How to Install and Use Neovim on Ubuntu and other Linux Distributions

Features of Neovim

While you can explore all about it on its official website and its GitHub page. Let me highlight some features:

  • Modern Graphical Interfaces
  • API access from many language including (C/C++, C#, Go, Haskell, Java/Kotlin, JavaScript/Node.js, Lua, Perl, Python, Ruby, Rust to name a few)
  • Embedded, scriptable terminal emulator
  • Asynchronous job control
  • Shared data among multiple instances
  • XDG base directories support
  • Compatible with most Vim plugins, including Ruby and Python plugins
💡
We advise you to learn the usage of Vim and Neovim before you start using it.

Suggested Read 📖

11 Pro Vim Tips to Get Better Editing Experience
You can learn plenty of Vim tips on your own, or you can learn it from others’ experiences.
How to Install and Use Neovim on Ubuntu and other Linux Distributions

Installing Neovim on Ubuntu and Linux

Installing Neovim is simple due to its popularity. As Neovim is available in official repos of any distribution you pick.

We also have a guide to install Vim on Linux, in case you want that.

To install Neovim on Ubuntu, just click on the Ubuntu Software icon in the dock. Then, search for Neovim. You can select the snap or the deb version as per your preference. However, the deb package version will be an outdated version of Neovim.

How to Install and Use Neovim on Ubuntu and other Linux Distributions

And, if you do not want the snap version, you can grab the latest deb file from the Github releases page for Neovim. If you look closer in the releases page, there is an Appimage file as well.

If you want to utilize the terminal instead of the GUI, here's what you can do:

For Ubuntu and Debian based distributions, enter the following command to install

sudo apt install neovim

For Manjaro and Arch Linux, use the below command to update your system and install Neovim

sudo pacman -Syu neovim

For Fedora, use the following command

sudo dnf install -y neovim

To install the Flatpak, you can use this command

flatpak install flathub io.neovim.nvim

Lastly, to install the snap package use the below command

sudo snap install nvim --classic

If you prefer building software from source, follow the steps given on the project's Github page.

How to use Neovim

To use Neovim after installation is complete, just launch it from the application menu by pressing the super key and typing the name "neovim" without quotes. This will open a terminal window with Neovim open.

How to Install and Use Neovim on Ubuntu and other Linux Distributions

Or you can just open any Terminal Emulator of your choice and enter the following command

nvim

Yes, not "neovim" but just "nvim". For example, to edit /etc/fstab enter the following command.

sudo nvim /etc/fstab

Now the fstab file will open as shown in the screenshot below.

How to Install and Use Neovim on Ubuntu and other Linux Distributions

Don't worry if you cannot exit the editor; press Shift+Z+Z. For example, if this shortcut key confuses, use the keys you need to type "ZZ" (uppercase) without quotes in any text editor.

On that note, I should re-iterate that you need to learn Vim or Neovim and go through the documentation to efficiently make use of all its features.

Conclusion

Installing and launching Neovim is pretty straightforward but learning it will require some keyboard grinding for sure.

This was just an overview of the editor. I am not an expert on this, but I hope this serves well for all the beginners out there!

💬 Do you use Neovim? Share your experience on it in the comments below.



from It's FOSS https://ift.tt/8kgmJoz
via IFTTT