0% found this document useful (0 votes)
174 views1 page

50+ Linux Commands With Screenshots (Download PDF) 2

Moeeb

Uploaded by

arshadjewan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views1 page

50+ Linux Commands With Screenshots (Download PDF) 2

Moeeb

Uploaded by

arshadjewan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

$

DevOps Linux

50+ Linux Commands


with Screenshots
(Download PDF)
Arpit Saini • September 27, 2023 !0 " 44,342

# 5 minutes read

Introduction
Without a doubt, Linux is very prevalent and famous for
its powerful Linux commands. In order to employ Linux
effectively, all users must be aware of how to utilize
terminal commands. Although the Linux commands
operating system has a GUI (Graphical User Interface),
you can discover that various functionalities operate
faster when they are operated as commands via the
terminal. Thus, under this guide, we have provided
insights into the most basic commands of Linux one
must know while working on the Linux-based system.
Plunge into the segments below and acquire all the
details.

Linux Commands: Basic

Before you learn about the basic commands in Linux,


you must ensure to meet the prerequisites –

A system that operates Linux

Accessibility to the command line or terminal

Moreover, all the commands of Linux can fall into one


of the following four classifications:

Shell builtins – These include commands that are


constructed directly into the shell with the fastest
execution.

Shell functions – These include shell scripts that


are basically grouped commands.

Aliases – They incorporate custom command


shortcuts.

Executable programs – These include compiled


and installed programs or scripts.

Basic Linux Commands you


Must Know

1. ls
It lists the files and directories in the current directory.

Syntax: ls [options] [directory]

2. cd
Changes the current directory.

Syntax: cd [directory]

cd command

3. pwd
Shows the current working directory.

Syntax: pwd

pwd command

4. Mkdir
Creates a new directory.

Syntax: mkdir [directory]

Mkdir command

5. rmdir
Deletes an empty directory.

Syntax: rmdir [directory]

rmdir command

6. rm
Deletes a file or directory.

Syntax: rm [file/directory]

rm command

7. cp
Copies a file or directory.

Syntax: cp [options] [source] [destination]

cp command

8. mv
Moves or renames a file or directory.

Syntax: mv [options] [source] [destination]

mv command

9. touch
Creates a new empty file.

Syntax: touch [filename]

touch command

10. cat
Displays the contents of a file.

Syntax: cat [filename]

11. less
Displays the contents of a file one screen at a time.

Syntax: less [filename]

12. head
Displays the first few lines of a file.

Syntax: head [filename]

13. tail
Displays the last few lines of a file.

Syntax: tail [filename]

14. grep
Searches for a pattern in a file.

Syntax: grep [options] [pattern] [filename]

15. find
Searches for files in a directory hierarchy.

Syntax: find [directory] [options] [expression]

16. tar
Creates or extracts a compressed archive.

Syntax: tar [options] [archive-filename]


[files/directories]

17. gzip
Compresses a file.

Syntax: gzip [filename]

18. gunzip
Decompresses a compressed file.

Syntax: gunzip [filename]

19. bzip2
Compresses a file.

Syntax: bzip2 [filename]

20. bunzip2
Decompresses a compressed file.

Syntax: bunzip2 [filename]

du
Shows the disk usage of files and directories.

Syntax: du [options] [directory]

df
Shows the disk space usage of filesystems.

Syntax: df [options]

top
Displays the current system status.

Syntax: top

ps
Lists the currently running processes.

Syntax: ps [options]

kill
Sends a signal to a process to terminate it.

Syntax: kill [options] [PID]

ping
Tests the network connectivity to a host.

Syntax: ping [options] [hostname/IP address]

ifconfig
Configures network interfaces.

Syntax: ifconfig [options] [interface]

netstat
Shows network connections, routing tables, and
network statistics.

Syntax: netstat [options]

ssh
Connects to a remote host using SSH.

Syntax: ssh [user@]hostname [command]

scp
Copies files securely between hosts using SSH.

Syntax: scp [options] [source] [destination]

ftp
Transfers files between hosts using FTP.

Syntax: ftp [options] [hostname]

chmod
Changes the permissions of files and directories.

Syntax: chmod [options] [mode] [file/directory]

chown
Changes the owner of files and directories.

Syntax: chown [options] [owner:group] [file/directory]

passwd
Changes the password of the current user.

Syntax: passwd [options] [username]

su
Switches to another user account.

Syntax: su [options] [username]

sudo
Executes a command with superuser privileges.

Syntax: sudo [options] [command]


% & ' ( )

You might also like