Linux Basic Commands – Issue 176

Linux is currently the most widely used server operating system, based on Unix, open-source and free. Due to its system stability and security, it has a high market share and has almost become the best system environment for running program code.

Linux can not only run the program code we write for a long time, but also be installed on various computer hardware devices, such as mobile phones, routers, etc. The underlying layer of Android programs runs on the Linux system.

Linux Basic Commands - Issue 176
Linux Directory Structure

/ Subdirectory Structure

  • bin (binaries) stores binary executable files

  • sbin (super user binaries) stores binary executable files, accessible only by root

  • etc (etcetera) stores system configuration files

  • usr (unix shared resources) used to store shared system resources

  • home stores user files’ root directory

  • root super user directory

  • dev (devices) used to store device files

  • lib (library) stores shared libraries and kernel modules needed for program operation in the file system

  • mnt (mount) the mount point for temporarily mounted file systems by system administrators

  • boot stores various files used for system boot

  • tmp (temporary) used to store various temporary files

  • var (variable) used to store files with data that needs to change at runtime

Linux Basic Commands - Issue 176
Common Linux Commands

Command format: command -option argument (options and arguments can be empty) e.g., ls -la /usr

Operations on files and directories

Linux Basic Commands - Issue 176

Linux Basic Commands - Issue 176

Linux Basic Commands - Issue 176

Common System Commands

Linux Basic Commands - Issue 176

Linux Basic Commands - Issue 176

Compression and Decompression

Linux Basic Commands - Issue 176

File Permission Operations

Understanding the description format of Linux file permissions

  • r read permission, w write permission, x execute permission (can also be represented in binary 111 110 100 –> 764)

  • 1st position: file type (d directory, – regular file, l link file)

  • 2nd-4th positions: user permissions, represented by u (user)

  • 5th-7th positions: group permissions, represented by g (group)

  • 8th-10th positions: other users’ permissions, represented by o (other)

  • 2nd-10th positions: represents all permissions, represented by a (all)

Linux Basic Commands - Issue 176
Common Shortcuts and Symbol Commands

Linux Basic Commands - Issue 176

Linux Basic Commands - Issue 176
Vim Editor

vi / vim is the most commonly used text editor on Linux and is very powerful. It has only commands, no menus. The following image shows the various modes of the vi command.

Linux Basic Commands - Issue 176

Editing Text

Linux Basic Commands - Issue 176

Locate Command

Linux Basic Commands - Issue 176

Replace and Cancel Command

Linux Basic Commands - Issue 176

Delete Command

Linux Basic Commands - Issue 176

Common Shortcuts

Linux Basic Commands - Issue 176

Linux Basic Commands - Issue 176
END

Source: Network Engineer Club

Linux Basic Commands - Issue 176
Linux Basic Commands - Issue 176
Scan to Follow Us

Leave a Comment