answersLogoWhite

0

📱

Linux

A free and open-source family of operating systems first started in 1991 and named after its creator, Linus Torvalds.

2,239 Questions

How does a subroutine work in Linux?

With Linux being mostly written in C and normally interfaced via C libraries, I'll give an example from the C point of view, thus I'll refer to functions in place of sub routines.

Using the following C function as an example:

int add(int number1, int number2) { return (number1 + number2); }

Before the add function is called, the values of its arguments are pushed onto the stack by the caller in reverse order (number2 then number1).

When the function is called, it reads the values of number1 and number2 from the stack into CPU registers where the addition is done, leaving the answer in register eaxbefore returning from the function.

What is var directory in Linux stands for?

Var directory is a sub directory of the root directory,

The system writes data during process of its operation.

Does Microsoft use a Linux server for their website?

For some things, yes.

While most of their back-end servers are running Windows, NetCraft shows some servers (such as download.microsoft.com) as running Linux. This is most likely due to their use of Akamai for content delivery, which has caching Linux servers in front of all sites.

Microsoft also has a farm of 10,000+ Linux servers that host the Skype infrastructure.

Is the Dell Photo All-In-One Printer 924 compatible with Kubuntu?

As of November, 2009, this printer is classified as a "paperweight" in the OpenPrinting database. So no.

Define the booking system?

A booking system is a modern day organizer to help make reservations for things such as flights, hotels, trains, cinemas and much more online.

How do you install an audio player on Debian?

From a terminal type: sudo aptitude install vlc

What is the purpose of the mailertable file?

A sendmail mailertable allows you to over-ride the default routing for email, in other words, you can create special routing for arbitrary domains. There is probably nothing in the email world that can't be accomplished with sendmail, Eric Allman is a genius.

How do you set the date on a Raspberry Pi?

You can set it by using the "date" command

Syntax is "date MMDDhhmmYY"

Can someone help you install DSL on a 1g flashdrive on your Windows ME?

If your computer has Windows ME on it, it is NOT capable of USB booting. The DSL wiki has detailed instruction on how to make a bootable DSL flash drive. Basically, you need to:

1. Format your Flash drive with a FAT32 file system.

2. Downloaded the embedded DSL zip file and extract it to the Flash drive/

3. Download and install the Windows version of Syslinux

4. Run the Syslinux program on your Flash drive.

What is BusyBox in Linux?

BusyBox is a project that aims to provide a number of common Linux utilities (such as grep,ls,who,passwd,head,uname, and so on) in a single binary. This has the advantage of reducing the amount of space needed to store all these functions. As it is smaller than the standard tool package, it is used in ramdisks and in embedded systems where space is an issue.

When pack command is used the original file size is reduced by?

There is no "pack" command in Linux. However, there are numerous compression and archival programs available for use.

"tar" is an archival program. It does no compression, but allows you to put multiple files into one.

"gzip" is a compression program. However, it can only compress one file. Used in conjunction with tar, it is just slightly better than the ".zip" format.

"bzip2" is another compression program with better compression ratios. Like "gzip," it is for compressing single files only. It is usually used in conjunction with "tar."

"zip" and "unzip" are programs for the "ZIP" archive format. It performs both compression and archival.

Answer:I'm not sure if this is an improvement to the above answer or not. As mentioned above, there is no "pack" command in Linux but, in addition to the excellent answer above, a compiled program may be 'stripped' in Linux with the 'strip' command and this will usually serve to reduce the binary file size.

The Linux 'strip' command modifies the binary program's symbol tables.

If you change a files permissions to chmod 755 in Linux what kind of permissions are assigned to the group that owns the file?

The group has read and execute permissions.

The number is octal; the digits pertain to owner, group and all users respectively. The binary representation in three bits of each digit gives read, write and execute permissions respectively. Thus the middle digit, for group permissions, a 5, is binary 101, indicating read and execute but no write permission.

In linux How can one remove an Xorg window that the window manager is unaware of?

I could not find the answer to this anywhere else, so I came up with the following program.

Note, Answers may reformat the code, so don't blame me for bad formatting! Also, if the output format of xwininfo changes, the program won't work. In this case, you may need to change the number of times that fgets() is called, or change the scanf format.

Also, I have copyrighted this program both to retain credit, and to make sure nobody else copyrights it to keep it from being freely available. You may do anything you like with the program except change or remove the copyright notice or distribute a compiled binary without this source and any changes you have made to it.

/* Copyright (C) 2012 Michael A. Bloom ({my first two initials followed by my last name}@{combine two words as follows: "dsl" followed by the word: extreme} dot com})

You may not change or remove this copyright notice, but except for distributing binaries without this original source and any changes you have made to it, you may otherwise do anything you wish with this code.

*/

#include

#include // Every Xlib program must include this

/* Chrome leaves unwanted windows around that are left over from popups. */

/* They are not present in the list produced by wmctrl -l. If your */

/* window manager is either metacity or openbox, it is a curious thing */

/* that although restarting either of them does not change anything, */

/* running metacity --replace (if not already running metacity) followed */

/* by openbox --replace, followed by metacity --replace (with three */

/* second sleeps between invocations) gets rid of the unwanted windows. */

/* As it is time consuming to do all that, I came up with this kludge to */

/* get rid of the obscuring windows more quickly. */

/* This is not a great workaround, as after getting rid of these orphan */

/* windows, new ones will continue to appear (once they have started to */

/* do so, they will keep on doing so). But it's better than nothing. */

void exit(int);

char linebuf[BUFSIZ];

main( int argc, char **argv){ FILE *fp;

int i;

Display *dpy = XOpenDisplay(NULL);

int Wid ;

int ret;

printf("Click on UNdesired window\n");

fp = popen("xwininfo","r");

/* Warning: This kludge will break if xwininfo's output format changes */

for (i=0;i< 5;i++){fgets(linebuf,sizeof(linebuf)-1,fp);}

fscanf(fp, "xwininfo: Window id: %i",&Wid);

pclose(fp);

/* Should this be XDestroySubwindows() ? */

ret = XDestroyWindow(dpy,(Window)Wid);

/* printf("%d\n",ret); */

XCloseDisplay(dpy);

exit(0);

}

What is the CLI called in Linux?

This is usually referred to as the "shell."

What is the difference between cron and anacron?

Anacron is the cron for desktops and laptops.

CronAnacronMinimum granularity is minute (i.e Jobs can be scheduled to be executed every minute)Minimum granularity is only in daysCron job can be scheduled by any normal user ( if not restricted by super user )Anacron can be used only by super user ( but there are workarounds to make it usable by normal user )Cron expects system to be running 24 x 7. If a job is scheduled, and system is down during that time, job is not executed.Anacron doesn't expect system to be running 24 x 7. If a job is scheduled, and system is down during that time, it start the jobs when the system comes back up.Ideal for serversIdeal for desktops and laptopsUse cron when a job has to be executed at a particular hour and minuteUse anacron when a job has to be executed irrespective of hour and minute

Can Xubuntu 6.06 run on a 180 Mhz Pentium 1 with 64 MB of RAM?

Yes. However, that's a little on the low side for RAM. Xubuntu runs better on at least 128MB. Less than that will require use of the alternate install CD. It will also likely get stuck while trying to configure "anthy." You can skip this part by pressing Alt-F2, and entering

killall mkworddic

Then press Alt-F1 to go back to the installer.

For performance reasons, you would probably get a lot better speed and responsiveness from a distro with an even lighter interface, such as Damn Small Linux.

What is Sticky bit?

The "Sticky bit" in a unix or Linux filesystem was originally designed to tell the OS to keep the program in cache, even after it loaded, so it would "stick" in memory. Although it made it faster to load the program the next time, it also made it difficult to do maintenance on the program, and it wasted memory if the program fell out of common use. For speedy program accesss, modern filesystem caches do a very good job, so the sticky bit is not often used for this any more.

Instead, the sticky bit, when applied to a directory, means: if a user writes a file to this directory, only let that user change that file. It is very common for the /tmp directory to have the sticky bit set. /tmp is a shared resource that every user can write to, so the sticky bit makes sure that users cannot interfere with each other's temp files.

How would you write a command which would securely copy your bashrc file from a remote computer to your home directory on your local computer?

Transferring the file through ssh would keep it secure. There are many options; A few examples are listed below. Run 'man <program name>' for the full program manual.

sftp - secure file transfer program

$ sftp user@host:.bashrc ~/.

rsync - a fast, versatile, remote (and local) file-copying tool

$ rsync user@host:.bashrc ~/.

scp - secure copy (remote file copy program)

$ scp user@host:.bashrc ~/.

Where is the root password stored in Ubuntu?

The root password is stored in hashed form in the /etc/shadow file.