Basic commands using in linux

basic commands

As a beginner, you must be aware of those basic commands to complete an operation in a short time in the Linux-based operating system.

Linux is an open-source UNIX-like operating system (OS). An operating system is a software that directly manages a system’s hardware and resources, like CPU, memory, and storage.

SSH (Secure Shell) is a widely used protocol for securely accessing a remote server or hosting provider. Here are some commonly used SSH commands in a hosting provider environment:

OS acts as a GUI through which user can communicate with the computer.

The OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work.

Here. we can see basic commands using on day today’s life

basic commands

File System Navigation:

  • pwd: Show current directory.

The ‘pwd,’ which stands for “print working directory.”

The pwdcommand stands for print working directory. It is one of the most basic and frequently used commands in Linux. When invoked the command prints the complete path of the current working directory.

The pwd command stands for print working directory. It is one of the most basic and frequently used commands in Linux. When invoked the command prints the complete path of the current working directory.

pwd is a shell builtin in most modern shells such as bash and zsh. Its behavior is slightly different than the standalone /bin/pwd executable. You can use the type command to display all locations containing pwd

  • ls: List directory contents.

The ls is the list command in Linux. It will show the full list or content of your directory. Just type ls and press the enter key. The whole content will be shown.

  • cd: Change directory.

The cd (“change directory”) command is used to change the current working directory in Linux and other Unix-like operating systems. It is one of the most basic and frequently used commands when working on the Linux terminal.

  • mkdir: Create a new directory.

In Linux systems, you can create new directories either from the command line or with the help of your desktop’s file manager. The command that allows you to create directories (also known as folders) is mkdir.

  • rmdir: Remove a directory.

In Linux, the rmdir command is used to remove directories (folders) from the filesystem. It only works on directories that are empty; if the directory contains any files or subdirectories, rmdir will not delete it and will show an error.

rmdir [options] directory_name
  • touch: Create an empty file.

In Linux, the touch command is used to create new, empty files or update the timestamp (modification/access time) of existing files. The primary purpose is to update the access and modification times of files, but it’s commonly used to create new files as well.

touch [options] filename(s)
  • rm: Remove files or directories.

In Linux, the rm command is used to remove/delete files or directories from the filesystem. This command is powerful and should be used with caution as deleted files are usually not recoverable without specialized tools.

File Permission and Ownership:

  • chmod: Change file permissions.
  • chown: Change file ownership.
  • chgrp: Change group ownership.

File Searching:

  • grep: Search for patterns in files.
  • find: Search for files and directories.

System Information:

  • uname: Display system information.
  • top or htop: Show system processes and their resource usage.
  • df: Show disk space usage.
  • free: Display free and used memory.

Networking basic commands:

  • ifconfig or ip: Display or configure network interfaces.
  • ping: Check connectivity to a server.
  • ssh: Securely connect to a remote server.

Package Management (for distributions like Debian/Ubuntu):

  • apt-get: Install, update, or remove software packages.
  • apt-cache: Search package repositories.

Compression and Archiving:

  • tar: Archive files.
  • gzip or gunzip: Compress or decompress files.
  • zip or unzip: Create or extract zip archives.

Process Management:

  • ps: Display information about running processes.
  • kill: Terminate processes by ID.
  • killall: Terminate processes by name.

We hope you’ve found this useful!!