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

Ubuntu freezes and shuts down laptop when writing to c drive.

this same command runs fine on one laptop but crashes on another....

user@DESKTOP-NNT86U6:/mnt/c/unix$ sed 's/[^,]*/"&"/g' test2.csv > testx.csv
0
OWASP: Threats Fundamentals
LVL 12
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

grep "testing" 789.log

zgrep "testing"  123.gz

i like to redirect above production server output to
abc/def/test.txt file which is on some other system test server where i have access

how to do it
grep "testing" 789.log >> abc/def/test.txt
above gives error no such directory as that directory is not there in production server

grep "testing" 789.log
how above different from
grep -C2 "testing" 789.log

i see below time stamp lines came 3 of them when i use -C2
2019-Jan-17 04:50:51.198 EST

i see below time stamp lines came 3 of them when i did not use -C2
2019-Jan-17 04:50:51.198 EST

please advise
WithC2.png
WithoutC2.png
0
when i do ls -ltr i see bunch of .gz files says 123.gz and 456.gz
and bunch of no gz files say 789.log etc

how to grep on say "testing" on both zip gz files and non zip files

grep "testing" 789.log

zgrep "testing"  123.gz

not sure how to combine above two together

also how search today log between 10 am to 11 am for that "testing" word in log?
please advise
0
SYSTEM
Ubuntu Linux 16.04
Android Phone

BACKGROUND
We are on the floor of a convention and trying to connect our linux machine to our Android hot spot. There are too many WiFi hotspots and we cannot find the one from our phone.

QUESTION
On our Linux machine, how to find the hotspot that is being generated by our Android phone? Is there a way to search for the specific hotspot name? Is there a way to turn off the other 100 or more hotspots that are filling up the queue?
0
Hi,

I have a security related question on Linux Ubuntu.
Can we remove sudo access to root console for power users.
But still allow admin to ssh to the servers with root password.
As a security measure is it a good idea to disable root access to everyone if  connecting to servers remotely.

Thanks
0
I need to copy a file from one Ubuntu server to another.

They are two servers in the same AWS VPC and are in the same Public Subnet. They are both running Ubuntu (Ubuntu 14.04.5 LTS and Ubuntu 18.04.1 LTS, respectively).

I've opened up the Security Group for BOTH Server using Port 22. I also confirmed that openSSH is running by using this command "ps -A | grep sshd" and seeing process ID's.

I created a Text file for testing.

Here's the command I used to copy between servers:

scp ubuntu@**.*.**.***:/usr/local/thomtesttext.txt ubuntu@**.*.**.***:/usr/local/testtext.txt

Open in new window


This is the error I'm seeing:
ssh: connect to host **.*.**.*** port 22: Connection timed out

Open in new window


What am I doing wrong? How can I get an AWS Ubuntu Server to copy files between them?

Thanks for your help!
0
Have 2 ubuntu installations on Oracle VM. They are in the same version. I ran the same python script against its own ubuntu in the exactly same way. Ran well on one, but got the error on the other one below:
"ModuleNotFoundError: No module named 'x'".
I knew the one without error was installed more packages, but I did not remember which more packages were installed. Under this condition, how to troubleshoot this issue? Can any gurus shed some light to it? Thanks a lot.
Background:
ubuntu 18.04 on VirtualBox V5.2.22 in Windows 7 (2 Ubuntus installed on the same box).
0
Have a sizeable on-line application in php on Virtual Box Ubuntu and like to understand it completely. Would like to use some debug tools to know what is going on which page to corresponding to the code behind it. Can any gurus shed some light to it: recommend some tools to debug and understand the code? Thanks a lot.
0
I need to backup a Ubuntu 18.04 server. I use Storage Craft for all backups but they do not have anything that can backup that version of Linux. I need to find a product that can backup that server.

I am not a Linux tech so I would prefer something where I can install the backup agent on Linux and manage it from a Windows server. I also want it to backup the entire image of the server so I can restore it if necessary.

Can someone recommend a good product for that. Preferable one that is not expensive
0
I'm a IT / Music Composition double major.

At school we use PHP a lot.

I want to start learning Node.js and express, at least the basics to get familiar with it.

The operating system I run on my laptop is Ubuntu 18.04.

How can I run both Node and PHP on my laptop?

------
0
Amazon Web Services
LVL 12
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

VirtualBox guest in windows 10, running a 10 GB xUbuntu client. I want to increase to 20 gb. After a lot if work i got the vmdk to 20 gb. But the  "actual size"  in VirtualBox is still only 10 gb. The partition is a vmdk file. (virtual size 20.00 GB, Actual Size 9.07 GB).

No tool i can find can see the file as a partition and increase it from windows, from inside xUbuntu I have the same problem. How can i get the actual size up to 20 GB?

(no i does NOT autoincrease, its just get full)
0
I managed to run docker and install wordpress on ubuntu linux but can't seem to get the handle how I can edit the files within the dock as I get permission issues.
I think I am looking at it the wrong way about,
Could somone get me thinking the right way because  I love the performance for local development :).
(PHP ,Wordpress,MYSQL on NGINX).
0
I am running Ubuntu 14.04.5 LTS in Amazon Web Services with an Elastic IP and an inbound connection for my Static IP.

I need to simply copy files from Ubuntu (Ubuntu 14.04.5) to my local mac (running OS 10.14.2) and then copy them back, both using a Terminal window and SSH.

I've tried scp, but can't seem to get the command correct as the error I'm getting is:

"ssh: connect to host **.*.**.*.** port 22: Connection timed out" (This IP is the Elastic IP).

What am I doing wrong? Help! Thanks in advance. :-)
0
zgrep -C5 'xyz' abc.gz

i have above grep
in the results how to search on say "error code=1111 description=null pointer"


Above results too large i am not able to copy paste to notepad++ (which i usually do makes easy to to my eyes) to search on like error code=1111 description=null pointer"

zgrep -C5 'xyz' abc.gz >>/home/TestUser/testuser.txt

can we do tail or head on above?
please advise
0
Hello there,

I want to restart my java application which is running on Ubuntu 16.04 as service. But the problem I have is on Ubuntu when I want to restart my java application service, I do as follows
sudo service myapp restart

Open in new window

and then Ubuntu asks for password. Now how can I tell Ubuntu to not ask password when I send this cmd from my application.

//Restart application server
		router.get("/restartAppService").handler(ctx -> {
			/* Build command: sudo service AooService stop */
			  final ArrayList<String> command = new ArrayList<String>();
			  command.add("sudo service TutisService restart");
			  System.out.println("CMD ----"+command.toString());
			  final ProcessBuilder builder = new ProcessBuilder(command);
			  	try {
			  		builder.start();
				} catch (IOException e) {
					System.out.println("EXCEPTION WHILE RESTARTING SERVICE----"+e.getMessage());
					e.printStackTrace();
				}
			  //System.exit(0);
		});

Open in new window


Any help will be appreciated!!

cheers
Zolf
0
I'm looking to use apt-get for Ubuntu and yum for Centos to do the following as root:

1) Ubuntu: apt-get update ; apt-get -d dist-upgrade
to just download the update items for later install

2) How do I install the previously downloaded files at a different time? I was thinking apt-get -f install but can't tell if t will get all the updates. - my 2 Ubuntu systems are both up to date so I can't test this yet

3) yum for CentOS doesn't seem to have a download only option. This part of the question is not as critical.

Thanks in advance
0
Hi,

I have a NFS server on Ubuntu 16.04 LTS installed on it. The client machine has Windows Home edition , it connects to the server with ovpn which is
on another subnet,
I am unable to mount the NFS share from the client machine .
Kindly guide me how to connect to the NFS share on Ubuntu.

Thanks
0
Hello,

Does anyone have any idea how to authenticate a user against two different OUs on the same AD server?

I am using Apache 2.4 on Ubuntu 18.04.
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2018-06-07T19:43:03

The user could be in "ABC User" or "XYZ user".
AD OUs are:
AuthLDAPURL "ldap://adx.ABC.org:389/OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"
and
AuthLDAPURL "ldap://adx.ABC.org:389/OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"


Part of the current conf file:
<Location />
      AuthName "ABC Intranet"
        AuthBasicProvider ldap

        AuthType Basic
        AuthLDAPURL "ldap://adx.ABC.org:389/OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"

      # login to AD
      AuthLDAPBindDN "CN=ldap_ABCweb,OU=ABC Service Accounts,DC=ABC,DC=org"
        AuthLDAPBindPassword
        AuthLDAPGroupAttributeIsDN off
        AuthLDAPGroupAttribute memberUid

# tried this and failed
#      Require ldap-filter (&(memberOf='OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*')|(memberOf='OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))

# tried this and failed                                     
#      <RequireAny>
#        Require ldap-filter (&(memberOf='OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))
#        Require ldap-filter (&(memberOf='OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))
#       </RequireAny>

      # require any is implied
      require any
      Require valid-user
      …
0
i am using mputty to connect to unix box.

i see black screen with while log messages

i like to change to white bacground screen with black letter on top

please advise
0
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Are there instructions somewhere for setting up VPN on Ubuntu via command line?

Anyone can provide any reference please?  Thank you!!
0
MY SYSTEM
Ubuntu Linux 18.04.1

QUESTION
I need to know what is the best recommended Anti-Virus and Malware protection I can install on my Linux machine.
Please include: Free, Less Expensive, and the Best (no matter what the price), so I can make my decision.
0
We have Ubuntu 18.04.1 LTS running on a virtual machine in VMWare Workstation 12.5.7 build-5813279.

The network settings appear to be correct however every time we boot it we get the grey icon with the question mark.  We can disable the network and reenable it and everything is fixed.  Can you tell me how to fix this issue as it is rather annoying?
0
When updating composer (sudo composer update), got the error below:
"- The requested PHP extension ext-memcached * is missing from your system. Install or enable PHP's memcached extension."
Tried very hard to install "PHP extension ext-memcached", but could not get anywhere.
Background: PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS ) on oracle VirtualBox v5.2.22.

Will any gurus shed some light to it?
0
Hi Experts,

I'm looking for a simple script to collect the local time drift on Ubuntu Bionic and send it to a specific TCP port in the local system.

Any advice would be highly appreciated.

Thanks & Regards,
Sumedha
0
Hi,

I'm new to Azure and am having issues with my test Ubuntu VM - I am unable to get outbound internet access. I have been trying for a few hours to get this to work and am now completely stuck.

I have gone through the following steps:

The VM has a private IP, which is statically assigned in Azure but acquired using DHCP on the OS.
The network security group that is attached to the network interface allows outbound internet access.
There is no security group defined on the subnet.
There are no custom route tables on the subnet.
To remove DNS from the equation, I also tried to ping an IP address (8.8.8.8).

Can anyone think of something I've missed?

Thanks,
Adrian
0

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.