Most useful linux command – ls, cd, cp, mv, rmdir, rm, ifconfig, ping, netstat, traceroute, pidof, kill, df

Posted by

Hello  friends, Here u can find the most useful & frequently required Commands on Linux terminal . This post is basically for those who just started operating  Linux OS.  These commands are executed on Ubuntu 16.04 OS. To learn these commands, open terminal by pressing keys CTRL + ALT + T simultaneously.

ls command

ls with no option shows the list files and directories in bare format of current directory. It won’t shows details like file types, size, modified date and time, permission and links etc.

To display file and directories

To display hidden files

To display all files and directories with size

To display Recursively list of Sub-Directories

To Sort Files by File Size

To shows latest modification file or directory date as last.

mkdir command

mkdir is used to create directories on a file system.

cd command

It allows you to change your working directory. You use it to move around within the hierarchy of your file system. The double-dot (“..”) directory notation can be used anywhere in a directory name to represent going up one level.

cd .. commands moves to its parent directory as /home/username

mv command

The mv command is used to move or rename files. mv renames file SOURCE to DEST, or moves the SOURCE file (or files) to DIRECTORY.

cp command

The cp command is used to make copies of files and directories.

You can use cp to copy entire directory structures from one place to another using the -R option to perform a recursive copy.

rmdir command

The rmdir utility removes the directory entry specified by each directory argument, provided the directory is empty.

rm command

rm command is used to delete files from a file system. Usually, on most file systems, deleting a file requires write permission on the parent directory and execute permission.

ifconfig command

ifconfig is used to configure, or view the configuration of, a network interface. ifconfig stands for “interface configuration”. It is used to view and change the configuration of the network interfaces on your system. It will display information about all network interfaces currently in operation.

ping command

ping(Packet INternet Groper) is a simple way to send network data to, and receive network data from, another computer on a network. It is frequently used to test, at the most basic level, whether another system is reachable over a network, and if so, how much time it takes for that data to be exchanged. It is the best way to test connectivity between two nodes.

Netstat command:

It stands Network Statistic (Netstat) command to display connection info, routing table information, Tcp, Udp port, protocols information.

pidof command

Pidof finds the process id’s of the named programs. It prints that id’s on the standard output.

Kill Command

kill is used to send a signal to a process. The default signal for kill is TERM (which will terminate the process). To test this command, just open gedit editor.

traceroute Command

traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path. Traceroute is a utility that records the route through the Internet between your computer and a specified destination computer. It also calculates and displays the amount of time each hop took.

df Command

The df command reports the amount of used and available disk space on file systems.

all above are the most useful Linux commands for beginners with required options. if u want more options of these commands , just write command name and option –help, as show in example below.

It's only fair to share...Share on FacebookShare on Google+Tweet about this on Twitter