Friday, June 26, 2020

Linux

What is Linux?

Open source resources

Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware.

Who uses Linux?

You probably already use Linux, whether you know it or not. Depending on which user survey you look at, between one- and two-thirds of the webpages on the Internet are generated by servers running Linux.

Companies and individuals choose Linux for their servers because it's secure, flexible, and you can receive excellent support from a large community of users, in addition to companies like Canonical, SUSE, and Red Hat, each of which offer commercial support.

Many devices you probably own, such as Android phones and tablets and Chromebooks, digital storage devices, personal video recorders, cameras, wearables, and more, also run Linux. Your car has Linux running under the hood. Even Microsoft Windows features Linux components, as part of the Windows Subsystem for Linux (WSL).

What follows, then, is a roundup of sorts of the top 10 Linux distributions today.
  • Ubuntu. ...
  • Fedora. ...
  • Linux Mint. ...
  • openSUSE. ...
  • PCLinuxOS. ...
  • Debian. ...
  • Mandriva. ...
  • Sabayon/Gento
  • Arch Linux... plus Slackware
  • Puppy Linux... plus DSL

UBUNTU INTERFACE


Features

Enjoy the simplicity of Ubuntu’s intuitive interface. Fast, secure and with thousands of apps to choose from — for everything you want to do, Ubuntu has what you need.

Here is my list of the Top 10 Advantages Ubuntu has Over Windows.
  • Ubuntu is Free. ...
  • Ubuntu is Completely Customizable. ...
  • Ubuntu is More Secure. ...
  • Ubuntu Runs Without Installing. ...
  • Ubuntu is Better Suited for Development. ...
  • Ubuntu's Command Line. ...
  • Ubuntu Can Be Updated Without Restarting. ...
  • Ubuntu is Open-Source.
  • Ubuntu Supports Window Tiling
  • Ubuntu is More Resource-Friendly



TERMINAL COMMANDS


APt-Get

apt-get is the one of the most important Ubuntu commands every beginner must know. It is used to install, update, upgrade and remove any package. apt-get basically works on a database of available packages. Here is the list of different apt-get commands:


Pwd

pwd (print working directory) Ubuntu command displays the full pathname of the current working directory.

Cp

cp (copy) Linux command allows you to copy a file. You should specify both the file you want to be copied and the location you want it copied to – for example, cp xyz /home/myfiles would copy the file “xyz” to the directory “/home/myfiles.

History

history command displays all of your previous commands up to the history limit.

Df

df (display filesystem) command displays information about the disk space usage of all mounted filesystems.

Du

du (directory usage) command displays the size of a directory and all of its subdirectories.

Free

free – Displays the amount of free space available on the system.

Uname -A

uname -a – Provides a wide range of basic information about the system.

Top

top – Displays the processes using the most system resources at any given time. “q” can be used to exit.

Info

Similar to man, but often provides more detailed or precise information.

<Command Name> -H Or <Command Name> –Help

This command is a third alternative to get help. While not as detailed as the info or man pages, this will provide a quick overview of the command and its uses.

For example: man -h or man -help

Passwd

passwd Ubuntu basic command is used to change user password using Terminal. What you have to do is run the below command, where is the username whose password has to change:

shutdown

The command “shutdown” is used to shut down the system.
Syntax: shutdown
Example:

mv” to Rename Files

Syntax: mv File_name New_name_for_file
Example:
Consider having two files in a directory (File1 and File2). Entering the command “mv File1 File_Rename” will rename File1 to File_Rename in the same directory.

cat

The command “cat” is a reverse of the command “tac”. It is used to display each line of the file starting from the first row and finishing on its last row.

This command is more frequently used than “tac”.
Syntax: cat file_name

echo

The command “echo” used to display any expression that is passed as an argument.
Syntax:
echo expression_to_be_displayed


Common Linux Commands


When dealing with the Linux operating system, commands are required as inputs to inform or direct a computer program to perform a specific operation. Understanding the most basic Linux commands will allow you to successfully navigate directories, manipulate files, change permissions, display information such as disk space, and more. Obtaining basic knowledge of the most common commands will help you easily execute tasks via the command line.


Command

Description

cat [filename]

Display file’s contents to the standard output device

(usually your monitor).

cd /directorypath

Change to directory.

chmod [options] mode filename

Change a file’s permissions.

chown [options] filename

Change who owns a file.

clear

Clear a command line screen/window for a fresh start.

cp [options] source destination

Copy files and directories.

date [options]

Display or set the system date and time.

df [options]

Display used and available disk space.

du [options]

Show how much space each file takes up.

file [options] filename

Determine what type of data is within a file.

find [pathname] [expression]

Search for files matching a provided pattern.

grep [options] pattern [filesname]

Search files or output for a particular pattern.

kill [options] pid

Stop a process. If the process refuses to stop, use kill -9 pid.

less [options] [filename]

View the contents of a file one page at a time.

ln [options] source [destination]

Create a shortcut.

locate filename

Search a copy of your filesystem for the specified

filename.

lpr [options]

Send a print job.

ls [options]

List directory contents.

man [command]

Display the help information for the specified command.

mkdir [options] directory

Create a new directory.

mv [options] source destination

Rename or move file(s) or directories.

passwd [name [password]]

Change the password or allow (for the system administrator) to

change any password.

ps [options]

Display a snapshot of the currently running processes.

pwd

Display the pathname for the current directory.

rm [options] directory

Remove (delete) file(s) and/or directories.

rmdir [options] directory

Delete empty directories.

ssh [options] user@machine

Remotely log in to another Linux machine, over the network.

Leave an ssh session by typing exit.

su [options] [user [arguments]]

Switch to another user account.

tail [options] [filename]

Display the last n lines of a file (the default is

10).

tar [options] filename

Store and extract files from a tarfile (.tar) or tarball (.tar.gz or .tgz).

top

Displays the resources being used on your system. Press q to

exit.

touch filename

Create an empty file with the specified name.

who [options]

Display who is logged on.

Snap


Snap (also known as Snappy) is a software deployment and package management system built by Canonical. The packages, are usually called 'snaps' and the tool for using them is called 'snapd', which works across a range of Linux distributions and therefore allows distro-agnostic upstream software deployment.

No comments:

Post a Comment

Latest post

JSON

  What is JSON? JSON stands for  J ava S cript  O bject  N otation JSON is a lightweight data-interchange format JSON is "self-describi...