DevOps Basics —01 :

By akohad Dec4,2023

[ad_1]

DevOps Basics — 01

Linux commands are the backbone of efficient system management, and mastering them can significantly enhance your productivity and control over your system. In this guide, we’ll explore 31+ essential Linux commands, providing simple examples to help you grasp their functionality. Whether you’re a seasoned sysadmin or just starting your Linux journey, these commands are fundamental to navigating and managing your Linux environment.

1. Navigating the File System:

a) `pwd`: Print Working Directory

$ pwd
/home/username

b) `ls`: List Files and Directories

$ ls
Documents Downloads Pictures Videos

c) `cd`: Change Directory

$ pwd
/home/username
$ cd Documents
$ pwd
/home/username/Documents

d) `mkdir`: Make Directory

$ mkdir new_folder
$ ls
new_folder

e) `cp`: Copy Files

$ cp new_folder /path/to/destination
$ cd /path/to/destination
$ ls
new_folder

f) `mv`: Move or Rename Files

$ mv new_folder test_folder
$ ls
test_folder

g) `touch`: Create files

$ cd test_folder
$ touch wanted_file.txt unwanted_file.txt
$ ls
wanted_file.txt unwanted_file.txt

h) `rm`: Remove Files

$ rm unwanted_file.txt
$ ls
wanted_file.txt

2. Viewing and Editing Files:

a) `cat`: Display File Content

$ cat wanted_file.txt
Hello World

b) `less`: View Large Files Interactively

$ less large_file.txt

c) `nano` or `vim`: Text Editors

$ vim filename.txt

3. File Permissions:

a) `chmod`: Change File Permissions

$ chmod +x script.sh

Here I would like to give some more details about the different permissions that one can set using `chmod`command:

`chmod` is a command in Unix and Unix-like operating systems that is used to change the…

[ad_2]

Source link

By akohad

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *