Basic questions about Linux interview-Part 1

Source: Internet
Author: User

In the first two articles about the Linux interview, we received a lot of good feedback and expressed great thanks. At the same time, we will continue this series of topics. Here, we will demonstrate 10 questions for mutual learning.

Series of articles:

11 basic Linux interview questions

Basic questions about Linux interview-Part 1

Basic questions about Linux interview-Part 1

Q.1. how do you add a new user (for example, tux) to your system )?
  • Use the useradd command
  • Use the adduser command
  • Use the linuxconf command
  • All of the above
  • None of the above answers

A: All of the above are useradd, adduser, and linuxconf. You can add new users to your linux system.

Q.2. how many primary partitions is there on a hard disk?
  • 1
  • 2
  • 4
  • 16

A: A Hard Disk may have up to four primary partitions.

Q.3. what is the default port number for Apache/Http?
  • 8080
  • 80
  • 8443
  • 91
  • None of the above answers

A: The default configuration of Apache/Http is port 80.

Q.4. what does GNU mean?
  • GNU's not Unix
  • General Unix
  • General Noble Unix
  • Greek Needed Unix
  • None of the above answers

A: GNU stands for GNU's not Unix.

Q.5. if you enter mysql in the shell prompt and get "can't connect to local MySQL server through socket"/var/mysql. sock '"Prompt, what should you first check?

A: When this error message is displayed, I first use the service mysql status or service mysqld status Command to check whether the mysql service is running. If the mysql service is not running, start the required service.

Note: The error message above may be caused by incorrect configuration of my. cnf or mysql user permissions. If the mysql service is still unavailable after it is started, you need to check the two items.

Q.6. how to mount windows ntfs partition to Linux?

A: First, use apt or yum to install the ntfs3g package, then run the "sudo mount t ntfs ­ 3g/dev // <mount point>" command to mount the windows partition to Linux.

Q.7. Which of the following is not an RPM-based operating system?
  • RedHat Linux
  • CentOS
  • Scientific Linux
  • Debian
  • Fedora

A: The 'debian 'system is not based on RPM, and the others are

Q.8. in Linux, which command is used to rename a file?
  • Mv
  • Ren
  • Rename
  • Change
  • None of the above answers

A: In Linux, the mv command is used to rename a file. Example: mv/pathToFile/originalFileName. extension/PathToFile/New_name.extension

Q.9. in Linux, which command is used to create and display files?
  • Ed
  • Vi
  • Cat
  • Nano
  • None of the above answers

A: The 'cat' command is used to create and display files.

10. Which layer protocol is used to support users and programs, such as passwords, resource sharing, file transmission, and network management?
  • Layer-4 Protocol
  • Layer 5 Protocol
  • Layer-6 Protocol
  • Layer-7 protocol
  • None of the above answers

Answer: 'layer 7 Protocol'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.