Lecture 9 Basic Commands in Linux

LINUX BASIC COMMANDS

ls:

Displays files and directories in the current directory.

Lists files and directories.


ls -R:

Shows all files, including those in subdirectories.

Lists files and subdirectories recursively.



ls -al:

Provides detailed information about files.

Displays comprehensive file details.


ls -a:

Reveals hidden files.

Lists hidden files and directories.


cat:

Used for viewing, copying, combining, and creating text files.

 Allows text file manipulation, including creation and viewing.



rm:

Deletes files without confirmation.

Removes files.



mv:

Moves files to a different directory or renames files.

Relocates or renames files.

mkdir:

Creates subdirectories in the current directory.

Generates new directories.

rmdir:

Deletes an empty directory.

Removes empty directories.

grep:

Searches text in files based on a given pattern and prints matching lines.

Searches and prints text matching a pattern.

history:

Lists all previously executed commands in the current terminal session.

Displays command history.



clear:

Clears the terminal screen, removing clutter.

Refreshes the terminal display, removing previous content.



 Text Editors in Linux:

 The Linux operating system has a choice of text editors to generate and edit files. Two commonly used terminal-based text editors are "vi" (Visual Editor) and "vim" (VI Improved). You can employ the "vi" or "vim" command to access and work with these editors. To learn how to use them, download the VI editor guide from the VLE. For a simpler, built-in terminal-based text editor, you have "nano." In order to get a sense of its functions, you can explore it on your own.

 Linux offers a "gedit" text editor for users who like to use the graphical user interfaceGUI. Use the "gedit" command to launch it. Use the 'gedit file_name' command for opening a specific file in gedit. You can choose the files you want to create and edit from a number of possibilities in these text editors, enabling you to find which is best for your needs.

Comments

Popular posts from this blog

Lecture 2 - Fetch, Execution and IO

Lecture 11 Linux Network and Process Management

Lecture 12 Clint Server Architecture