Ten Most Used Linux CommandsPosted by expertslogin on March 29th, 2013 In this article I am going to show you the most 10 used commands in Linux Print Working Directory (pwd) This command is used to print your current directory, it should print the output as the below example: /home/bob Change Directory (cd) This command is used to change your current directory, this command will accept both absolute and relative paths as below example (consider you are in your home directory): cd /home/bob/Desktop Or cd Desktop Move (mv) This command is used to move a file to a different location or rename it as the below example: Moving: mv /home/bob/test /home/bob/Desktop/test Renaming: mv /home/bob/test /home/bob/test2 List (ls) ls Linux command is used to list the folders and file inside a directory, most people use this command with the -a & -l options, -a will display hidden files and -l for long listing format, the below output is for the ls -al command: drwx------ 4 501 502 4096 Mar 21 10:39 . Make Directory (mkdir) This command is used to create a directory as the below example: mkdir /home/bob/newfolder Remove directory (rm) This command is used to remove files and directories, to remove directories that contains files or folder you need to a add -r &-f options, the -r for recursive and -f for force as below: rm -rf /home/bob/folder Super user do (sudo) & Switch user (su) The sudo command is used to run commands as the root user and the su command is used to change user as the below commands: sudo service httpd restart //restart the service as root apt-get & yum apt-get and yum commands are used to install or update packages, apt-get is used in Debian based distributions like Ubuntu and Mint, yum is used in the Redhat based distributions like Fedora and CentOS, they are used as the below example: apt-get install Package-Name World Wide Web and get (wget) This command is used to download files from http or ftp servers, you can resume a downloading file using -c option as the below example: wget http://path-to-the-file //download a file top The top command provides a real-time view of the running system or server, the below is sample of the output of this command: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND About the author: This Article is written by Bobbin Zachariah, who is also associated with ExpertsLogIn. He is a passionate lover of Linux and other open source tools. He had started his career in IT and Linux in early 2000. Love travelling, Technology writer, Blogging, Music and Enjoy the company with friends and family. Like it? Share it!More by this author |