Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 60 páginas
Resumen

Summary I am selling you future books (programming).

Document preview thumbnail
Vista previa 4 fuera de 60 páginas

I am selling you future books (programming). I will present to you everything you will need in terms of knowledge of any programming language in the form of a book with a lot of useful information for you, and as you also know that programmers have very high salaries, I will help you to be great programmers I wish you a pleasant reading and learning.

Vista previa del contenido

Contents
About ................................................................................................................................................................................... 1
Chapter 1: Getting started with GNU/Linux ..................................................................................................... 2
Section 1.1: Useful shortcuts .......................................................................................................................................... 2
Section 1.2: File Management Commands .................................................................................................................. 3
Section 1.3: Hello World ................................................................................................................................................. 5
Section 1.4: Basic Linux Utilities .................................................................................................................................... 5
Section 1.5: Searching for files by patterns in name/contents ................................................................................. 6
Section 1.6: File Manipulation ........................................................................................................................................ 7
Section 1.7: File/Directory details ................................................................................................................................. 8
Chapter 2: Detecting Linux distribution name and version .................................................................. 11
Section 2.1: Detect what debian-based distribution you are working in ............................................................... 11
Section 2.2: Detect what systemd-based distribution you are using .................................................................... 11
Section 2.3: Detect what RHEL / CentOS / Fedora distribution you are working in ............................................ 12
Section 2.4: Uname - Print information about the current system ........................................................................ 13
Section 2.5: Detect basic information about your distro ........................................................................................ 13
Section 2.6: Using GNU coreutils ................................................................................................................................ 13
Section 2.7: Find your linux os (both debian & rpm) name and release number ................................................ 14
Chapter 3: Getting information on a running Linux kernel ................................................................... 15
Section 3.1: Getting details of Linux kernel ................................................................................................................ 15
Chapter 4: Shell ........................................................................................................................................................... 16
Section 4.1: Changing default shell ............................................................................................................................ 16
Section 4.2: Basic Shell Utilities .................................................................................................................................. 17
Section 4.3: Create Your Own Command Alias ........................................................................................................ 18
Section 4.4: Locate a file on your system ................................................................................................................. 18
Chapter 5: Check Disk Space ................................................................................................................................ 19
Section 5.1: Investigate Directories For Disk Usage ................................................................................................. 19
Section 5.2: Checking Disk Space .............................................................................................................................. 21
Chapter 6: Getting System Information ......................................................................................................... 23
Section 6.1: Statistics about CPU, Memory, Network and Disk (I/O operations) .................................................. 23
Section 6.2: Using tools like lscpu and lshw .............................................................................................................. 23
Section 6.3: List Hardware .......................................................................................................................................... 24
Section 6.4: Find CPU model/speed information ..................................................................................................... 25
Section 6.5: Process monitoring and information gathering .................................................................................. 26
Chapter 7: ls command ........................................................................................................................................... 28
Section 7.1: Options for ls command ......................................................................................................................... 28
Section 7.2: ls command with most used options .................................................................................................... 28
Chapter 8: File Compression with 'tar' command ...................................................................................... 30
Section 8.1: Compress a folder ................................................................................................................................... 30
Section 8.2: Extract a folder from an archive .......................................................................................................... 30
Section 8.3: List contents of an archive .................................................................................................................... 30
Section 8.4: List archive content ................................................................................................................................ 31
Section 8.5: Compress and exclude one or multiple folder .................................................................................... 31
Section 8.6: Strip leading components ...................................................................................................................... 31
Chapter 9: Services .................................................................................................................................................... 32
Section 9.1: List running service on Ubuntu .............................................................................................................. 32
Section 9.2: Systemd service management ............................................................................................................. 32

,Chapter 10: Managing Services ........................................................................................................................... 33
Section 10.1: Diagnosing a problem with a service .................................................................................................. 33
Section 10.2: Starting and Stopping Services ........................................................................................................... 33
Section 10.3: Getting the status of a service ............................................................................................................. 34
Chapter 11: Modifying Users .................................................................................................................................. 35
Section 11.1: Setting your own password ................................................................................................................... 35
Section 11.2: Setting another user's password .......................................................................................................... 35
Section 11.3: Adding a user .......................................................................................................................................... 35
Section 11.4: Removing a user .................................................................................................................................... 35
Section 11.5: Removing a user and its home folder ................................................................................................. 35
Section 11.6: Listing groups the current user is in ..................................................................................................... 35
Section 11.7: Listing groups a user is in ...................................................................................................................... 35
Chapter 12: LAMP Stack ........................................................................................................................................... 36
Section 12.1: Installing LAMP on Arch Linux ............................................................................................................... 36
Section 12.2: Installing LAMP on Ubuntu ................................................................................................................... 37
Section 12.3: Installing LAMP stack on CentoOS ....................................................................................................... 38
Chapter 13: tee command ...................................................................................................................................... 40
Section 13.1: Write output to stdout, and also to a file ............................................................................................. 40
Section 13.2: Write output from the middle of a pipe chain to a file and pass it back to the pipe ..................... 40
Section 13.3: write the output to multiple files .......................................................................................................... 40
Section 13.4: Instruct tee command to append to the file ....................................................................................... 40
Chapter 14: Secure Shell (SSH) ............................................................................................................................ 42
Section 14.1: Connecting to a remote server ............................................................................................................. 42
Section 14.2: Installing OpenSSH suite ....................................................................................................................... 42
Section 14.3: Configuring an SSH server to accept connections ............................................................................ 43
Section 14.4: Passwordless connection (using a key pair) ...................................................................................... 43
Section 14.5: Generate public and private key ......................................................................................................... 43
Section 14.6: Disable ssh service ................................................................................................................................ 43
Chapter 15: SCP ............................................................................................................................................................ 45
Section 15.1: Secure Copy ............................................................................................................................................ 45
Section 15.2: Basic Usage ........................................................................................................................................... 45
Chapter 16: GnuPG (GPG) ........................................................................................................................................ 46
Section 16.1: Exporting your public key ...................................................................................................................... 46
Section 16.2: Create and use a GnuPG key quickly .................................................................................................. 46
Chapter 17: Network Configuration .................................................................................................................. 47
Section 17.1: Local DNS resolution .............................................................................................................................. 47
Section 17.2: Configure DNS servers for domain name resolution ........................................................................ 47
Section 17.3: See and manipulate routes .................................................................................................................. 47
Section 17.4: Configure a hostname for some other system on your network .................................................... 48
Section 17.5: Interface details ..................................................................................................................................... 49
Section 17.6: Adding IP to an interface ...................................................................................................................... 50
Chapter 18: Midnight Commander ..................................................................................................................... 52
Section 18.1: Midnight Commander function keys in browsing mode .................................................................... 52
Section 18.2: Midnight Commander function keys in file editing mode ................................................................. 52
Chapter 19: Change root (chroot) ...................................................................................................................... 54
Section 19.1: Requirements ......................................................................................................................................... 54
Section 19.2: Manually changing root in a directory ............................................................................................... 54
Section 19.3: Reasons to use chroot .......................................................................................................................... 55
Chapter 20: Package Managers .......................................................................................................................... 56

, Section 20.1: How to update packages with the apt package manager .............................................................. 56
Section 20.2: How to install a package with the pacman package manager ...................................................... 56
Section 20.3: How to update packages with the pacman package manager ..................................................... 56
Section 20.4: How to update packages with yum ................................................................................................... 57
Chapter 21: Compiling the Linux kernel ........................................................................................................... 58
Section 21.1: Compilation of Linux Kernel on Ubuntu ............................................................................................... 58
Credits .............................................................................................................................................................................. 59
You may also like ........................................................................................................................................................ 61

, Chapter 1: Getting started with GNU/Linux
Section 1.1: Useful shortcuts
Using The Terminal


The examples in this document assume that you are using a POSIX-compliant (such as bash, sh, zsh, ksh)
shell.


Large portions of GNU/Linux functionality are achieved using the terminal. Most distributions of Linux include
terminal emulators that allow users to interact with a shell from their desktop environment. A shell is a command-
line interpreter that executes user inputted commands. Bash (Bourne Again SHell) is a common default shell
among many Linux distributions and is the default shell for macOS.

These shortcuts will work if you are using Bash with the emacs keybindings (set by default):

Open terminal

Ctrl + Alt + T or Super + T

Cursor movement

Ctrl + A Go to the beginning of the line you are currently typing on.
Ctrl + E Go to the end of the line you are currently typing on.
Ctrl + XX Move between the beginning of the line and the current position of the cursor.
Alt + F Move cursor forward one word on the current line.
Alt + B Move cursor backward one word on the current line.
Ctrl + F Move cursor forward one character on the current line.
Ctrl + B Move cursor backward one character on the current line.

Text manipulation

Ctrl + U Cut the line from the current position to the beginning of the line, adding it to the clipboard. If
you are at the end of the line, cut the entire line.
Ctrl + K Cut the line from the current position to the end of the line, adding it to the clipboard. If you
are at the beginning of the line, cut the entire line.
Ctrl + W Delete the word before the cursor, adding it to the clipboard.
Ctrl + Y Paste the last thing from the clipboard that you cut recently (undo the last delete at the
current cursor position).
Alt + T Swap the last two words before the cursor.
Alt + L Make lowercase from cursor to end of word.
Alt + U Make uppercase from cursor to end of word.
Alt + C Capitalize to end of word starting at cursor (whole word if cursor is at the beginning of word).
Alt + D Delete to end of word starting at cursor (whole word if cursor is at the beginning of word).
Alt + . Prints the last word written in previous command.
Ctrl + T Swap the last two characters before the cursor.

History access

Ctrl + R Lets you search through previously used commands.
Ctrl + G Leave history searching mode without running a command.
Ctrl + J Lets you copy current matched command to command line without running it, allowing you to



2

Información del documento

Subido en
7 de octubre de 2023
Número de páginas
60
Escrito en
2023/2024
Tipo
Resumen
$8.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
44
Última venta
-


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes