Skip to main content

Posts

Showing posts with the label CLI

LPI E - System Data

LPI E - Scripting 4.3 Where Data is Stored Review of Topics: Various types of information stored on a Linux system Part 1 of 2:  Part 2 - A Extensive Look Programs Configuration Processes Memory addresses System messaging Logging  Using the tools ps top free syslog - Debian or Fedora dmesg - Debian or Fedora and by locating information from directories like  "/etc/" "/bin" "/var/log/" Debian or Fedora "/boot/" "/proc/" "/dev/" "/sys/" I'll also provide a reference to some other tools at the end Finding information about Linux Programs and Configuration : Programs in Linux are typically stored in directories like "/bin/" "/sbin/" "/usr/bin/" "/usr/sbin/ "bin" meaning the executable binaries   To locate information about a program , you can use the " which " command followed by the name of the program $ which ls T his will display the full path to the program...

LPI E - vi or nano

LPI E - Scripting 3.3 Turning Commands into a Script  Review of Topics- Part 2 of 2 Part One: Scripting Editors to use with Linux Command Line Interface (CLI) Vi Editor  The Vi editor is a powerful and versatile text editor that is included with most Linux distributions. It can be accessed from the terminal by typing vi followed by the name of the file you want to edit. For example, to edit a file called "test.txt", you would enter the command $ vi test.txt Once you have opened a file in vi, you can begin editing it by pressing the "i" key to enter insert mode. In insert mode, you can type and edit text as you normally would in any other text editor. When you are finished editing, press the "Esc" key to return to command mode. From here, you can save your changes and exit the editor by typing :wq and pressing Enter. This command will save your changes and exit the editor. If you want to exit the editor without saving your changes, type :q! and press E...