General Questions Flashcards

1
Q

What is Linux?

A

Linux is an operating system based on UNIX, and was first introduced by Linus Torvalds. It is based on the Linux Kernel, and can run on different hardware platforms manufactured by Intel, MIPS, HP, IBM, SPARC and Motorola. Another popular element in Linux is its mascot, a penguin figure named Tux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between UNIX and LINUX?

A

Unix began as a propriety OS and was developed at Bell Labs. Linux is open source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is BASH?

A

Bourne Again Shell written by Steve Bourne as a replacement to Bourne Shell. It combines all the features from the original version of Bourne Shell, plus additional functions to make it easier and more convenient to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Linux Kernel?

A

The Linux Kernel is a low-level systems software whose main role is to manage hardware resources for the user. It is also used to provide an interface for user-level interaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is LILO?

A

LILO is a boot loader for Linux. It is used mainly to load the Linux operating system into main memory so that it can begin its operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a swap space?

A

A swap space is a certain amount of space used by Linux to temporarily hold some programs that are running concurrently. This happens when RAM does not have enough memory to hold all programs that are executing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the advantage of open source?

A

Open source allows you to distribute your software, including source codes freely to anyone who is interested. People would then be able to add features and even debug and correct errors that are in the source code. They can even make it run better, and then redistribute these enhanced source code freely again. This eventually benefits everyone in the community.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the basic components of Linux?

A

ust like any other typical operating system, Linux has all of these components: kernel, shells and GUIs, system utilities, and application program. What makes Linux advantageous over other operating system is that every aspect comes with additional features and all codes for these are downloadable for free.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the basic difference between BASH and DOS?

A

The key differences between the BASH and DOS console lies in 3 areas:

  • BASH commands are case sensitive while DOS commands are not;
  • under BASH, / character is a directory separator and \ acts as an escape character. Under DOS, / serves as a command argument delimiter and \ is the directory separator
  • DOS follows a convention in naming files, which is 8 character file name followed by a dot and 3 character for the extension. BASH follows no such convention
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the root account

A

The root account is like a systems administrator account, and allows you full control of the system. Here you can create and maintain user accounts, assigning different permissions for each account. It is the default account every time you install Linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CLI?

A

CLI is short for command line interface. This interface allows users to type declarative commands to instruct the computer to perform operation. CLI offers an advantage in that there is greater flexibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is GUI?

A

Graphical User Interface. The use of graphical elements makes it easier to interact with the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you open a command prompt when issuing a command?

A

Launch a terminal app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can you find out how much memory Linux is using?

A

cat /proc/meminfo for memory usage info.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you refer to the parallel port where devices such as printers are connected?

A

you refer to it as /dev/lp. So LPT1 would be referred to as /dev/lp0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Are drives such as harddrive and floppy drives represented with drive letters?

A

No. In Linux, each drive and device has different designations. EX: /dev/fd0, /dev/fd1 for floppy drives and for IDE/EIDE hard drives are referred to as /dev/hda, /dev/hdb…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do you change permissions under Linux?

A

chmod go+r filename to give read permissions to group and others

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

In Linux, what names are assigned to the different serial ports?

A

Serial ports are identified as /dev/ttyS0 to /dev/ttyS7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How do you access partitions under Linux?

A

Linux assigns numbers at the end of the drive identifier. EX: if hard drive had three primary partitions, then you would name and number as /dev/hda1, /dev/hda2, /dev/hda3

20
Q

What are hard links?

A

Hard links are multiple references/links to same inode. Each hard link takes up an entry in the inode table.

21
Q

What is the maximum length for a filename under Linux?

A

Any filename can have a maximum of 255 characters. This limit does not include the pathname.

22
Q

What are filenames that are preceded by a dot?

A

They are hidden files. These files can be configuration or script files. It makes it less likely to be accidentally deleted.

23
Q

Explain Virtual desktop

A

Using virtual desktop, each desktop is a clean slate where you can open one or more programs. Rather than minimizing/restoring all those program as needed, you can simply shuffle between virtual desktops.

24
Q

How do you share a program across different virtual desktops under Linux?

A

To share a program across different virtual desktops, in the upper left-hand corner of a program window look for an icon that looks like a pushpin. Pressing this button will “pin” that application in place, making it appear in all virtual desktops, in the same position onscreen.

25
Q

What does a nameless (empty) directory represent?

A

This empty directory name serves as the nameless base of the Linux file system. This serves as an attachment for all other directories, files, drives and devices. IE: for mounting or mount point

26
Q

What is the pwd command?

A

present working directory

27
Q

What are daemons?

A

Daemons are services that runs in the background. After the service is done, it disconnects and waits for further requests.

28
Q

What are the kinds of permissions under Linux?

A

Read, write and execute.

29
Q

What are environment variables?

A

Environment variables are global settings that control the shell’s function and linux programs.

30
Q

What are the contents in /usr/local?

A

It usually contains installed files.

31
Q

How do you terminate an ongoing process?

A

kill -9 pid or kill 0 to terminate all process at once.

32
Q

What is command grouping and how does it work?

A

You can use parentheses to group commands. For example, if you want to send the current date and time along with the contents of a file named OUTPUT to a second file named MYDATES, you can apply command grouping as follows: (date; cat OUTPUT) > MYDATES

33
Q

How do you execute more than one command or program from a single command line entry?

A

Use semicolon after each command

34
Q

Write a command that will look for files with an extension “c”, and has the occurrence of the string “apple” in it

A

find . -name “*.c” | xargs grep -i “apple”

35
Q

Write a command that will do the following:

  • look for all files in the current and subsequent directories with an extension c,v;
  • strip the,v from the result (you can use sed command)
  • use the result and use a grep command to search for all occurrences of the word ORANGE in the files.
A

find . -name “*.c,v” | sed ‘s/,v//g’ | grep “ORANGE”

36
Q

What port is ssh service?

A

port 22

37
Q

What port is telnet service?

A

Port 23

38
Q

What port is smtp service?

A

Port 25, and 465 for SMTP over SSL

39
Q

What port is POP service?

A

Port 110 and 995 for pop3s SSL

40
Q

What port is mySQL service?

A

Port 3306

41
Q

What port is https service?

A

443

42
Q

How do you output the last line of a file?

A

-tail -1 filename

43
Q

How do you change the kernel state during runtime?l

A

sysct

44
Q

How do you substitute string1 with string2 in multiple files that contains string1?

A

find . -type f -exec sed -i ‘’ “s/string1/string2/g” {} \;

45
Q

How do you display information about processes with the most CPU usage?

A

top -o cpu

46
Q

How can you find out how many current cron jobs are on the system?

A

Login as root and list what’s in /var/spool/cron