Questions tagged [ubuntu]

Ubuntu Linux is a Debian derivative that aims to bring Linux mainstream. Questions on this site should generally refer to Ubuntu Server. Note that is specifically dedicated to Ubuntu questions.

Filter by
Sorted by
Tagged with
331 votes
4 answers

What are the functional differences between .profile .bash_profile and .bashrc

What are the functional differences between the .profile, .bash_profile and .bashrc files?
193 votes
2 answers

How do I ask apt-get to skip any interactive post-install configuration steps?

I have a server build script which uses apt-get to install packages. It then puts pre-written configuration files directly in place, so the interactive post-install configuration dialog in packages ...
  • 2,525
191 votes
5 answers

Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?

I have some experience using linux but none using nginx. I have been tasked with researching load-balancing options for an application server. I have used apt-get to install nginx and all seems ...
189 votes
14 answers

How to view all ssl certificates in a bundle?

I have a certificate bundle .crt file. doing openssl x509 -in bundle.crt -text -noout only shows the root certificate. how do i see all the other certificates?
  • 2,387
141 votes
5 answers

Job scheduling using crontab, what will happen when computer is shutdown during that time?

I schedule some tasks using crontab. What will happen if my computer is shutdown or turned off during the time when cron was scheduled to do something? Does each missed cron job run after computer ...
138 votes
3 answers

How to remove the "installed manually" flag and revert to "automatically installed" with apt-get?

To compile something, I needed the zlib1g-dev package to be installed so I launched an apt-get install zlib1g-dev. apt-get informed me nicely that the package was already auto-installed because of ...
133 votes
13 answers

How do I get apt-get to ignore some dependencies?

How do I make apt-get ignore some dependencies? For example, I wanted to install mailx so I can use it to send email from cron scripts/report-generating tools. However, installing mailx also installs ...
  • 1,726
127 votes
3 answers

How do I reattach to Ubuntu Server's 'do-release-upgrade' process?

I accidentally pressed Ctrl+C during Ubuntu Server's do-release-upgrade process. I'd dropped to a shell to compare a .conf file in /etc/. When I pressed Ctrl-C, it asked whether I wanted to try to ...
  • 1,637
127 votes
10 answers

Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?

My understanding was that the primary limitation of running docker on other OSs was the Linux Network containers that made it possible. (Certainly for Macs). Recently Microsoft announced a beta of a ...
  • 2,679
125 votes
12 answers

Can I hide all server / os info?

I don't want anyone to be able to detect that I'm using NGINX or even Ubuntu from the internet. There are tools out there (such as BuiltWith) which scan servers to detect what tools they're using. ...
  • 2,693
121 votes
4 answers

How do I auto-start docker containers at system boot?

What is a good way to automatically start docker containers when the system boots up? Is there a preferred way to do this on Ubuntu 14.04? I've used supervisord in the past to auto start web apps. ...
107 votes
12 answers

How to start/stop iptables on Ubuntu?

How can I start/stop the iptables service on Ubuntu? I have tried service iptables stop but it is giving "unrecognized service". Why is it doing so? Is there any other method?
user avatar
106 votes
8 answers

How to determine JAVA_HOME on Debian/Ubuntu?

On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives. But this does not set the JAVA_HOME environment variable, due to a debian policy. ...
  • 1,433
104 votes
17 answers

CentOS vs. Ubuntu [closed]

I had a web server that ran Ubuntu, but the hard drive failed recently and everything was erased. I decided to try CentOS on the machine instead of Ubuntu, since it's based on Red Hat. That ...
  • 1,115
104 votes
8 answers

Which ports do I need to open in the firewall to use NFS?

I'm running Ubuntu 11.10 - setting up NFS to share a directory among many other servers. Which ports are required to be opened on the firewall?
  • 1,153
98 votes
12 answers

df says disk is full, but it is not

On a virtualized server running Ubuntu 10.04, df reports the following: # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 7.4G 7.0G 0 100% / none ...
  • 981
98 votes
6 answers

list all packages from a repository in ubuntu / debian

is there a command to see what packages are available from a certain ppa repository?
  • 1,111
94 votes
15 answers

How to fix PuTTY showing garbled characters? [closed]

Connecting from a Windows 7 PC via SSH to an Ubuntu server using PuTTY, I get some screen errors: I.e. it: "Double-draws" the selection inside Midnight Commander (MC). Other characters like line ...
  • 2,380
94 votes
9 answers

GPG does not have enough entropy

I've got a ton of processes running in the background to try and get enough entropy, but I am still failing. **We need to generate a lot of random bytes. It is a good idea to perform some other ...
94 votes
4 answers

dpkg-reconfigure: unable to re-open stdin: No file or directory

I am building a provisioning script for a ubuntu vagrant vm, on a ubuntu host, both 12.10 64bit When installing the following packages: sudo apt-get -y install php5-xsl graphviz php-pear unison I ...
  • 1,333
92 votes
5 answers

Why don't EC2 ubuntu images have swap?

I started a couple servers on EC2 and they don't have swap. Am I doing something wrong or is it that the machines just don't have any?
  • 1,119
91 votes
7 answers

How can I edit the welcome message when ssh start?

I have a VPS for my website hosting. It is running a Ubuntu server. Every time I logged in my server by ssh, it displays a lengthy welcome message in my terminal. Linux 2.6.18-...
user avatar
88 votes
8 answers

Heartbleed: how to reliably and portably check the OpenSSL version?

I was looking at a reliable and portable way to check the OpenSSL version on GNU/Linux and other systems, so users can easily discover if they should upgrade their SSL because of the Heartbleed bug. ...
  • 833
87 votes
5 answers

How does Ubuntu keep track of the "System restart required" flag in motd?

I have a few Ubuntu servers (8.10, 9.10) that is set to automatically install security updates. Some times these updates requires a restart of the system, and this string is shown in motd: *** System ...
86 votes
9 answers

Is there a proper way to clear logs?

I was wondering if there was a proper way to clear logs in general? I'm new to Ubuntu and I'm trying to set up Postfix. The log in question is /var/log/mail.log. I was wondering if there was a ...
  • 963
84 votes
7 answers

Amazon Linux vs. Ubuntu for Amazon EC2 [closed]

I'm setting up my first website on Amazon EC2, and I'm trying to decide which distro to use. I've used Redhat and CentOS in the past, but I have no bias towards any system, I just want to use whatever ...
79 votes
8 answers

Apache2 config variable is not defined

I installed apache2 on ubuntu 13.10. If I try to restart it using sudo /etc/init.d/apache2 restart I get this message: AH00558: apache2: Could not reliably determine the server's fully qualified ...
79 votes
5 answers

Best location to keep SSL certificates and private keys on Ubuntu servers?

On Ubuntu, it looks like the best place for a private key used to sign a certificate (for use by nginx) is in /etc/ssl/private/ This answer adds that the certificate should go in /etc/ssl/certs/ but ...
  • 1,607
78 votes
4 answers

Automate the installation of postfix on Ubuntu

My system configuration script does an apt-get install -y postfix. Unfortunately the script is halted when the postfix installer displays a configuration screen. Is there a method to force postfix to ...
  • 966
77 votes
3 answers

Ubuntu displays "There is 1 zombie process" upon login

This message appears when I login to my machine: There is 1 zombie process. What is it telling me? Is this anything I should worry about? If yes, then what should I do, and how?
  • 2,428
76 votes
9 answers

Command line program to test DHCP service

Is there a simple ping-like command to test whether a DHCP service is running on a network? ...on Linux
  • 2,700
76 votes
9 answers

What is the debian-sys-maint MySQL user (and more)?

I have been bitten several times by the 'debian-sys-maint' user that is installed by default on the mysql-server packages installed from the Ubuntu repositories. Generally what happens is I pull a ...
  • 1,849
75 votes
11 answers

Why is ssh agent forwarding not working?

In my own computer, running MacOSX, I have this in ~/.ssh/config Host * ForwardAgent yes Host b1 ForwardAgent yes b1 is a virtual machine running Ubuntu 12.04. I ssh to it like this: ssh pupeno@b1 ...
  • 7,319
74 votes
2 answers

How should an IT department choose a standard Linux distribution?

There is a lot of community feeling about what Linux distributions are appropriate for production server environments and which aren't, however, a lot of this feeling seems religiously based, and ...
  • 6,838
74 votes
4 answers

What is the difference between PV and HVM virtualization types in ec2?

AWS EC2 offers two types of virtualization of Ubuntu Linux EC2 machines - PV and HVM. PV: HVM: What is the difference between these types?
  • 12.8k
73 votes
3 answers

Install openssl-dev on Ubuntu server

In order to compile NGinx in need to install openssl and openssl-dev (I'am following a book guide). So i'am doing this : sudo apt-get install openssl openssl-dev But i get an error telling me that ...
  • 833
73 votes
5 answers

Change default directory when I SSH to server

I was wondering if there is a way to change the default directory that I get put into after I SSH into my Ubuntu server. 99% of the time when I'm logging into my server, it is to access files within ...
  • 1,185
73 votes
11 answers

apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

I keep getting this warning when I (re)start Apache. * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName ...
  • 1,181
72 votes
5 answers

How to properly set permissions for NFS folder? Permission denied on mounting end.

I'm trying to connect to an NFS folder on my dev server. The owner of the folder on the dev server is darren and group darren. When I export and mount it to my Mac using the Disk Utility it mounts, ...
  • 947
72 votes
1 answer

Why does htop have three load averages?

On htop, it shows three load averages, one bold, one normal, one red. What do they signify?
  • 2,569
71 votes
13 answers

Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host

I'm running into a problem with my Docker containers on Ubuntu 14.04 LTS. Docker worked fine for two days, and then suddenly I lost all network connectivity inside my containers. The error output ...
  • 2,021
71 votes
3 answers

Block range of IP Addresses

I am getting bombarded with attempted hacks from China all with similar IPs. How would I block the IP range with something like 116.10.191.* etc. I am running Ubuntu Server 13.10. The current line ...
71 votes
5 answers

How can I monitor what logrotate is doing?

How can I monitor what logrotate is doing in Ubuntu? Can the activity of logrotate be monitored?
user avatar
69 votes
11 answers

How do I check if Log4j is installed on my server?

I have read about security vulnerabilities related to Log4j. How do I check if Log4j is installed on my server? My specific servers use Ubuntu 18.04.6 LTS. I have installed many third-party packages ...
  • 841
68 votes
7 answers

How to force MySQL to connect by TCP instead of a Unix socket?

I would like to analyze mysql traffic. Right now, all mysql requests are sent to the MySQL unix socket: unix 2 [ ACC ] STREAM LISTENING 3734388 15304/mysqld /var/run/mysqld/...
  • 3,463
66 votes
3 answers

What does -qq argument for apt-get mean?

I just received a Vagrantfile and post install bash script. The vagrantfile downloads standard Ubuntu from Ubuntu Cloud but I found something in the bash script. Few lines of script reads as: apt-...
user avatar
65 votes
7 answers

Unknown/unsupported storage engine: InnoDB | MySQL Ubuntu

I recently upgraded from the previous LTS Ubuntu to Precise and now mysql refuses to start. It complains of the following when I attempt to start it: ╰$ sudo service mysql restart stop: Unknown ...
  • 783
63 votes
5 answers

Straight forward way to run ssh-agent and ssh-add on login via SSH?

I'm trying to have the following commands be auto-executed when I login to my server via ssh: ssh-agent /bin/bash ssh-add ~/.ssh/id_rsa My ssh key has a passphrase and I'm fine with entering it once ...
62 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, ...
  • 3,560
62 votes
4 answers

How can I check /dev/xvda1?

On login to EC2 (Ubuntu) instance, I see *** /dev/xvda1 should be checked for errors *** I can't fsck /dev/xvda1 because it is mounted, and sudo umount /dev/xvda1 fails because it is in use. lsof ...

2 3 4 5