Questions specifically about Linux, as opposed to Unix-like systems in general, or to questions about a specific distribution or program.

learn more… | top users | synonyms

8
votes
2answers
5k views

How to make exported shell variables permanent?

export LD_PRELOAD=/usr/lib/libtsocks.so It's ok that I can export in this way, but how can I make it permanent? I want LD_PRELOAD to still be changed after a reboot. I'm using Ubuntu and Fedora
7
votes
2answers
3k views

Several questions about file-system character encoding on linux

Due to a lot of file exchange works between Windows (GBK encoding) and Linux (UTF-8 encoding), it will encounter character encoding issues easily, such as: zip/tar files whose name contains chinese ...
6
votes
2answers
664 views

Share keyboard over network as separate device?

I am trying to achieve something similar to this: http://superuser.com/questions/67659/linux-share-keyboard-over-network The difference is that I need the remote keyboard to be usable separate from ...
6
votes
2answers
1k views

How does load average work with modern CPU's?

My understanding of load average lead me to be quite shocked with my current system. The CPU in my workstation is an i7 with hyperthreading enabled, and cat /proc/cpuinfo produces 4 'cpu's. That all ...
5
votes
2answers
1k views

What should I be aware of when installing Linux on a Mac?

I have a Macbook Pro and I am loving it, though I still miss my Linux box, there are many things I need which are not completely compatible with Mac OS X. I heard many stories about installing Linux ...
5
votes
4answers
6k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
5
votes
1answer
4k views

iptables port-mirroring

I need to be able to get a copy of packets received on port 8001 to port 8002. I have tried the following but I get an error that --tee is undefined. sudo iptables -t nat -A PREROUTING -p TCP -s ...
5
votes
2answers
2k views

Can I identify my RAM without shutting down linux?

I'd like to price some new RAM for our in-house VMware testing server. (It's a consumer box we use for testing our software on and running business VMs). I've forgotten what kind of RAM it has and I'd ...
4
votes
1answer
3k views

How to understand why the packet was considered INVALID by the `iptables`?

I set up some iptables rules so it logs and drops the packets that are INVALID (--state INVALID). Reading the logs how can I understand why the packet was considered invalid? For example, the ...
4
votes
1answer
2k views

Ubuntu Server, set terminal font to a custom ttf font?

I would like to change the system (console) font of my ubuntu server to a custom (downloaded) font. Is this possible? I've tried to use: dpkg-reconfigure console-setup but the only allows me to ...
4
votes
1answer
2k views

Mathematical connection between SZ RSS and VSZ in ps o/p?

I wanted to know what mathematical connection is there between the SZ, RSZ and VSZ output in ps output e.g. ps -p 2363 -o sz,rss,vsz
3
votes
1answer
180 views

Getting capabilities of my CD/DVD drive when wodim --devices doesn't work

I used to be able to run either commands successfully on my Fedora 14 Thinkpad T410 laptop: $ wodim --scanbus $ wodim --devices However since upgrading to Fedora 19 this no longer seems to work and ...
2
votes
2answers
1k views

Best options for mounting Mac OS X hard drive on my Linux box?

I have a new 3 terabyte external USB hard drive (Seagate ST3000DM001 in an enclosure). I hope to use it on both my iMac (OS X 10.6.8) and my Linux machines (Kubuntu). Right now this drive will ...
2
votes
1answer
393 views

Writing triggers for mcelog

Just starting to look into mcelog for the first time (I've enabled it and seen syslog output before, but this is the first time I'm trying to do something non-default). I'm looking for information on ...
2
votes
2answers
316 views

How do I prevent a script from terminating when the shell exits?

In particular, I created a script to start Firefox which I double-click and choose 'Run in terminal,' but when the shell exits Firefox is killed immediately. How do I prevent this from happening?
2
votes
1answer
345 views

Is there a difference between Linux and Unix? [duplicate]

Possible Duplicate: Is Linux a Unix? Kind of confused by the two terms. Is there any difference between the two terms?
1
vote
2answers
891 views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
-1
votes
2answers
1k views

Is the linux directory structure obsolete and obtuse? [closed]

I genuinely feel that the Linux directory system presents an obstacle for users migrating from other systems as well as being a bottleneck for the evolution of Linux itself. Rest assured I am not here ...
13
votes
4answers
7k views

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes while you have several gigs of RAM. In Linux it looks like that: And here is how it looks in Mac OS X: Is there a way to display ...
8
votes
2answers
2k views

Output ls -l size field with digits grouped by thousands?

It is possible to make ls -l output the size field with digits grouped by thousands? If so, how? For instance: $ ls -l -rw-rw---- 1 dahl dahl 43,210,052 2012-01-01 21:52 test.py (Note the commas ...
8
votes
1answer
627 views

Lightweight virtualization on Linux with user isolation

What Linux-on-Linux virtualization technologies provide user isolation? Specifically, I want root in the virtual machine not to have any privilege on the host. This was not the case for LXC, but was ...
8
votes
2answers
1k views

Detailed sparse file information on Linux

I have a sparse file, in which only some blocks are allocated: ~% du -h --apparent-size example 100K example ~% du -h example 52K example I would like to know which blocks of the file are ...
7
votes
2answers
243 views

Strange temporary network outage in Linux

I'm facing a very annoying problem that I noticed a week from now and for which I can't find an answer: my network suddenly stops responding, usually coming back exactly 25 seconds later. I was using ...
6
votes
2answers
34k views

Boot windows from grub rescue command prompt

Previously I had installed the Ubuntu 10.04 and Windows 7. Now I logged on to Windows, opened thepartition editor and deleted the volume containing the Ubuntu (Thought it will delete the Ubuntu and ...
5
votes
3answers
401 views

What exactly do we mean when we say we are using Linux?

I was going through an article on GNU which goes something like below There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: ...
5
votes
3answers
145 views

Use of ./ in running the compiled code

Why do we use ./ before running a compiled code in linux? It does not seem to necessary if I am in a directory higher than the one having compiled code. Let me explain by example. If my code is in ...
5
votes
3answers
998 views

What are the advantages of the Unix file system structure

If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system. Some scripts goes into /usr/share .. ...
5
votes
3answers
3k views

How do I “merge” two text files?

I recently upgraded from Ubuntu 12.04 to 12.10 and at one point, it encountered an Apache config file conflict in apache2.conf. I didn't give me a merge option at that point, so I just rejected the ...
5
votes
1answer
444 views

What are the main differences between Unix and Linux kernels today?

I know that many of the same programs run flawlessly on top of both kernels. I know that historically, the two kernels came from different origins. I know philosophically too that they stood for ...
5
votes
0answers
100 views

How can different file descriptors point to the same file in open file table? [duplicate]

Possible Duplicate: How can same fd in different processes point to the same file? I have a hard time grasping the two ideas of File Descriptor Table and Open File Table. Open File Table ...
5
votes
2answers
743 views

How do I get most of my standard Linux utilities and commands on Android 3.1?

By standard, I mean just what users often get by default with one of the popular distros. For example, uname, finger, vim, tmux, etc. I have a Galaxy Tab 10.1 (Android version 3.1, already rooted) ...
5
votes
2answers
5k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
5
votes
1answer
927 views

How to be notified when a USB device was plugged?

My system have to auto-mount for usb devices, how can I be notified when a usb device is plugged? Where can I read more about? I would like to treat that using shell script or C.
4
votes
4answers
732 views

Help me choose the right distribution for learning and hosting web apps

I'm coming to Linux from the Windows world, and I want to learns the ins and outs of the system in order to make it my primary day to day work and hosting environment. I'm pretty much a complete ...
4
votes
2answers
3k views

How to connect two computers via internet with ssh?

I want to connect another computer via internet that doesn't have a public IP. Is there any away to do this?
4
votes
2answers
369 views

Knowing Privilege rights on a file in Linux

i wanted to know the Read / Write Access on to a file , so i did this way ls -l Denem.sh This command displayed -rwxr-xr-x 1 pavan employee 672 DEC 20 2000 pavan.sh Could anybody please tell ...
4
votes
3answers
1k views

Permissions issues for shared directory on a server

The setup is we have a VPS running Debian Squeeze, and I've set up a shared directory for us to share files. So far I've followed this guide: ...
4
votes
2answers
1k views

Remapping caps-lock to escape, and menu to compose, on the linux console

When running X I use a .xmodmaprc to remap certain keys thusly: ! Make it so that both Caps Lock and Escape do Escape clear Lock keysym Caps_Lock = Escape ! Remap the menu key as Compose keysym Menu ...
3
votes
1answer
2k views

Hopelessly stuck on making Nvidia Driver work on Debian

Before I posted question here, I'd been hacking around for the solution for my problem, but none of them worked. Here is my situation. I had a Win7 OS before I put a Debian Squeeze on it, now I got a ...
3
votes
1answer
292 views

How does the Linux file structure work?

I see the different folders bin, dev, mnt, proc, srv, sys, etc. What are the properties of all these different folders? What are there purposes? Are there files in some of them that I should not ...
3
votes
2answers
448 views

Recommended reverse firewall applications for linux?

I'm looking for a reverse firewall, something like Little Snitch for Linux, but my google-fu is failing me. Does something like this exist on Linux?
3
votes
1answer
1k views

LVM2 partition alignment

How to do the following with Linux tools : LVM partition alignment and alignment of partition on LVM ? What in case where I want to setup LVM partition (for "pv") and then partitions ? To be more ...
3
votes
2answers
2k views

256 color in real console

I have in my .bashrc export TERM=xterm-256color but this cause blinking all colored text (ls --color, in vim etc.) in real console (CTRL + ALT + F1) . So is there any possibility to recognize in ...
3
votes
1answer
689 views

Bootable USB appearing as HDD not Removable Device

I have a unique problem with an older Toshiba satellite laptop that happens to be a LegacyFree laptop meaning you can't access the bios via the normal F2, Del, Esc, etc. I can only select a boot ...
3
votes
1answer
2k views

Multiple SSH chaining (tsocks, socksify, proxycommand, etc. )

http://i.stack.imgur.com/YTOvt.png Goal: you need to reach "Server B" from the Client "directly" with SSH, SCP. "Server B" is next to "Server A". E.g.: they're on the same subnet, but only "Server ...
3
votes
1answer
2k views

How to change font-size, number of rows / columns on a terminal

I am running a Linux server (without xwindows or any kind of GUI), with a modern 22" LCD monitor. Given the huge size of my monitor, I would like to increase the number of rows and columns on my ...
2
votes
2answers
61 views

What environment and credential is used by startup, background and service processes

Startup scripts (on boot) Processes running in (or sent to) the background (when using SSH -fN for example) Services etc... What $path variable will they be using? What credentials? Anything else I ...
2
votes
2answers
2k views

How to change the output redirection of a running process?

I know how to redirect output and how to suppress them in bash. Now, suppose I accidentally forgot to append the output redirection part to the command (e.g. 2>&1 or > /tmp/mystdout) and my ...
2
votes
5answers
760 views

What do these commands mean?

What would be a more straight forward readable way of these commands? And why exit 255 and not exit 1? [ $# -eq 3 ] || { echo error ; exit 255 ; } grep -q "string" && exit 0
2
votes
5answers
5k views

How do I resize a partition in Ubuntu linux without losing data?

I ran out of space in my on the drive only to find that there was another unformatted partition in the system that is available. I now want to resize the current partition to take in the empty ...