Ubuntu Commands and Answers

Thumb

Author

BIQ

Questions

35

Last updated

Mar 8, 2022

Ubuntu is free of charge, globally available and open-source Linux operating system, capable of web surfing, document creation, email read and more. This operating system is highly customizable and built on the ideas of Ubuntu Manifesto; the software should be available without any cost, the software tool should be available in the local language of the user and should be used despite any disabilities, and the freedom to customize the software according to their fit. All the popular ubuntu commands have been put together which will be handy if you want to crack an interview. Similar to other operating systems, Ubuntu has its own set of command lines at disposal to help users interact with the Linux interface. Ubuntu commands questions are common among IT sector interviews.

Most Frequently Asked Ubuntu Commands

Here in this article, we will be listing frequently asked Ubuntu Commands and Answers with the belief that they will be helpful for you to gain higher marks. Also, to let you know that this article has been written under the guidance of industry professionals and covered all the current competencies.

Q1. What is Ubuntu and how does it work?
Answer
Based on Linux, Ubuntu is free to use the desktop operating system. The operating system is primarily intended for personal computers but can be used on the server also. Ubuntu employs GNU Network Object Model Environment, pronounced gah-NOHMor GNOME, which is a graphical user interface and set of applications on the desktop for Linux.
Q2. What is the latest version of Ubuntu?
Answer

Ubuntu 18.10or Cosmic Cuttlefish is the latest version of this operating system, released on 18 October 2018. The Ubuntu 19.04, codenamed Disco Dingo, is the upcoming release for the operating system, scheduled for 18thApril 2019 release.

Q3. Why is it called Ubuntu?
Answer

Ubuntu is a South African ethical ideology which comes from the Xhosa and Zulu languages and roughly translates as “humanity towards others.” As the platform is based on free software and shares the belief of connectivity to all, the name “Ubuntu” is best suited for it.

Q4. How do I install Ubuntu on my PC?
Answer
We have to follow these steps to install Ubuntu in PC:
  • Put the Ubuntu DVD in drive 7 restart the computer
  • Select the language. Either choose Try Ubuntu or Install Ubuntu depending on your preference
  • Select the Detect Keyboard Layout and Continue
  • Choose Normal installation' or ‘Minimal installation’ according to your choice and continue
  • Choose whether you want to install Ubuntu alongside another operating system or delete the existing one and replace it with Ubuntu
  • Now click Install Now and Continue
  • Select your current location if you are connected with internet
  • Put your preferred location
  • Choose the background installation
  • Select the popped up Restart option to end the process
Q5. Which is the best version of Ubuntu?
Answer
Q6. What are the Minimum System Requirements to install Ubuntu?
Answer
The minimum system requirements for Ubuntu are as following:
  • 2 GB RAM
  • 2 GHz dual-core processor
  • 25 GB of hard-drive space
  • 1024x768 screen resolution VGA capable
  • Either a DVD/CD drive or a USB port for the installer media
  • Internet access (additional)

Follow further to get the Ubuntu command line list.

Q7. Explain the difference between Windows and Ubuntu?
Answer
S.no Windows Ubuntu
1. Users have to pay to use Windows. Free and available as open source.
2. Supports executable files. Does not support executable files.
3. Doesn’t support server. Can work as a server.
4. Doesn’t support multiple desktop environment. Supports multiple desktop environments.
5. Doesn’t has its own software manager. It has its own software manager.
Q8. What are some New features in Ubuntu 17.10?
Answer
Here is a list of new features added to Ubuntu 17.10.
  • As the default desktop, GNOME replaces Unity
  • Default display server Wayland
  • Default Display Manager GDM
  • WiFi Captive Portals support
  • Better support for Bluetooth speakers
  • Performance improvement with Linux Kernel 4.13
Q9. How do I check my current version of Ubuntu?
Answer
To check the current version of Ubuntu, we have to follow these steps:
  • Open the terminal
  • Put the command lsb_release -a
  • A message will be followed up like this:

$ lsb_release –a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 17.10.3 LTS

Release: 17.10

Codename: trusty

(The release and description numbers are an example here)

The List of common Ubuntu terminal commands.

Q10. What are the basic commands in Ubuntu?
Answer
Ubuntu has a long list of basic commands. Here is the list of most used ones:
  • Sudo–to be used for a command that requires root permissions
  • ls (list) - terminal will show you all the files and folders of the directory
  • cd –Prime command that always is in use in terminal
  • pwd - displays the full pathname of the current working directory
  • cp - allows copying a file
  • mv - allows moving a file
  • rm - allows removing a specified file
  • mkdir–Used to create a new directory
  • history - displays all of the previous commands
  • df - presents information of all mounted filesystems disk space usage
  • du - shows the size of a directory and subdirectories
  • free –allows us to see the amount of open space available in the system
  • uname–a–Offers a wide range of necessary information regarding system
  • top –displays the process utilizing the most system resources at any given time
  • info –displays a manual page with precise information
Q11. What is the Ubuntu terminal?
Answer

Ubuntu terminal is an interface in which users can type and execute text-based commands. It is used because of faster work completion as compared to graphical applications and menus.

Q12. How do I create a service in Ubuntu?
Answer
Q13. How to start services in Ubuntu?
Answer
Q14. How do I get to root in Ubuntu?
Answer

Running root commands with Sudo is the most preferred way to root in Ubuntu. We can follow this process to root in Ubuntu.

  • Open a terminal window using Ctrl+Alt+T
  • Type the command sudo before the rest of your command
  • Put the command gksudo before running a command that opens a program with a GUI
  • Now simulate a root environment
  • Finally, give sudo access to another user

Advance Linux interview question and suggested answers for them to be followed by freshers and experienced.

Q15. How to open a file in Ubuntu terminal?
Answer
Q16. How do you create a new file in Ubuntu?
Answer
Q17. How do I get help in Ubuntu terminal?
Answer
We can use the following ways to get help in the Ubuntu terminal.
  • Use of –h or –help command
  • Using tab completion on the Shell
  • Use the help command by pressing Ctrl+ Alt+ T and then type help
  • Using the man pages
  • Using the info command
  • Using the relevant command
Q18. What is sudo command in Ubuntu?
Answer

Sudo or “superuser do!”used to run commands in Ubuntu with elevated privileges, which are required to perform specific administrative tasks.

Q19. How do you go to a directory in Ubuntu?
Answer
There are different commands to access the directory in Ubuntu.
  • cd /- To navigate the root directory
  • cd or cd ~ - To navigate through the home directory
  • cd–To navigate up one directory level
  • cd -- To navigate to the previous directory
Q20. How to use mkdir command in Ubuntu?
Answer

The mkdir command is used in Ubuntu to create new directories. The syntax to use the mkdir command is described below:

mkdir [OPTION]... DIRECTORY.

Q21. How do I reboot Ubuntu?
Answer
Q22. How do you create an empty file in Ubuntu?
Answer
Q23. How do I free up disk space on Ubuntu?
Answer
Q24. How to use chmod command in ubuntu?
Answer
Q25. How do I change the root password in Ubuntu terminal?
Answer
Q26. How do I delete a user account in Ubuntu?
Answer
Q27. How do I change the user in Ubuntu?
Answer
Q28. How to open csv file in ubuntu command?
Answer
Q29. How to use repo command in ubuntu?
Answer
Q30. How to check opencv version ubuntu command?
Answer
Q31. How to use sudo command in ubuntu?
Answer
Q32. How to check ram size in ubuntu command?
Answer
Q33. How to use telnet command in ubuntu?
Answer
Q34. How to use find command in ubuntu?
Answer
Q35. How to install ip command in ubuntu?
Answer