We are still actively working on the spam issue.

Difference between revisions of "GNU/Linux"

From InstallGentoo Wiki
Jump to: navigation, search
m (Recommended Distributions: wtf)
m (added the word 'freetards' and added part about some people calling it GNU Linux.)
 
(106 intermediate revisions by 29 users not shown)
Line 1: Line 1:
[[File:gnuandtux.jpg|thumb|GNU and Tux]]
+
{{cleanup|Possible breach of [[IG:NEUTRAL]]}}
  
'''Linux''' at its core is a kernel, the central driving force of an operating system that allocates resources to other aspects of the system. [https://en.wikipedia.org/wiki/Linux Linux], along with the [https://gnu.org/ GNU system] (which is closely associated with the [https://fsf.org/ Free Software Foundation]) are now collectively referred to as '''GNU/Linux''', and make up a complete operating system which is widely used today by millions across the world. To read more about the history of the GNU project and Linux, see [https://gnu.org/gnu/linux-and-gnu.html this article].
+
''For the GNU Project, see [[GNU]]. For the organization behind GNU Project, see [[Free Software Foundation]]. For the kernel, see [[Linux (kernel)]].''
  
== Why use GNU/Linux? ==
+
[[File:gnuandtux.jpg|thumb|GNU and [[Tux,]] mascots of the GNU Project and Linux, respectively.]]
  
The free software philosophy is about an open and shared operating system which is not only free as in money, but free as in freedom. The GNU/Linux system gives users more control over their computing experience than competing operating systems such as Windows, which could contain malicious features without the user's knowledge.
+
'''Linux''' is only a kernel, the central driving force of an operating system that allocates resources to other aspects of the system. [[Wikipedia:Linux |Linux]], along with the [https://gnu.org/ GNU system] (which is closely associated with the [https://fsf.org/ Free Software Foundation (FSF)]) are collectively referred to as '''GNU/Linux''' or sometimes GNU Linux, make up a complete operating system which is widely used today by millions of freetards across the world.
  
== What's all this about distributions? ==
+
== History ==
There are a lot of GNU/Linux distributions, also known as distros.
 
  
Most distros are at least somewhat similar with each other. The main differences are between the [[init system]], [[package manager]] (and the repositories it has access to), [[GNU/Linux ricing#Desktop Environments|desktop environment]], (bloat) and default configurations. Most distros have their own little niche. Some are FSF compatible (or almost), for [[Ricing|ricing]], for getting shit done or just because you hate yourself or just love pain ([[Arch]]/[[Gentoo]]).
+
The GNU Project, founded by [[Richard Stallman]] in 1983, had the goal of creating a "complete [[Unix]]-compatible software system" composed entirely of free software. Later, in 1985, Stallman started the [[Free Software Foundation]] and then went on to write the GNU General Public License (GNU [[GPL]]) in 1989. By the early 1990s, many of the programs required in an operating system (such as libraries, compilers, text editors, a Unix-like shell, and a windowing system) were completed, although low-level elements such as device drivers, daemons, and the kernel were stalled and incomplete.
Always at least try another distro before saying that you hate it. You will find that all of them have their own qualities.
 
  
When choosing a distro, keep some things in mind. Linux is about choice. There are stable and rolling distributions. Some stable distros can be made rolling by selecting the proper repositories and vice versa. Some are semi-rolling, they release snapshots of packages. Stable is best for beginners and rolling is best for developers and advanced users who want the latest and greatest.  
+
In 1991, while attending the University of Helsinki, Torvalds became curious about operating systems and frustrated by the licensing of [[MINIX]], which at the time limited it to educational use only. He began to work on his own operating system kernel, which eventually became Linux.
  
Almost every distro can be riced by setting up the right [[GNU/Linux ricing#Desktop Environments|DE]] and/or [[GNU/Linux ricing#Window managers|WM]]. DEs can be tiling or stacking.
+
[[Linus Torvalds]] stated that if the GNU kernel had been available at the time (1991), he would not have decided to write his own.
  
==Recommended Distributions==
+
Torvalds began the development of Linux on MINIX and applications written for MINIX were also used on Linux. Later, Linux matured and further Linux development took place on GNU/Linux systems. GNU applications also replaced all MINIX components, because it was advantageous to use the freely available code from the GNU Project to make a fledgling operating system; code licensed under the GNU GPL can be reused in other projects as long as they also are released under the same or a compatible license. Torvalds initiated a switch from his original license, which prohibited commercial redistribution, to the GNU GPL. Developers worked to integrate GNU components with Linux, making a fully functional and free operating system.
See also: [[Babbies First Linux]]
 
[[File:ospicker.png|thumb|Pick your poison]]
 
  
These are various distros that are recommended by people on /g/. [http://distrowatch.com Distrowatch] is a good resource for discovering new Linux distributions.
+
== Why use GNU/Linux? ==
  
===Debian-based===
+
The free software philosophy is about an libre and shared operating system which is free as in freedom and usually, but not always, free as in free shit. The GNU/Linux system gives users more control over their computing experience than competing operating systems such as [[Windows]], which contains malicious features without the user's knowledge.
  
These Linux distributions are descended from Debian GNU/Linux and typically use the .deb package format and the APT package manager.
+
== What's all this about distributions? ==
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Debian.png|frameless|100px|link=Debian]]
 
[http://debian.org debian.org]
 
| valign="top" |[[Debian|Debian GNU/Linux]]
 
'''Pros'''
 
*Along with mainline Stable release, offers the next Stable as Testing along with a rolling release Unstable
 
*Reported to host over 43000 packages in its repository, has more software available to install than any other distribution
 
*Available in many architectures that other distributions simply don't support
 
'''Cons'''
 
*Uses the APT package manager, prone to disastrous dependency problems
 
*Following its erratic release schedule, during which Testing will go into a feature freeze, Unstable will also freeze
 
*Run by orthodox Stallmanites, may take several extra steps to acquire drivers and other software that they deem nonfree
 
|-
 
|}
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Ubuntu.png|frameless|100px|link=Ubuntu]]
 
[http://ubuntu.com ubuntu.com]
 
| valign="top" |[[Ubuntu|Ubuntu]]
 
'''Pros'''
 
*The distro that brought Linux to the common man; if Linux were to ever make a commercial breakthrough, Ubuntu would be on the forefront
 
*Has available several live images featuring several different desktop environments, known as [[Ubuntu#Ubuntu_Flavours|flavors]]
 
'''Cons'''
 
*Leadership is known for making crazy decisions, such as pushing crappy new software such as the Unity desktop, the Mir display server, and the Upstart init system (deprecated by systemd)
 
*Is reported to contain Amazon spyware within the Unity desktop
 
|-
 
|}
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Logo_Linux_Mint.png|frameless|100px|link=Linux Mint]]
 
[http://linuxmint.org linuxmint.org]
 
| valign="top" |[[Linux Mint|Linux Mint]]
 
'''Pros'''
 
*Completely compatible with Ubuntu; any commercial support Ubuntu receives, Mint will leech
 
*Offers the Cinnamon desktop environment, arguably one of the best DEs ever
 
*Offers the MATE desktop environment, a maintained and regularly updated fork of GNOME 2
 
 
 
'''Cons'''
 
*Often further modifies its packages to make them 'Mintier', can lead to problems such as breakage
 
*The upgrade process is considered less stable than Ubuntu's
 
 
 
|-
 
|}
 
 
 
===RPM-based===
 
 
 
These distributions utilize RPM packages, and stemming from the success of Red Hat Enterprise Linux, tend to be more business-oriented than the community-driven Debian.
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Fedora-logo.png|frameless|100px|link=Fedora]]
 
[http://getfedora.org getfedora.org]
 
| valign="top" |[[Fedora|Fedora]]
 
'''Pros'''
 
*Cutting edge of the Linux world, new features will be developed here before spreading across every other distro
 
*sponsored by RedHat, the most successful and powerful organization Linux has ever seen, gets shit done
 
'''Cons'''
 
*strict guidelines on what gets into its repositories, acquiring niche software can be a real pain in the ass
 
*uses the piece of shit Anaconda installer
 
*is rather tricky to install minimally
 
|-
 
|}
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Centos-logo.png|frameless|100px|link=CentOS]]
 
[http://centos.org centos.org]
 
| valign="top" |[[CentOS|CentOS]]
 
'''Pros'''
 
*recompiled directly from Red Hat Enterprise Linux source code, is essentially a free version of RHEL
 
*receives assistance from RedHat themselves to make it a premier enterprise Linux distribution
 
'''Cons'''
 
*being a server-oriented enterprise operating system, packages are very stable thus old and not suited for desktop use
 
|-
 
|}
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:opensuse-logo.png|frameless|100px|link=openSUSE]]
 
[http://opensuse.org opensuse.org]
 
| valign="top" |[[openSUSE|openSUSE]]
 
'''Pros'''
 
*features various powerful tools unique to openSUSE such as the YaST configuration program and the openSUSE Build Service
 
'''Cons'''
 
*is weird
 
|-
 
|}
 
 
 
===User-centric===
 
 
 
These distributions are designed for the purpose of giving the user control of their operating system. They are significantly harder to get into than those mentioned previously.
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Arch-linux-logo.png|frameless|100px|link=Arch]]
 
[http://archlinux.org archlinux.org]
 
| valign="top" |[[Arch Linux|Arch]]
 
'''Pros'''
 
*features an extensive wiki that can enable even not very smart people to use their operating system
 
*is known for its Arch User Repository, a collection of ports package files written by community
 
'''Cons'''
 
*uses the systemd init system and a full-blown binary-based package manager, in terms of customizability is generally outclassed by other distros
 
*is maintained by the same incompetent teenagers who use it
 
|-
 
|}
 
 
 
{| border="0" cellpadding="10" cellspacing="0"
 
|-
 
| style="text-align: center;" | [[File:Cruxlogo.png|frameless|100px|link=CRUX]]
 
[http://crux.nu crux.nu]
 
| valign="top" |[[CRUX|CRUX]]
 
'''Pros'''
 
*is very small, a full installation is usually less than 2GB in size
 
*based on the philosophy of 'keep it simple', uses BSD-style init system and ports for package management
 
'''Cons'''
 
*only provides software for a basic desktop install, if you require any unique software you may find yourself writing a lot of pkgfiles
 
|-
 
|}
 
  
{| border="0" cellpadding="10" cellspacing="0"
+
A distribution or distro, is an operating system, built from a software collection, with Linux as the kernel. Most distros are at least somewhat similar with each other. The main differences are between the [[init system]], [[package manager]] (and the repositories it has access to), [[GNU/Linux ricing#Desktop Environments|desktop environment]], default configurations and programs. Most distros have their own little niche. Some are FSF approved, for [[Ricing|ricing]], for getting shit done or just because you hate yourself or just love pain ([[Arch]]/[[Gentoo]]). Always at least try another distro before saying that you hate it. You will find that all of them have their own qualities.
|-
 
| style="text-align: center;" | [[File:Gentoo.png|frameless|100px|link=Gentoo]]
 
[http://gentoo.org gentoo.org]
 
| valign="top" |[[Gentoo|Gentoo]]
 
'''Pros'''
 
*features the omnipotent Portage packge manager
 
*uses USE flags to install dependencies based on specific applications and uses
 
*uses a stage 3 tarball instead of a bootstrap script, can be installed anywhere from anywhere
 
*every aspect of installing packages can be controlled by a simple make.conf that dictates CFLAGS, build options, and USE flags
 
'''Cons'''
 
*is famous for an incredibly daunting install process, spawning the 'install gentoo' meme
 
*is fucking huge
 
|-
 
|}
 
  
{| border="0" cellpadding="10" cellspacing="0"
+
When choosing a distro, keep some things in mind: [http://islinuxaboutchoice.com/ Linux (kernel) itself is not about choice], but its variety of distros however are. There are stable and [[Wikipedia:Rolling_release |rolling]] distributions. Some stable distros can be made rolling by selecting the proper repositories and vice versa. Some are semi-rolling, they release snapshots of packages. Stable is best for beginners and rolling is best for developers and advanced users who want the latest and greatest.
|-
 
| style="text-align: center;" | [[File:Slwr.jpg|frameless|100px|link=Slackware]]
 
[http://slackware.com slackware.com]
 
| valign="top" |[[Slackware|Slackware]]
 
'''Pros'''
 
*oldest Linux distribution still in active development, hailed as the 'elder god distro'
 
*follows UNIX philosophy to the letter
 
*run by a singular benevolent dictator for life, will not change without his sayso, will not push a stable release unless he feels a particular build is good enough
 
*is complete in user-centricism, won't even resolve its own dependencies
 
'''Cons'''
 
*See above
 
|-
 
|}
 
  
===Stallman-style Free distros===
+
Almost every distro can be riced by setting up the right [[GNU/Linux ricing#Desktop Environments|DE]] and/or [[GNU/Linux ricing#Window managers|WM]].
  
The GNU Project maintain their own list of recommended distros that they deem 'free', as in completely devoid of nonfree software. That list can be found [http://www.gnu.org/distros/free-distros.en.html here].
+
==Recommended distributions==
 +
See: [[Babbies First Linux]]
  
 
== Installation ==
 
== Installation ==
Line 189: Line 37:
 
* [[VirtualBox]]
 
* [[VirtualBox]]
  
=== Making a Bootable USB Installer ===
+
=== Making a bootable USB installer ===
 
In addition to installing from CD, you can also install from a USB flash drive. A USB installer created using the following steps should work with both BIOS and UEFI systems. However, for UEFI systems you may need to disable "Secure Boot" in the UEFI configuration panel. For UEFI support your flash drive ''MUST'' be formatted as fat32 (also called vfat in GNU/Linux) when attempting to boot from it.
 
In addition to installing from CD, you can also install from a USB flash drive. A USB installer created using the following steps should work with both BIOS and UEFI systems. However, for UEFI systems you may need to disable "Secure Boot" in the UEFI configuration panel. For UEFI support your flash drive ''MUST'' be formatted as fat32 (also called vfat in GNU/Linux) when attempting to boot from it.
  
 
# Download the disk image of your chosen distribution.
 
# Download the disk image of your chosen distribution.
# Verify the integrity of the download if a checksum is provided.
+
# Verify the integrity of the download if a checksum is provided. (optional, it is recommended)
 
# Use the image tool recommended in your distribution's install notes to copy the iso to your USB-drive and make it bootable. Note: There are many universal tools available, but they do not always work correctly for all distributions. Some of them include:
 
# Use the image tool recommended in your distribution's install notes to copy the iso to your USB-drive and make it bootable. Note: There are many universal tools available, but they do not always work correctly for all distributions. Some of them include:
#*[http://unetbootin.sourceforge.net/ UNetbootin]
+
#*[https://rufus.ie/ Rufus]
#*[http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows Pendrivelinux]
+
#*[https://etcher.balena.io/ Balena Etcher]
 +
#*[http://unetbootin.github.io/ UNetbootin]
 
#*[http://www.linuxliveusb.com/en/home LinuxLive USB Creator]
 
#*[http://www.linuxliveusb.com/en/home LinuxLive USB Creator]
#*[https://apps.ubuntu.com/cat/applications/usb-creator-gtk/ Startup Disk Creator]
+
#*[https://www.fedoraproject.org/en/workstation/download/ Fedora Media Writer]
#*[https://fedorahosted.org/liveusb-creator/ Fedora LiveUSB-Creator]
 
  
'''GNOME Disk Utility Method'''
+
'''GNOME Disk Utility method'''
  
Any Linux distribution running GNOME can easily make a bootable USB drive through nautilus and gnome-disk-utility. Just right click your downloaded .iso file and select "Open with Disk Image Writer." Make sure you don't need any of the data on the USB stick! When GNOME Disk Utility opens, pick the flash drive from the "Destination" drop down menu and click "Start Restoring."
+
Any distribution running GNOME can easily make a bootable USB stick through gnome-disk-utility. First make sure you don't need any of the data on the USB stick. Next, open GNOME Disks and select the USB stick in the list. Unmount it via the stop button. Lastly, click the advanced tools gear icon, restore disk image and select your ISO file. When the process is complete you can eject the USB stick and boot from it.  
  
'''Manual Terminal Method'''
 
  
* This method requires you are already running Linux and have an iso specifically crafted for USB drives or a "hybrid" CD/USB image. Most distributions will mention the type of iso on their download page.
+
'''Ventoy Method'''
* Locate your USB drive using the command ''lsblk''. You should see the path for your USB drive, for example: /dev/sdb1. Through running this command, you should also see the size of the USB drive so you can be sure you are running your commands to the correct storage device.
 
*Next, use the command ''dd'' as '''root'''. The ''dd'' command has the following usage (where ''if'' is the source and ''of'' is the target):
 
  
    dd if=/path/to/disc/image of=/path/to/usb/drive
+
[https://www.ventoy.net/en/index.html Ventoy], unlike most other media creators, can hold multiple distributions on one USB Drive, allowing the user to select which one to load upon boot. This method works on both Windows and Linux, though installing it differs a bit depending on operating system.
  
<div style=" background: #FFB2B2; font-size:95%; border-style: solid; border-width: 1px 1px 1px 5px;border-color:#ff0000; text-align:left; color:#000; padding:0.2em 0.4em;">
+
*Windows
WARNING!!!
+
: To begin, [https://github.com/ventoy/Ventoy/releases/tag/v1.0.91 download] "ventoy-1.0.91-windows.zip." Once downloaded, unzip, and run <code>Ventoy2Disk.exe</code>, select your USB Drive, and click "install".
 +
 
 +
*Linux
 +
: First, [https://github.com/ventoy/Ventoy/releases/tag/v1.0.91 download] "ventoy-1.0.91-linux.tar.gz" Once downloaded, extract the file. From here, you'll need to use your terminal to run the script as sudo. Move the extracted folder to somewhere easy to access (We'll use ~/Downloads for this example. Now, in your terminal, run <code>sudo Downloads/ventoy-1.0.91/ventoy2Disk.sh -i /dev/sdX</code>. This will install Ventoy to whichever drive you selected as X (sdb,sdc,etc.) If you're unsure which drive is which, run <code>lsblk</code> to display all attached drives. It's usually safe to assume your USB Drive is the smallest one, but make sure.
 +
 
 +
Regardless of which OS you started with, you'll now have a Ventoy USB Drive. It'll mount as any other drive would, and you can now move .iso files onto it. Upon booting into Ventoy, you'll be able to select and run any .iso files you've added to the drive.
 +
 
 +
 
 +
'''Manual Terminal method'''
 +
 
 +
* This method requires you are already running GNU/Linux and have an iso specifically crafted for USB drives or a "hybrid" CD/USB image. Most distributions will mention the type of iso on their download page.
 +
* Using the commands <code>lsblk</code> or {{ic|fdisk -l}} (as exemplified bellow), find what [drive letter] is the letter of your removable device. Please note that it is the device (e.g. {{ic|/dev/sdb}}), and not the partition number (e.g. {{ic|/dev/sdb1}}).
 +
 
 +
{{ic|fdisk -l}}
 +
{{Warning|
 
* The ''dd'' command is also known as "Disk Destroyer" because it is very easy to annihilate the data on a device unintentionally.  
 
* The ''dd'' command is also known as "Disk Destroyer" because it is very easy to annihilate the data on a device unintentionally.  
* Make absolutely sure that "''of=/path/to/usb/drive''" is the correct device!
+
* Make absolutely sure that {{ic|of&#61;/dev/sd[drive letter]}} is the correct device!
</div>
+
}}
 +
 
 +
*Now use run dd to install the  iso in your device of choice.
 +
 
 +
{{bc|dd bs&#61;4M if&#61;[/path/to/distro.iso] of&#61;/dev/sd[drive letter]}}
  
 
An example of using the ''dd'' command could be:
 
An example of using the ''dd'' command could be:
  
    dd bs=4M if=/home/moot/Downloads/debian-7.3.0-amd64-netinst.iso of=/dev/sdb
+
{{bc|dd bs&#61;4M if&#61;'/home/moot/Downloads/debian-7.3.0-amd64-netinst.iso' of&#61;/dev/sdb}}
  
* Last, wait patiently until the command has executed. No outputs will be printed until the process is finished. You can check progress of a ''dd'' command by finding the process ID with ''ps aux | grep dd'' and issuing the ''kill -s USR1 <pid>'' command against it. Just don't forget the USR1 signal or you will terminate the process.
+
Remember to use " " if your path contains spaces.
  
== GNU/Linux Naming Controversy ==
+
* Last, wait patiently until the command has executed. No outputs will be printed until the process is finished. You can check progress of a {{ic|dd}} command by finding the process ID with {{ic|ps aux | grep dd}} and issuing the {{ic|kill -s USR1 <pid>}} command against it. Just don't forget the USR1 signal or you will terminate the process. Starting from GNU coreutils 8.2.4, you can append {{ic|status&#61;progress}} instead to check the progress.
  
The GNU/Linux naming controversy is a dispute regarding whether or not to refer to the operating system commonly known as Linux as GNU/Linux. GNU/Linux was a term originally created by the Free Software Foundation to refer to the combination of the GNU corelibs and the Linux Kernel, which they argued to form a functioning operating system. The Free Software Foundation recommends the term GNU/Linux because it argues the GNU project was part of a project to develop an operating system, from which the kernel was the last piece to complete (see GNU HURD). The Free Software Foundation suggests that the inclusion of the term GNU in the operating system’s name would recognize their contribution and their free software ideals ("Free Software as a Social Movement". ZNet.). Richard M. Stallman writes:
+
== GNU/Linux naming controversy ==
 +
 
 +
The GNU/Linux naming controversy is a dispute regarding whether or not to refer to the operating system as GNU/Linux, or as just Linux. GNU/Linux was a term originally created by the Free Software Foundation to refer to the combination of GNU and the kernel, Linux, which forms a functioning operating system. The Free Software Foundation recommends the term GNU/Linux because it argues the GNU project was a project to develop an operating system, from which the kernel was the last piece to complete (see [[GNU Hurd]]). The Free Software Foundation suggests that the inclusion of the term GNU in the operating system’s name would recognize their contribution and their free software ideals ("Free Software as a Social Movement". ZNet.). Richard M. Stallman writes:
  
 
''Today tens of millions of users are using an operating system that was developed so they could have freedom—but they don't know this, because they think the system is Linux and that it was developed by a student 'just for fun'.''
 
''Today tens of millions of users are using an operating system that was developed so they could have freedom—but they don't know this, because they think the system is Linux and that it was developed by a student 'just for fun'.''
  
On the opposite side of the argument, Linux supporters argue that the contribution of the Free Software Foundation is minimal (for example, GNU components make up only 8% of Ubuntu). Eric S. Raymond writes:
+
On the opposite side of the argument, "Linux" supporters argue that the contribution of the Free Software Foundation is minimal ([http://pedrocr.pt/text/how-much-gnu-in-gnu-linux/ for example, GNU components make up only 8% of Ubuntu]). Eric S. Raymond writes:
  
 
''Some people object that the name "Linux" should be used to refer only to the kernel, not the entire operating system. This claim is a proxy for an underlying territorial dispute; people who insist on the term GNU/Linux want the FSF to get most of the credit for Linux because [Stallman] and friends wrote many of its user-level tools. Neither this theory nor the term GNU/Linux has gained more than minority acceptance.''
 
''Some people object that the name "Linux" should be used to refer only to the kernel, not the entire operating system. This claim is a proxy for an underlying territorial dispute; people who insist on the term GNU/Linux want the FSF to get most of the credit for Linux because [Stallman] and friends wrote many of its user-level tools. Neither this theory nor the term GNU/Linux has gained more than minority acceptance.''
  
Linux proponents also argue that since the operating system is often referred to as Linux by the mainstream media and most users, that it should be used as such, as opposed to GNU/Linux.  
+
When Linus Torvalds was asked in the documentary Revolution OS whether the name "GNU/Linux" was justified, he replied:
 +
 
 +
''Well, I think it's justified, but it's justified if you actually make a GNU distribution of Linux ... the same way that I think that "Red Hat Linux" is fine, or "SuSE Linux" or "Debian Linux", because if you actually make your own distribution of Linux, you get to name the thing, but calling Linux in general "GNU Linux" I think is just ridiculous.''
  
 +
"Linux" proponents also argue that since the operating system is often referred to as Linux by the mainstream media and most users, that it should be used as such, as opposed to GNU/Linux.
  
 +
== Let's learn about GNU/Linux ==
  
== Let's Learn About GNU/Linux ==
+
If you have any questions about GNU/Linux or want to join some discussion, then consider heading to the [[/fglt/| Friendly GNU/Linux Threads]] on /g/
  
==== The Terminal ====
+
==== The terminal ====
  
The terminal, also known as the Command Line, Shell, or just cold, emotionless text on a black background, gives you access to the real power and beating heart of Linux. Linux by default uses BASH, or Bourne-Again Shell which is based on the shell program `sh' from UNIX,
+
The terminal, also known as the Command Line, Shell, or just cold, emotionless text on a black background, gives you access to the real power and beating heart of GNU. Most GNU/Linux systems use BASH (short for `Bourne-Again Shell') as the default shell, which is inspired by the shell program `sh' from UNIX, written by Steven Bourne of Bell Labs. Bash will be all of our terminal interaction.  
written by Steven Bourne of Bell Labs. Bash will be all of our terminal interaction.  
 
  
To manage multiple user sessions on a single machine, Linux (and UNIX) uses what is called a TeleTYpeWriter (TTY) for each user to interface with the main kernel. Each tty is handled by its own special device file, located in the directory /dev. It also uses Pseudo Terminal Slave (pts) to handle other types of terminal interface, but this
+
To manage multiple user sessions on a single machine, Linux (and UNIX kernels) uses what is called a TeleTYpeWriter (TTY) for each user to interface with the main kernel. Each tty is handled by its own special device file, located in the directory /dev. It also uses Pseudo Terminal Slave (pts) to handle other types of terminal interface, but this
 
is beyond the scope of this guide.
 
is beyond the scope of this guide.
  
Line 252: Line 120:
  
 
The shell uses files called stdout, stdin and stderr to handle text input and output to and from programs.
 
The shell uses files called stdout, stdin and stderr to handle text input and output to and from programs.
* stdin - Standard Input - All your typed text input goes into programs through here.
+
* {{ic|stdin}} - Standard Input - All your typed text input goes into programs through here.
* stdout - Standard Output - All successful program output goes to here.
+
* {{ic|stdout}} - Standard Output - All successful program output goes to here.
* stderr - Standard Error - All error messages and problem codes go to here.
+
* {{ic|stderr}} - Standard Error - All error messages and problem codes go to here.
  
 
You should get familiar with the man pages, which are essentially the manual, and will display help pages on almost all commands.
 
You should get familiar with the man pages, which are essentially the manual, and will display help pages on almost all commands.
    Usage: man COMMAND
 
  
Where COMMAND is replaced with whatever command you want help on. Press 'q' to exit a manual page. Alternatively, most commands will allow you to add --help on the end to get their own personal help pages.
+
{{bc|Usage: man ''command''}}
 +
 
 +
Where ''command'' is replaced with whatever command you want help on. Press {{ic|q}} to exit a manual page. Alternatively, most commands will allow you to add {{ic|--help}} on the end to get their own personal help pages.
  
 
Every key pressed sends a character to the terminal and you can send different characters by holding down keys like [Ctrl] or [Alt]. This is how the shell can tell what key is pressed, and thus, allow shortcuts to be defined. Some of the more useful keyboard shortcuts are defined:
 
Every key pressed sends a character to the terminal and you can send different characters by holding down keys like [Ctrl] or [Alt]. This is how the shell can tell what key is pressed, and thus, allow shortcuts to be defined. Some of the more useful keyboard shortcuts are defined:
  
* Up arrow or Down arrow - Scroll through typed commands
+
* {{ic|UpArrow}} or {{ic|DownArrow}} - Scroll through typed commands
* Shift + Page Up or Page Down - Scroll up or down through shell output
+
* {{ic|Shift+PageUp}} or {{ic|Shift+PageDown}} - Scroll up or down through shell output
* Home or End - Move to the start or end of a line, respectively
+
* {{ic|Home}} or {{ic|End}} - Move to the start or end of a line, respectively
* Tab - Autocomplete a file name, directory name or command name.
+
* {{ic|Tab}} - Autocomplete a file name, directory name or command name.
* Ctrl + C - End a running process
+
* {{ic|Ctrl+c}} - End a running process
* Ctrl + D - End-Of-File (EOF) character (usually ends a process or signifies the end of input data)
+
* {{ic|Ctrl+d}} - End-Of-File (EOF) character (usually ends a process or signifies the end of input data)
* Ctrl + Z - Send the currently running process to the background
+
* {{ic|Ctrl+z}} - Send the currently running process to the background
* Ctrl + L - Clear the screen, same as running the clear command
+
* {{ic|Ctrl+l}} - Clear the screen, same as running the clear command
  
 
If you're using BASH as your shell (most distros default to this) you can [[Bash personalization|customize it]] to your liking.
 
If you're using BASH as your shell (most distros default to this) you can [[Bash personalization|customize it]] to your liking.
  
==== Common Commands ====
+
==== Common commands ====
  
* pwd - Print Working Directory. Outputs the full path of the current directory.
+
* {{ic|pwd}} - Print Working Directory. Outputs the full path of the current directory.
* cd - Change Directory. Used to switch to a different directory.
+
* {{ic|cd}} - Change Directory. Used to switch to a different directory.
* ls - List. Lists files and directories in the current directory.
+
* {{ic|ls}} - List. Lists files and directories in the current directory.
** ls -a Lists "hidden" files and directories also. Hidden files in linux are preceded with a full stop.
+
** {{ic|ls -a}} Lists "hidden" files and directories also. Hidden files in linux are preceded with a full stop.
** ls -l Lists further information about the files, including size, modify date, owner and permissions.
+
** {{ic|ls -l}} Lists further information about the files, including size, modify date, owner and permissions.
** ls -t List by modify date, with the most recently modified files at the top.
+
** {{ic|ls -t}} List by modify date, with the most recently modified files at the top.
* cp - Copy a file/directory.
+
* {{ic|cp}} - Copy a file/directory.
** cp -r Descend into directories (recursively copy all directory contents).
+
** {{ic|cp -r}} Descend into directories (recursively copy all directory contents).
* mv - Move a file.
+
* {{ic|mv}} - Move or rename a file.
* rm - Delete a file.
+
* {{ic|rm}} - Delete a file.
** rm -r Delete directory contents. (Never rm -r /)
+
** {{ic|rm -r}} Delete directory contents. (Never {{ic|rm -r /}})
* chmod - Changes file permissions for the Owner, Group and Others.
+
* {{ic|chmod}} - Changes file permissions for the Owner, Group and Others.
* chown - Changes the owner of a file.
+
* {{ic|chown}} - Changes the owner of a file.
* chgrp - Changes the group of a file.
+
* {{ic|chgrp}} - Changes the group of a file.
* date - Display current date and time.
+
* {{ic|date}} - Display current date and time.
* who - Displays a list of currently logged in users.
+
* {{ic|who}} - Displays a list of currently logged in users.
* echo - Prints to stdout.
+
* {{ic|echo}} - Prints to stdout.
* cat - Concatenates text to stdout.
+
* {{ic|cat}} - Concatenates text to stdout.
* grep - Searches for strings in a file or stdin.
+
* {{ic|grep}} - Searches for strings in a file or stdin.
* su - Switch user. Defaults to root.
+
* {{ic|su}} - Switch user. Defaults to root.
* sudo - Similar to <code>su</code> but uses your own password instead. Lets you configure access in <code>/etc/sudoers</code>.
+
* {{ic|sudo}} - Similar to <code>su</code> but uses your own password instead. Lets you configure access in <code>/etc/sudoers</code>.
* passwd - Change password. Defaults to current account.
+
* {{ic|passwd}} - Change password. Defaults to current account.
* rsync - Synchronizes files and directories.
+
* {{ic|rsync}} - Synchronizes files and directories.
* halt - halt the system
+
* {{ic|halt}} - halt the system
** halt -p - also shut off the power
+
** {{ic|halt -p}} - also shut off the power
* systemctl - Interface to [[systemd|SystemD]].
+
* {{ic|systemctl}} - Interface to [[systemd]].
** systemctl poweroff - Shutdown.
+
** {{ic|systemctl poweroff}} - Shutdown.
** systemctl reboot - Reboot.
+
** {{ic|systemctl reboot}} - Reboot.
** systemctl start <service> Start a service.
+
** {{ic|systemctl start ''service''}} Start a service.
** systemctl stop <service> Stop a service.
+
** {{ic|systemctl stop ''service''}} Stop a service.
* journalctl - Interface to SystemD logging.
+
* {{ic|journalctl}} - Interface to systemd logging.
  
 
==== Piping and redirection ====
 
==== Piping and redirection ====
Line 314: Line 183:
 
For example:
 
For example:
  
  # Count number of words in helloworld.txt
+
* Count number of words in helloworld.txt
  cat helloworld.txt | wc -w
+
 
 +
{{bc|$ cat helloworld.txt | wc -w}}
 +
 
 +
Redirection directs data in and out of files, i.e.:
  
Redirection directs data in and out of files, i.e.
+
* Redirect stdout to file
 
+
{{bc|$ echo "Hello world" > helloworld.txt}}
  # Redirect stdout to file
+
* Redirect stdout to the end of a file
  echo "Hello world" > helloworld.txt
+
{{bc|$ echo "world." >> hello.txt}}
  # Redirect stdout to the end of a file
+
* Redirect a file to stdin
  echo "world." >> hello.txt
+
{{bc|$ cat < helloworld.txt}}
  # Redirect a file to stdin
 
  more < helloworld.txt
 
  
 
==== Kernel ====
 
==== Kernel ====
The kernel is the central nervous system of an operating system. Luckily, The Linux kernel is still maintained by [[Linus Torvalds]]. Find out about the version, kernel hacking and security on [https://www.kernel.org/ kernel.org].
+
The kernel is the central nervous system of an operating system. Luckily, Linux is still maintained by [[Linus Torvalds]]. Find out about the version, kernel hacking and security on [https://www.kernel.org/ kernel.org].
 +
 
 +
==== Useful links regarding command-line====
 +
 
 +
* [http://linuxcommand.org/lc3_learning_the_shell.php Linux Command] explains the shell, indispensable to users who want to take full advantage of GNU/Linux distributions.
 +
* [http://www.commandlinefu.com/commands/browse Commandlinefu] provides a fun experience while offering a lot of useful command-line gems making it a great site to explore and learn more about the command line.
  
== External Resources ==
+
== External links ==
 
* Books
 
* Books
 
** [http://www.slideshare.net/guesta2ab34/101-102-lpic1-certification-bible LPI-1 Certification Bible]
 
** [http://www.slideshare.net/guesta2ab34/101-102-lpic1-certification-bible LPI-1 Certification Bible]
** [http://lpic2.unix.nl/ LPI-2 Exam Prep]
 
** [http://linux-training.be/files/books/html/fun/index.html Linux Fundamentals]
 
 
* Videos
 
** [http://thepiratebay.se/torrent/8741813/CBT_Nuggets_-_Linux_in_the_Real_World CBT Nuggets - Linux In The Real World (Torrent)]
 
** [http://thepiratebay.se/torrent/8867798/CBT_Nuggets_-_LPI_Linux_LPIC-1_101_and_CompTIA_Linux_ CBT Nuggets - LPI-1_101 (Torrent)]
 
** [http://thepiratebay.se/torrent/8867794/CBT_Nuggets_-_LPI_Linux_LPIC-1_102_and_CompTIA_Linux_ CBT Nuggets - LPI-1_102 (Torrent)]
 
** [http://kickass.to/cbt-nuggets-linux-lpic-2-t8257239.html CBT Nuggets - LPI-2 (Torrent)]
 
** [http://thepiratebay.se/torrent/8759146/CBT_Nuggets_-_BackTrack_and_Kali_Linux CBT Nuggets - BackTrack and Kali Linux (Torrent)]
 
** [http://thepiratebay.se/torrent/4028348/CBT_NUGGETS_LINUX_SERIES_%28VIDEO_TUTORIAL%29 CBT Nuggets - Red Hat Training (Torrent)]
 
  
 
* Websites
 
* Websites
** [http://wireless.kernel.org/en/users/Drivers Wireless Drivers]
+
** [https://wireless.wiki.kernel.org/en/users/drivers Wireless Drivers]
 
** [http://stallman.org/#books Richard Stallman's Writings]
 
** [http://stallman.org/#books Richard Stallman's Writings]
 
** [http://www.commandlinefu.com/commands/browse Useful Terminal Commands]
 
** [http://www.commandlinefu.com/commands/browse Useful Terminal Commands]
 +
** [https://github.com/awesome-lists/awesome-bash Curated list of Bash resources]
  
 
[[Category:GNU/Linux]]
 
[[Category:GNU/Linux]]
 
[[Category:Software]]
 
[[Category:Software]]
 
[[Category:Operating systems]]
 
[[Category:Operating systems]]
 +
[[Category:Terms]]

Latest revision as of 05:56, 9 September 2023

Cleanup.png
Cleanup.png
CLEANUP CANDIDATE
Relevant discussion may be found on the talk page. Reason: Possible breach of IG:NEUTRAL


For the GNU Project, see GNU. For the organization behind GNU Project, see Free Software Foundation. For the kernel, see Linux (kernel).

GNU and Tux, mascots of the GNU Project and Linux, respectively.

Linux is only a kernel, the central driving force of an operating system that allocates resources to other aspects of the system. Linux, along with the GNU system (which is closely associated with the Free Software Foundation (FSF)) are collectively referred to as GNU/Linux or sometimes GNU Linux, make up a complete operating system which is widely used today by millions of freetards across the world.

History

The GNU Project, founded by Richard Stallman in 1983, had the goal of creating a "complete Unix-compatible software system" composed entirely of free software. Later, in 1985, Stallman started the Free Software Foundation and then went on to write the GNU General Public License (GNU GPL) in 1989. By the early 1990s, many of the programs required in an operating system (such as libraries, compilers, text editors, a Unix-like shell, and a windowing system) were completed, although low-level elements such as device drivers, daemons, and the kernel were stalled and incomplete.

In 1991, while attending the University of Helsinki, Torvalds became curious about operating systems and frustrated by the licensing of MINIX, which at the time limited it to educational use only. He began to work on his own operating system kernel, which eventually became Linux.

Linus Torvalds stated that if the GNU kernel had been available at the time (1991), he would not have decided to write his own.

Torvalds began the development of Linux on MINIX and applications written for MINIX were also used on Linux. Later, Linux matured and further Linux development took place on GNU/Linux systems. GNU applications also replaced all MINIX components, because it was advantageous to use the freely available code from the GNU Project to make a fledgling operating system; code licensed under the GNU GPL can be reused in other projects as long as they also are released under the same or a compatible license. Torvalds initiated a switch from his original license, which prohibited commercial redistribution, to the GNU GPL. Developers worked to integrate GNU components with Linux, making a fully functional and free operating system.

Why use GNU/Linux?

The free software philosophy is about an libre and shared operating system which is free as in freedom and usually, but not always, free as in free shit. The GNU/Linux system gives users more control over their computing experience than competing operating systems such as Windows, which contains malicious features without the user's knowledge.

What's all this about distributions?

A distribution or distro, is an operating system, built from a software collection, with Linux as the kernel. Most distros are at least somewhat similar with each other. The main differences are between the init system, package manager (and the repositories it has access to), desktop environment, default configurations and programs. Most distros have their own little niche. Some are FSF approved, for ricing, for getting shit done or just because you hate yourself or just love pain (Arch/Gentoo). Always at least try another distro before saying that you hate it. You will find that all of them have their own qualities.

When choosing a distro, keep some things in mind: Linux (kernel) itself is not about choice, but its variety of distros however are. There are stable and rolling distributions. Some stable distros can be made rolling by selecting the proper repositories and vice versa. Some are semi-rolling, they release snapshots of packages. Stable is best for beginners and rolling is best for developers and advanced users who want the latest and greatest.

Almost every distro can be riced by setting up the right DE and/or WM.

Recommended distributions

See: Babbies First Linux

Installation

Virtual Machines

If you are not ready to commit to installing a GNU/Linux system, you may want to try one out in a virtual environment first.

Making a bootable USB installer

In addition to installing from CD, you can also install from a USB flash drive. A USB installer created using the following steps should work with both BIOS and UEFI systems. However, for UEFI systems you may need to disable "Secure Boot" in the UEFI configuration panel. For UEFI support your flash drive MUST be formatted as fat32 (also called vfat in GNU/Linux) when attempting to boot from it.

  1. Download the disk image of your chosen distribution.
  2. Verify the integrity of the download if a checksum is provided. (optional, it is recommended)
  3. Use the image tool recommended in your distribution's install notes to copy the iso to your USB-drive and make it bootable. Note: There are many universal tools available, but they do not always work correctly for all distributions. Some of them include:

GNOME Disk Utility method

Any distribution running GNOME can easily make a bootable USB stick through gnome-disk-utility. First make sure you don't need any of the data on the USB stick. Next, open GNOME Disks and select the USB stick in the list. Unmount it via the stop button. Lastly, click the advanced tools gear icon, restore disk image and select your ISO file. When the process is complete you can eject the USB stick and boot from it.


Ventoy Method

Ventoy, unlike most other media creators, can hold multiple distributions on one USB Drive, allowing the user to select which one to load upon boot. This method works on both Windows and Linux, though installing it differs a bit depending on operating system.

  • Windows
To begin, download "ventoy-1.0.91-windows.zip." Once downloaded, unzip, and run Ventoy2Disk.exe, select your USB Drive, and click "install".
  • Linux
First, download "ventoy-1.0.91-linux.tar.gz" Once downloaded, extract the file. From here, you'll need to use your terminal to run the script as sudo. Move the extracted folder to somewhere easy to access (We'll use ~/Downloads for this example. Now, in your terminal, run sudo Downloads/ventoy-1.0.91/ventoy2Disk.sh -i /dev/sdX. This will install Ventoy to whichever drive you selected as X (sdb,sdc,etc.) If you're unsure which drive is which, run lsblk to display all attached drives. It's usually safe to assume your USB Drive is the smallest one, but make sure.

Regardless of which OS you started with, you'll now have a Ventoy USB Drive. It'll mount as any other drive would, and you can now move .iso files onto it. Upon booting into Ventoy, you'll be able to select and run any .iso files you've added to the drive.


Manual Terminal method

  • This method requires you are already running GNU/Linux and have an iso specifically crafted for USB drives or a "hybrid" CD/USB image. Most distributions will mention the type of iso on their download page.
  • Using the commands lsblk or fdisk -l (as exemplified bellow), find what [drive letter] is the letter of your removable device. Please note that it is the device (e.g. /dev/sdb), and not the partition number (e.g. /dev/sdb1).

fdisk -l

Warning:
  • The dd command is also known as "Disk Destroyer" because it is very easy to annihilate the data on a device unintentionally.
  • Make absolutely sure that of=/dev/sd[drive letter] is the correct device!
  • Now use run dd to install the iso in your device of choice.
dd bs=4M if=[/path/to/distro.iso] of=/dev/sd[drive letter]

An example of using the dd command could be:

dd bs=4M if='/home/moot/Downloads/debian-7.3.0-amd64-netinst.iso' of=/dev/sdb

Remember to use " " if your path contains spaces.

  • Last, wait patiently until the command has executed. No outputs will be printed until the process is finished. You can check progress of a dd command by finding the process ID with ps aux and issuing the kill -s USR1 <pid> command against it. Just don't forget the USR1 signal or you will terminate the process. Starting from GNU coreutils 8.2.4, you can append status=progress instead to check the progress.

GNU/Linux naming controversy

The GNU/Linux naming controversy is a dispute regarding whether or not to refer to the operating system as GNU/Linux, or as just Linux. GNU/Linux was a term originally created by the Free Software Foundation to refer to the combination of GNU and the kernel, Linux, which forms a functioning operating system. The Free Software Foundation recommends the term GNU/Linux because it argues the GNU project was a project to develop an operating system, from which the kernel was the last piece to complete (see GNU Hurd). The Free Software Foundation suggests that the inclusion of the term GNU in the operating system’s name would recognize their contribution and their free software ideals ("Free Software as a Social Movement". ZNet.). Richard M. Stallman writes:

Today tens of millions of users are using an operating system that was developed so they could have freedom—but they don't know this, because they think the system is Linux and that it was developed by a student 'just for fun'.

On the opposite side of the argument, "Linux" supporters argue that the contribution of the Free Software Foundation is minimal (for example, GNU components make up only 8% of Ubuntu). Eric S. Raymond writes:

Some people object that the name "Linux" should be used to refer only to the kernel, not the entire operating system. This claim is a proxy for an underlying territorial dispute; people who insist on the term GNU/Linux want the FSF to get most of the credit for Linux because [Stallman] and friends wrote many of its user-level tools. Neither this theory nor the term GNU/Linux has gained more than minority acceptance.

When Linus Torvalds was asked in the documentary Revolution OS whether the name "GNU/Linux" was justified, he replied:

Well, I think it's justified, but it's justified if you actually make a GNU distribution of Linux ... the same way that I think that "Red Hat Linux" is fine, or "SuSE Linux" or "Debian Linux", because if you actually make your own distribution of Linux, you get to name the thing, but calling Linux in general "GNU Linux" I think is just ridiculous.

"Linux" proponents also argue that since the operating system is often referred to as Linux by the mainstream media and most users, that it should be used as such, as opposed to GNU/Linux.

Let's learn about GNU/Linux

If you have any questions about GNU/Linux or want to join some discussion, then consider heading to the Friendly GNU/Linux Threads on /g/

The terminal

The terminal, also known as the Command Line, Shell, or just cold, emotionless text on a black background, gives you access to the real power and beating heart of GNU. Most GNU/Linux systems use BASH (short for `Bourne-Again Shell') as the default shell, which is inspired by the shell program `sh' from UNIX, written by Steven Bourne of Bell Labs. Bash will be all of our terminal interaction.

To manage multiple user sessions on a single machine, Linux (and UNIX kernels) uses what is called a TeleTYpeWriter (TTY) for each user to interface with the main kernel. Each tty is handled by its own special device file, located in the directory /dev. It also uses Pseudo Terminal Slave (pts) to handle other types of terminal interface, but this is beyond the scope of this guide.

You may be wondering what the difference between shell and TTY is. Shell is the command interpreter that runs everything you type in, and TTY is the connection that handles the data between Linux and the shell.

The shell uses files called stdout, stdin and stderr to handle text input and output to and from programs.

  • stdin - Standard Input - All your typed text input goes into programs through here.
  • stdout - Standard Output - All successful program output goes to here.
  • stderr - Standard Error - All error messages and problem codes go to here.

You should get familiar with the man pages, which are essentially the manual, and will display help pages on almost all commands.

Usage: man command

Where command is replaced with whatever command you want help on. Press q to exit a manual page. Alternatively, most commands will allow you to add --help on the end to get their own personal help pages.

Every key pressed sends a character to the terminal and you can send different characters by holding down keys like [Ctrl] or [Alt]. This is how the shell can tell what key is pressed, and thus, allow shortcuts to be defined. Some of the more useful keyboard shortcuts are defined:

  • UpArrow or DownArrow - Scroll through typed commands
  • Shift+PageUp or Shift+PageDown - Scroll up or down through shell output
  • Home or End - Move to the start or end of a line, respectively
  • Tab - Autocomplete a file name, directory name or command name.
  • Ctrl+c - End a running process
  • Ctrl+d - End-Of-File (EOF) character (usually ends a process or signifies the end of input data)
  • Ctrl+z - Send the currently running process to the background
  • Ctrl+l - Clear the screen, same as running the clear command

If you're using BASH as your shell (most distros default to this) you can customize it to your liking.

Common commands

  • pwd - Print Working Directory. Outputs the full path of the current directory.
  • cd - Change Directory. Used to switch to a different directory.
  • ls - List. Lists files and directories in the current directory.
    • ls -a Lists "hidden" files and directories also. Hidden files in linux are preceded with a full stop.
    • ls -l Lists further information about the files, including size, modify date, owner and permissions.
    • ls -t List by modify date, with the most recently modified files at the top.
  • cp - Copy a file/directory.
    • cp -r Descend into directories (recursively copy all directory contents).
  • mv - Move or rename a file.
  • rm - Delete a file.
    • rm -r Delete directory contents. (Never rm -r /)
  • chmod - Changes file permissions for the Owner, Group and Others.
  • chown - Changes the owner of a file.
  • chgrp - Changes the group of a file.
  • date - Display current date and time.
  • who - Displays a list of currently logged in users.
  • echo - Prints to stdout.
  • cat - Concatenates text to stdout.
  • grep - Searches for strings in a file or stdin.
  • su - Switch user. Defaults to root.
  • sudo - Similar to su but uses your own password instead. Lets you configure access in /etc/sudoers.
  • passwd - Change password. Defaults to current account.
  • rsync - Synchronizes files and directories.
  • halt - halt the system
    • halt -p - also shut off the power
  • systemctl - Interface to systemd.
    • systemctl poweroff - Shutdown.
    • systemctl reboot - Reboot.
    • systemctl start service Start a service.
    • systemctl stop service Stop a service.
  • journalctl - Interface to systemd logging.

Piping and redirection

There are a number of little quirks that the shell has that gives it more functionality. Piping takes the stdout of the left program and connects it (i.e. pipes it) into stdin of the right program with the pipe operator.

For example:

  • Count number of words in helloworld.txt
$ cat helloworld.txt 

Redirection directs data in and out of files, i.e.:

  • Redirect stdout to file
$ echo "Hello world" > helloworld.txt
  • Redirect stdout to the end of a file
$ echo "world." >> hello.txt
  • Redirect a file to stdin
$ cat < helloworld.txt

Kernel

The kernel is the central nervous system of an operating system. Luckily, Linux is still maintained by Linus Torvalds. Find out about the version, kernel hacking and security on kernel.org.

Useful links regarding command-line

  • Linux Command explains the shell, indispensable to users who want to take full advantage of GNU/Linux distributions.
  • Commandlinefu provides a fun experience while offering a lot of useful command-line gems making it a great site to explore and learn more about the command line.

External links