Basic command
1. The `pwd` command helps you identify your location in the file system :
`pwd` - Print Working Directory
2. The `ls` command is used to list the files and directories in the current directory :
`ls` - List Files and Directories
Command |
Description |
---|---|
ls <Path Name> |
` any define path` is define after `ls` command , it will display all contain of that location. |
ls -l |
` -l ` flag is used to display the lists all contents with some extra information like permission of the file or folder , time stamp. |
ls – a |
` -a ` flag is used to see the hidden files and folder. |
3. The `uname` command retrieves system information:
uname - Print System Information
Note : By adding `-r ` flag to the `uname` command , you can display the kernal release version.
uname -r Print Kernel Release Information
4. The `cd` command allows you to navigate the file system by changing your current directory.
cd - Change Directory
5. The `clear` command clears the terminal screen, providing a clean workspace.
clear - Clear the Terminal Screen
6. `whoami` returns the username of the current user logged into the terminal.
whoami - Display the Current User
7. `History` This command is used to display the history of the common that previously executed. history
history
8. `free` This command is used to check the memory-related detail in your system.
free
9. `nslookup` is used to obtain information for DNS server. it stands for Name Server Lookup.
nslookup <domain name>
10. `ssh-keygen` is used to establish a secure SSH connection from your host machine to any remote server. It generates a public/private key pair.
ssh-keygen -t rsa
11 . `curl` is a tool which is used to fetch data and post the data over the internet. it can used various of protocol like HTTPS , SMTP and FTP.
curl [options] [URL]
12 . `curl -o `flag saves the data into a file on the local machine.
`curl -o [file_name] [URL...]
13. apt-get command used to manage packages in the linux. APT stand for the Advanced Packaging Tool , and its main used of install , update , upgrade and remove the packages.
apt-get [options] command
14 . `du` command is used to check disk usage space.
du
15. `df` the is a command used to check the available disk space in system.
df -h
15. ifconfig is command is used to view the information about your network interface
ifconfig [OPTIONS] [INTERFACE]
Linux command in DevOps
Linux fundamentals are crucial skills for a DevOps professional. Through this article, we will learn about all the required Linux commands which we will frequently use in a DevOps career.