70+ Linux Commands and Their Explanations

Linus Commands – Firstly, Linux is the most renowned and mostly used  open source operating system.

As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware.

Linux as an operating system was first released in 1991 and since then, it has continued to gain popularity due to its open-source nature.

It allows people to freely modify, manipulate and redistribute it under their own name.

Most programmers consider Linux to be a complicated aspect of web development but it is not as scary as it is perceived.

In this article, we have compiled over 70 Linux commands to make your learning and practice easier for your next startup.

Basic Linux commands

1. → ls-al

This command basically lists files and directories with detailed information like permissions,size, owner, etc.

2. → ls

This command lists all files and directories in the present working directory

3.→ ls-R

This command lists files in sub-directories

4 ls-a

This command also  helps to list hidden files.

5. → cd or cd ~

It is used to navigate to HOME directory

6→ cd ..

It is used to move one level up

7. → cd

It is used to change to a particular directory

8.→ cd /

This command is used to move to the root directory

9.→ cat > filename

Creates a new file

10.→ cat filename

Displays the file content

11→ cat file1 file2 > file3

Joins two files (file1, file2) and stores the output in a new file (file3)

12.→ mv file “new file path”

Moves the files to the new location

13.→ mv filename new_file_name

Renames the file to a new filename

14. → sudo

Allows regular users to run programs with the security privileges of the superuser or root

15.→ rm filename

Used to deletes a file

16.→ man

Gives help information on a command

17. → history

Gives a list of all past commands typed in the current terminal session

18. → clear:

Clears the terminal

19.→ mkdir directory_name

Creates a new directory in the present working directory or an at the specified path

20.→ rmdir

Deletes a directory

21.→ mv

Renames a directory

22.→ pr -x

Divides the file into x columns

23.→ pr -h

Assigns a header to the file

24.→ pr -n

Denotes the file with Line Numbers

25.→ lp -nc , lpr c

Prints “c” copies of the File

26.→ lp-d lp-P

Specifies name of the printer

27.→ apt-get

Command used to install and update packages

28.→ mail -s ‘subject’ -c ‘cc-address’ -b ‘bcc-address’ ‘to-address’

Command to send email

29.→ mail -s “Subject” to-address < Filename

Command to send an email with an attachment

Read also:How Much is Pi Coin Worth?, How to Mine Pi Cryptocurrency Faster

Read also: Easy Steps To Becoming A Web Developer (Full Stack)

Read also: Advanced Steps To Becoming A Full Stack Web Developer

Read also: Startup Tools That Do Not Require Coding

Read also: Binance Begins Recovery Plans For Luna Investors With The Terra Ecosystem

Hardware commands

30.→ dmesg

Displays bootup messages

31. → cat /proc/cpuinfo

Displays more information about CPU e.g model, model name, cores, vendor id

32. → cat /proc/meminfo

Displays more information about hardware memory e.g. Total and Free memory

33.→ lshw

Displays information about system’s hardware configuration

34.→ lsblk

Displays block devices related information

35. → free -m

Displays free and used memory in the system (-m flag indicates memory in MB)

36. → lspci -tv

Displays PCI devices in a tree-like diagram

37. → lsusb -tv

Displays USB devices in a tree-like diagram

38. → dmidecode

Displays hardware information from the BIOS

39. → hdparm -i /dev/xda

Displays information about disk data

40.→ hdparm -tT /dev/xda <:code>

Conducts a read speed test on device xda

File Permission commands

41.→ ls-l

Used to show file type and access permission

42.→ r:

read permission

43.→ w:

write permission

44.→ x:

execute permission

45. → Chown user:

For changing the ownership of a file/directory

Network command

46. → SSH username @ ip-address or hostname:

login into a remote Linux machine using SSH

47. → Ping hostname=”” or =””

To ping and Analyzing network and host connections

48. → dir

Display files in the current directory of a remote computer

49. → cd “dirname”

Change directory to “dirname” on a remote computer

50. → put file

upload ‘file’ from local to remote computer

51. → get file

Download ‘file’ from remote to local computer

52. → ip addr show

Displays IP addresses and all the network interfaces

53. → ifconfig

Displays IP addresses of all network interfaces

54.→ ping host

ping command sends an ICMP echo request to establish a connection to server / PC

55. → whois domain

Retrieves more information about a domain name

56. → dig domain

Retrieves DNS information about the domain

57. → dig -x host

Performs reverse lookup on a domain

58.→ host google. com

Performs an IP lookup for the domain name

59. → hostname -i

Displays local IP address

60. → wget file_name:

Downloads a file from an online source

61. → netstat -pnltu

Displays all active listening ports

62. → quit Logout

Environment Variables command

63. → echo $VARIABLE

To display value of a variable

64. → env

Displays all environment variables

65. → VARIABLE_NAME= variable_value

Create a new variable

66.→ Unset

Remove a variable

67. → export Variable=value

To set value of an environment variable

User management commands of linux

70. → sudo adduser username

To add a new user to your current Linux machine

71→ sudo deluser ‘username’

This deluser removes a user from a specific group.

72→ finger:

This command gives information on all logged in user

Click to comment

Leave a Reply

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

Most Popular

To Top