We help IT Professionals succeed at work.

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.

I've built an Ubuntu server (Ubuntu version 18.04.4) and I need to share files on that server to an Ubuntu client.  (read-only)

Can you please point me to a good procedure to get that going?  I used to be a Unix system admin years ago.  But linux is a bit new to me.

I have python code doesn't working on my ubuntu 16 what is the problem, is there any change I can do to run the code on my ubuntu 16

from Crypto.Cipher import AES

# inputs
text = "This is a top secret."
enc = "764aa26b55a4da654df6b19e4bce00f4ed05e09346fb0e762583cb7da2ac93a2"
iv = "aabbccddeeff00998877665544332211"

# changing string type to bytes
dec_iv = bytes.fromhex(iv)

# padding text with ascii 11
while (len(text) % 16 != 0):
    text = text + chr(11)

# scanning all the keys
f = open("words.txt", "r")
lines = f.read().splitlines()

# Iterating over all the keys
for key in lines:
    word = key
    # ignore if key length is greater than 16
    if len(word) > 16:
    # padding the key with '#'
    while (len(word) % 16) != 0:
        word += "#"

    # encrypt and check whether it matches or not
    temp_enc = AES.new(str.encode(word), AES.MODE_CBC, dec_iv).encrypt(text)
    print(key, temp_enc.hex())
    if temp_enc.hex() == enc:
        print("Bingo! Match found")
        print("key:", key)

Open in new window

Running out of space on /dev/sda1 in Ubuntu 14.  Can someone share the command to move space from /sda5 to sda1?   The attached image is the current configuration. This server runs on vCenter.   Thank you.
How can I install Ubuntu on a USB stick so it retains my settings and software, such as Adobe Flash Player?
onlyoffice issue:
i have nextcloud 17 on ubuntu 18 and onyoffice on it. all document id empty because of i have error on ds:docservice: ERROR (spawn error)
ds:converter: ERROR (spawn error)
what is wrong. reccently i just update and upgrade my ubuntu.

How to mount from lxd ubuntu server to other ubuntu host (not in lxd)?

from ubunto to lxd is adding to config file via lxc

how to do it revers issue from lxd to som host(ubuntu host)?
Suddenly, my monitor has started flickering.   I have an nVidia GeForce GTX 1050Ti connected to an Asus PA328 monitor Display Port.   I am running Windows 10 Pro 64 bit.   Suddenly, my display has started flickering.   I had tried Ubuntu without installing it, and that seems to be when the flickering started in Windows.   I do not know if there is a connection.
I have an onlyoffice on nextcloud on ubuntu.
How to add extra font for onlyoffice?
Documentation says add font on /usr/share/font and /usr/bin/documentserver-generate-allfonts.sh and clean cache.
is some one has tried this. i can't see the last .sh file reading somthing from /usr/share/..

Hi all,

We have squid proxy server on Ubuntu 16.04 in our company and use Cisco ASA redirects the Internet traffic through wccp tunnel. We planed to upgrade the Ubuntu to 18.04 recently.

I setup the new proxy server on Ubuntu 18.04 in a test environment, but the wccp didn't work.

Here are the configurations and some troubleshooting steps I have taken:

### Squid config
acl localnet src  # RFC 1122 "this" network (LAN)
acl localnet src             # RFC 1918 local private network (LAN)
acl localnet src          # RFC 6598 shared address space (CGN)
acl localnet src         # RFC 3927 link-local (directly plugged) machines
acl localnet src          # RFC 1918 local private network (LAN)
acl localnet src         # RFC 1918 local private network (LAN)
acl localnet src fc00::/7               # RFC 4193 local private network range
acl localnet src fe80::/10              # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # …
after my difficulties getting simon installed, i looked for alternatives.  has anyone ever used deepspeech?  i'm trying very hard to find  a ubuntu alternative to dragon naturally speaking.  DNS seems good  for windows but i get frustrated with the windows updates.  i used mint also which seems very good.  I've heard of, but never tried, raspberry pi.  pretty much i would  like a very good speech to text program in linux.  i'm tired of typing so slowly with my left index finger.  I lose my train of thought in mid sentence.  it is understandably difficult for you to figure out my question.
I have nextcloud version 17. on ubuntu 18 (lxd).
I have integrated only office on nextclod.
When customer try to open a word (or excel ...) the program is opening on same windows browser as nextcloud. is it possible to open it to new tab or new window?
Because at that moment is not possible to see nextcloud browser.
hi how to keep the linux session not allowed the desktop to locked
boot ko after bios _osi linux query ignored.

Hello all

I have a system that will not boot and just hang after the above message ( see attached photograph ) from an old ubuntu 14

I am pretty sure the issue is hardware since the os has multiple bootable oses and all of them hang somewhere after an acpi message. Tested with multiple linux and freebsd kernels. Not tested windows yet.

... and the laptop fell yesterday. It did work for s few hours normally afterwards and was cleanly shutdown without issues

My questions are

Do you happen to know what is the next step in the boot sequence ? I suspect loading graphic drivers but i am unsure and a dmesg output would help.

Do you happen to know some options i can pass the kernel in order to circumvent and go on with my work till i fix this ? I tried various combinations of noapic noacpi vga... i would be more than happy with a working command line and a vesa screen

Thanks for your time
The issue is strait forward.  On Ubuntu 18.04 I have deleted reolve.conf from the /ETC dir.  Resolv.conf appears to get recreated on reboot but it does not contain any DNS server entries save  This will not work, you cannot edit the file as it is symbolically linked.  How do I correct, and provide it with the correct entries.  I was trying to install Dnsmasq.  The following commands were issue

john@VBserver1:~$ sudo systemctl stop systemd-resolved
john@VBserver1:~$ sudo ls -lh /etc/resolv.conf
lrwxrwxrwx 1 root root 37 Feb 17 21:35 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
john@VBserver1:~$ sudo rm /etc/resolv.conf
john@VBserver1:~$ echo "nameserver" > /etc/resolv.conf
-bash: /etc/resolv.conf: Permission denied
john@VBserver1:~$ sudo echo "nameserver" > /etc/resolv.conf   This one is where the failure results.
-bash: /etc/resolv.conf: Permission denied
We have a slow responding web application running on a local server, it is running on MariaDB 10.4.8, PHP7.2 FPM and nginx on Ubuntu 19.04.

It doesn't look to be due to a lack of resources as far as I can see using top and looking at free memory & CPU usage. I have used iotop to look at disk usage and I think this is probably OK as far as I can see.

Can anybody help me find a solution to our slow application performance or at least point me in the right direction to diagnosing the problem? I have attached a couple of screen grabs of TOP and IOTOP for reference.

This is driving me a bit nuts and would really appreciate any help!

Many Thanks,
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 //xxx.ddns.net/wordpress 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

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.