Got it

LINUX COMMANDS | BEGINNER

119 0 0 0 1

S.N

Command

Description

1

$ pwd

Display present working directory.

2

$ cd 

$ cd dir_name

$ cd .. 

To change directory.

To enter to the dir_name

To return one step back to higher order directory

3

$ mkdir dir_name

$ mkdir dir1/dir2/dir3

To make a new directory named dir_name.             

To make a new directory within a directory.            

3

$ ifconfig

To display all the active network interface details on the machine/server.

4

$ ls

$ ls –a  

$ ls -R

To view the content in the directory. (Doesn’t show hidden files)

Shows all the content in the directory. (Displays all the hidden files too)

List all the contents inside the current directory and subdirectories.

5

$ cat > filename

$ cat filename

$ cat >> filename

To create a new file.

To display content of a file.

To add text to an existing file.

$cp src_file dest_file

To copy a file to a destination directory.

7

$mv src_file dest_file

To move a file to a destination directory

8

$ rm file_name

$ rm file1 file2 file3

$ rm -r dir_name

To delete a file.

To delete multiple file

To delete a non empty directory

9

$rmdir dir_name

To delete an empty directory.

10

$grep search_word file_name

To search for a word i.e. “search_word” in a file.

10

$sudo

To perform tasks that require administrative or root permission.

11

$ clear

To clear the terminal window

12 

$ history

To display all the commands typed in the terminal.

13

$ whoami

To print the username associated with the current effective user ID.

14

$ find 

To find files in the current directory.

15

$ date

To display current time and date in set format.

16 

$ cal

To display calendar of running month

17 

$ chmod 

$ chmod 777 filename

$ chmod 000 filename

To change the access permissions of each given file according to the mode.

To give all read,write and execute permission to all the users.

To deny all the permission to all the users.

18

$ chown

To change the user/group ownership of a file to a new owner/group.

19

$ ping ip_addr

To test the ability of source computer to reach a specified destination computer

20

$ echo Hello World

$ echo Hello world > test.txt

To print the statement written after echo.

To create a new file with the following text.

21 

$ sort filename

To sort the content of the file numerically/alphabetically.

22

$ wget “download_url”

To download files from the internet directly.

23

$ apt 

Package manager to automate the process of installing and removing applications

24

$ tar -cf newzip.tar file1 file2

To create a zip file

25

$ touch new_file

To create a new file in the current directory.

26

$ reboot

To reboot, halt or shutdown the system


NETWORKING COMMANDS


S.N

Command

Description

1

ifconfig 

  • stands for interface configurator which is used for network inspection.

  • is used to initialize an interface, configure it with IP addr and enable or disable it.  

  • information displayed by using ifconfig are IP address, MAC address, MTU(Maximum Transmission Unit)

traceroute

  • used for troubleshooting the network.

  • detects the delays and determines  the pathway to your network.

3

tracepath

similar to traceroute but doesn’t require root privileges.

4

ping <domainName>

  • stands for Packet INternet Groper

  • checks network connectivity between two nodes.

netstat 

  • stands for network statistics

  • gives information about open sockets, routing tables and connection information about different interfaces

6

ss

  • replacement to netstat who is faster and gives more information.

  • fetches all the information within Kernel userspace.

7

nslookup <domainName>

  • used for DNS related queries.

8

ifplugstatus

  • to check if a cable is plugged into the network interface

9

ssh


ssh username@hostid

  • enables you to connect securely with remote hosts over the internet.

  • to connect to a user in a server

10

$ whois <domainName>

displays a website's record like information of a website registration and owner’s information.

11

$ iwconfig 

configures a wireless network interface.

12

$ arp

  • stands for Address Resolution Protocol.

  • allows us to view or add content into the kernel's ARP table.

13

scp 

$ scpname_of_file yourusername@host_name : / path1/ path2/ directory_name


  • to copy files over a network connection in a secure way 


These are the basic Linux Commands.
Hope this helps!

  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.