Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm having issues with my haproxy servers (running Ubuntu 16.04) rejecting new connections (or timing them out) after a certain threshold. The proxy servers are AWS c5.large EC2's with 2 cpus and 4GB of ram. The same configuration is used for both connection types on our site, we have one for websocket connections which typically have between 2K-4K concurrent connections and a request rate of about 10/s. The other is for normal web traffic with nginx as the backend with about 400-500 concurrent connections and a request rate of about 100-150/s. Typical cpu usage for both is about 3-5% on the haproxy process, with 2-3% of the memory used for the websocket proxy (40-60MB) and 1-3% of the memory used for the web proxy (30-40MB).

Per the attached config, the cpus are mapped across both cpus, with one process and two threads running. Both types of traffic are typically 95% (or higher) SSL traffic. I've watched the proxy info using watch -n 1 'echo "show info" | socat unix:/run/haproxy/admin.sock -' to see if I'm hitting any of my limits, which does not seem to be the case.

During high traffic time, and when we start to see issues, is when our websocket concurrent connections gets up to about 5K and web requests rate gets up to 400 requests/s. I mention both servers here because I know the config can handle the high concurrent connections and request rate, but I'm missing some other resource limit being reached. Under …
We have an Ubuntu Server (Xenial) that will never touch the internet.  We can't query the Ubuntu Repo from another Ubuntu Server that has Internet access, how can we get the packages we need, with all dependencies?
Ive usually installed PHP via:-
sudo apt install php libapache2-mod-php php-mysql

Open in new window

Which works great and installs the latest version of PHP and configures everything fine :-)

Problem is I want some of my sites to run on PHP 5 (for historical purposes), some to run on the current version of PHP 7 and some to run on a future version of PHP 7 for testing.

On my hosting website, I can add a line into the vhost configuration to tell it what version of PHP to run, for example to run PHP7 I just add this into the htaccess file and it runs the site with PHP 7:-
AddType application/x-httpd-php70 .php
This is exactly what I want to do, however all the guides Ive found online talk about running everything under the same version, but not individual sites.

Anyone got any ideas on this?

Ideally I want to download different versions of PHP into a folder \PHP\PHP7.3\ and then inside htaccess point to use \PHP\PHP7.3\ or something different.

Im using Ubuntu server with Apache if that helps, and this is only for development purposes, not production.
I get file "courier-imap-5.0.8.tar" (attached) but am not sure about its setup in Ubuntu. Please help.
Jpg file does exist in "/var/www/pict" path, but html file below is not able to show Jpg file. Why?

        <!--div align="center"-->
        <div class="container" style="background:url('../pict/ID-10028343.jpg') no-repeat center top; Height:780px; Width:1220px; background-size:100% 100%; margin:0 auto; ">

Open in new window

nextcloud issue:
i try to move ownership from one to other user:
both users has logged in to web access
i do the following from command line
sudo -u www-data php occ files:transfer-ownership "source-user" "destination-user

The target user is not ready to accept files. The user has at least to be logged in once.

What is wrong here?
Assume you have a directory and you share this with group or user/s.
is it possible to create a folder in this directory and change only sharing for this folder to hide from group?
linke L/Unix permission start directory has permission 777 and som folder in this directory has 700 or 770, ... like that
Whats the best way to encrypt partitions in Ubuntu 16.04 after the OS is installed>?
I have an Ubuntu server (18.04) running a copy of WordPress that I'm trying to access from outside my home network. I have port forwarding set up on the router and can access Apache quite happily. However, putting in the URL // results in my browser displaying the internal address of the server and, naturally enough, failing to connect. I'm pretty certain that there's something fairly simple that I'm missing. Allied to this is that I can't SFTP into the server from outside either. the connection is made but always fails with the password. Of course it all works fine on the LAN. Can anyone enlighten me as to what I'm doing wrong?

i using ifupdown for ubuntu 18 server
after reboot i can't login to server (virtual)
ping gateway is unreachable but all my lxd on this host is up and reachable.
ping of the server is unreachable
on my ubuntu 18 (lxd) i need to open port 389 for ldap
i used command ufw allow 389
and check firewall the port is open.
from remote i connect telnet "my_server_ip" 389
connection refused
i stop firewall in in "my_server"
and try from remote : telnet "my_server_ip" 389 : still connection refused
(port 23 for telnet is open) what is wrong.
from server self telnet "server_name" 389 is working

from remote
nmap "my_server_ip" -Pn 389

Nmap scan report for 389 (
Host is up.
All 1000 scanned ports on 389 ( are filtered

Nmap done: 2 IP addresses (2 hosts up) scanned in 4.19 seconds

but nmap "my_server_ip" -P 389

show all open port and 389 is not there.
Failed to open a session for the virtual machine Ubuntu.

Call to VidMessageSlotMap failed: Last=0xc000000d/87 (VERR_NEM_VM_CREATE_FAILED).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
When I reinstall Ubuntu I was going to move my SSH Keys to that machine.

They are GPG encrypted and stored on a USB Drive that is Luks encrypted.

When I reinstall Ubuntu can I just decrypt id_rsa and and move them into


Open in new window

Hello I've got an Ubuntu 16.04 server that I've installed AIDE on.  I've confirmed that it installed and is running with the following command

sudo apt list aide

Listing... Done
aide/now 0.16~a2.git20130520-3 amd64 [installed,local]

However there isn't an AIDE directory in /etc so there is no aide.conf file either.  Does something else need to be done?
Sometime's when logging into our Ubuntu server we get "Signature not found in user keyring" other times we don't.  Does this pose any kind of security issue, or any other issues?
Ive got a server running Nagios, and I want to post its logs onto another site. Ive been trying to figure out a way I can post the results by modifying the code, but it seems not to be a great idea with updates, then I thought I could monitor more log files, so it wouldnt be great to modify each program to do it.

So, my next idea was to monitor the log file, and post the results. I can use the command:-
sudo less +F  /var/log/nagios/nagios.log

Open in new window

But it echos out onto the main console. Is it possible to post the changes to the log file to a webpage using a curl script?

Thank you
Using Wordpress on a LAN (ip range 10.0.0.x/8) on Ubuntu 18.04. I'm trying to upload a plugin but keep getting a message that I can't because it exceeds the 2Mb file size limit as set in php.ini. What I've done up to now is to edit the htaccess file (it needed creating), the php.ini file (also needed creating) and the wp-config.php file. All the files are owned by the administrator user and have the appropriate rights - I think. chmod 777 applied across the lot. However phpinfo,php still reports the max file upload size as 2Mb, the file attached has the details outlined above. Is there anywhere else this value is being set? I've grep'ed the entire site and can't find a relevant response, it's mentioned but only as a reference.
I have Ubuntu 18.04 LTS (64-bit) laptop.  I need to study USB Host implementation in linux distribution installed in my linux laptop?  Is it possible to open USB source code in vim editor?
I have Ubuntu 18.04 LTS (64-bit) laptop. Did I setup my root account properly?  When I login to my 'root' account, I cannot view contents of my home directory?  I cannot access /root directory?
su root
What does it mean in Ubuntu after entering command in terminal, no output just blinking cursor?  I'm trying to find directories that don't have a valid group owner using the following command  sudo find / -nogroup

Probably an obvious one but for the life of me I can't seem to find the right syntax for the lvextend command under ubuntu 16.04.6:
someadmin@tableau-sx-01:/dev$ sudo pvs
  PV         VG               Fmt  Attr PSize  PFree
  /dev/sda5  tableau-sx-01-vg lvm2 a--  59.28g 10.02g
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE /dev/sda5
  Path required for Logical Volume "–rl".
  Please provide a volume group name
  Run `lvextend --help' for more information.
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE /dev/sda5 tableau-sx-01-vg
  Path required for Logical Volume "–rl".
  Please provide a volume group name
  Run `lvextend --help' for more information.
someadmin@tableau-sx-01:/dev$ sudo lvextend –rl +100%FREE tableau-sx-01-vg /dev/sda5 
  Path required for Logical Volume "–rl".
  Please provide a volume group name
  Run `lvextend --help' for more information.

Open in new window

As you have guessed I am trying to resize /dev/sda5

What is the "correct" syntax ?
I have Ubuntu 18.04 LTS (64-bit) laptop.  Was it shipped with anti-virus software?  If not, what anti-virus do I need to install?

How to run full anti-virus scan?
I have an Ubuntu server running 10.04.6 LTS.  It is providing web services.  I have setup sftp and given permission to an 'sftp' group to login but have set their root directory to be /var/www/html.  They are able to connect to the server but cannot write to the folder.  I use setfacl to give the group write permission.  If they are already logged in, they can now create folders and files.  However, once they logout, they can no longer login.   If I remove the acl, the condition reverses again.  It is not limited to acls though.  I even tried just giving 'other' write-access.  Same thing happened.

sshd_config snippet:
Match group sftp
ChrootDirectory /var/www/html
X11Forwarding no
ForceCOmmand internal-sftp

Error when trying to write:
Permission denied.
Error code: 3
Error message from server: Permission denied

Error when trying to login (from session log):
! 2019-12-11 08:23:42.538 Using username "ddinkin".
. 2019-12-11 08:23:42.569 Server offered these authentication methods: publickey,password
. 2019-12-11 08:23:42.569 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2019-12-11 08:23:44.955 Sent password
. 2019-12-11 08:23:44.963 Access granted
. 2019-12-11 08:23:44.963 Opening session as main channel
. 2019-12-11 08:23:45.127 Network error: Software caused connection abort
* 2019-12-11 08:23:45.181 (EFatal) Network error: Software caused connection abort
* 2019-12-11 08:23:45.181 Authentication log (see session log for …
i upload a folder to nextcloud on ubuntu (lxd)(just drop folder in webpage) all file is uploaded except for .files (hiden file).
How to upload hiden file where is it to accept which file extension is ok to upload. (i want to accept all type files).
Hi all i am currently going made trying to move my python project to a linux server,
1. i have got the mysql  database one there
2. i am trying to install all on the modules but having some issues i am trying  to get pip3 install parse , it tells me it works but it still comes up with a error when i run the python
3. i tried sudo pip3 install urllib
Collecting urllib
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/", line 215, in main
    status =, args)
  File "/usr/lib/python3/dist-packages/pip/commands/", line 353, in run
  File "/usr/lib/python3/dist-packages/pip/", line 749, in build
  File "/usr/lib/python3/dist-packages/pip/req/", line 380, in prepare_files
  File "/usr/lib/python3/dist-packages/pip/req/", line 554, in _prepare_file
  File "/usr/lib/python3/dist-packages/pip/req/", line 278, in populate_link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/", line 465, in find_requirement
    all_candidates = self.find_all_candidates(
  File "/usr/lib/python3/dist-packages/pip/", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File …

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.