Questions tagged [linux]

Linux is the generic term for a UNIX-like open source operating system based on the Linux kernel.

GNU/Linux is a UNIX-like Open Source operating system. Linus Torvalds originally wrote the Linux kernel with contributions from others on the MINIX usenet board. Since then, Linux had thousands of developers, both paid by companies and volunteers. The main system tools and libraries for GNU/Linux are sourced from the GNU Project, hence the nomenclature GNU/Linux (GNU Toolchain over Linux Kernel). The Linux kernel is licensed under the GPL v2 license.

There are many different Linux Distributions (sometimes shortened to distro), which consist of software applications packaged and provided with the Linux kernel, being Slackware the oldest active distro and Debian, Red Hat and CentOS among the most used on Internet servers¹.

The Linux kernel is commonly run on servers but is highly portable and is used in a variety of applications, from wireless routers and cell phones to clusters and super computers with thousands of nodes and processors.

External Resources:

38271 questions
64
votes
9 answers

Deleting All Partitions From the Command Line

How do you delete all partitions on a device from the command line on Linux (specifically Ubuntu)? I tried looking at fdisk, but it presents an interactive prompt. I'm looking for a single command, which I can give a device path (e.g. /dev/sda) and…
Cerin
  • 3,600
  • 19
  • 61
  • 79
64
votes
7 answers

Hostnames - What are they all about?

I've recently been "forced" to perform some sysadmin work, while this isn't something that I absolutely love doing I've been reading, experimenting and learning a lot. There is one fundamental aspect of server configuration that I've not been able…
Alix Axel
  • 2,803
  • 6
  • 29
  • 30
63
votes
9 answers

Is it OK to set up passwordless `sudo` on a cloud server?

I love the idea of accessing servers via keys, so that I don't have to type in my password every time I ssh into a box, I even lock my user's (not root) password (passwd -l username) so it's impossible to log in without a key. But all of this…
Dmitry Pashkevich
  • 713
  • 1
  • 5
  • 11
63
votes
8 answers

Deploying a folder of template files using ansible

Is there an easy way to deploy a folder full of template .j2 folder to a linux box, using the same name as the template, but without the .j2 extension, rather than using the template module for each file? Right now i have a long list of: - name:…
Trololololol
  • 733
  • 1
  • 5
  • 6
63
votes
10 answers

Can I run a cron job more frequently than every minute?

Is it possible to run a cron job every 30 seconds without a sleep command?
user15336
  • 783
  • 1
  • 5
  • 8
63
votes
2 answers

How to run cron job on a specific hour every day?

What do I need to write in crontab to execute a script at 3pm every day?
john
  • 1,025
  • 3
  • 9
  • 15
63
votes
9 answers

Linux: How to know where a process was started and how it was started?

I was checking a Linux box and found a perl process running and taking a good share of cpu usage. With top, i could only perl in process name. When i pressed c, to view the command-line, it showed /var/spool/mail. Which does not make sense, since…
Fernando
  • 1,189
  • 6
  • 23
  • 32
62
votes
11 answers

How Often Should I Update our Linux Server?

I am responsible for managing both our production server (mail, web, database are all on one server) and our test server. Both are built on Debian. However as I am very new to system administration, I have only been installing updates as I come…
Noah Goodrich
  • 19,427
  • 6
  • 25
  • 16
62
votes
4 answers

What characters should I use or not use in usernames on Linux?

I want to create user accounts named after a domain name. adduser complains that the usernames need to match the NAME_REGEX regular expression. adduser: Please enter a username matching the regular expression configured via the NAME_REGEX…
Ed Haber
  • 775
  • 1
  • 8
  • 9
62
votes
5 answers

How can I hide the output of a shell application in Linux?

How can I hide the screen output (printf) of a shell application in Linux?
Jader Dias
  • 4,705
  • 19
  • 50
  • 51
62
votes
7 answers

How to move files with SCP?

How to not copy but move files from one server to another (both Linux)? man scp didn't give me anything useful. I cannot use 'scp' then 'rm' because I must make sure the file is successfully transferred. If there is any error during transfer, the…
Putnik
  • 2,217
  • 4
  • 27
  • 43
62
votes
13 answers

What is the recommended size for a Linux /boot partition?

What is the recommended size for a Linux /boot partition? And is it safe to not have a /boot partition? I see some servers don't have a /boot partition while some servers have a 128 MB /boot partition. I am a little confused. Is /boot partition…
Tyler Liu
  • 723
  • 1
  • 6
  • 7
62
votes
18 answers

iptables Tips & Tricks

I'm sure Linux sysadmins are quite familiar with iptables, the userland interface to the netfilter packet-filtering framework. Now, this "Question" is meant to be a Community Wiki for collecting together various bits-n-pieces of iptables wisdom.…
pepoluan
  • 5,038
  • 4
  • 47
  • 72
61
votes
3 answers

Is it possible to on-line shrink a EXT4 volume with LVM?

Today I tried this on my machine with OpenSUSE 12.3 (kernel 3.7): # resize2fs /dev/mapper/system-srv 2G resize2fs 1.42.6 (21-Sep-2012) Filesystem at /dev/mapper/system-srv is mounted on /srv; on-line resizing required resize2fs: On-line shrinking…
Alicia
  • 765
  • 1
  • 5
  • 8
61
votes
4 answers

Fastest way to extract tar.gz

Is there anyway to extract a tar.gz file faster than tar -zxvf filenamehere? We have large files, and trying to optimize the operation.
Justin
  • 5,328
  • 19
  • 64
  • 84