Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (6)

0
votes
0answers
25 views

what is the diffrence b/w “remove write-protected directory” & “descend into write-protected directory”?

am new to linux world, am practising basic commands, i tried to use rm command to remove directory/folder from current directory which was /, without providing super user permission or sudo. it says ...
0
votes
2answers
47 views

How to display the group-memberships for every user of the system?

I need a command that displays the system’s users and groups from /etc/passwd and /etc/group. For each user I want to display the username, UID and all groups the user is a member of. I tried cat ...
3
votes
2answers
31 views

What's the difference between the keyboard shortcut commands and bash ones?

When I type in a terminal : gnome-screenshot -a -f /home/manuel/Desktop/"`date`".png I have the intended result, a file named "dimanche 10 avril 2016, 23:36:50 (UTC+0200).png" is created. However, ...
1
vote
3answers
202 views

How to squash all the contents of a multi-line file onto one line?

I have a file with many thousands (possibly even millions) of lines, however I need all of the contents to be on one line and all spaces removed (there shouldn't be any spaces there, but there might ...
2
votes
5answers
150 views

How to exclude one specific file from being hashed through bash script

I actually try to run recursive through a folder structure and make md5sum on all files into a single md5checksums file. Heres my script: #!/bin/bash rm -f md5checksums find -type f -exec md5sum ...
2
votes
1answer
50 views

How to switch between input-source modes through Terminal?

I have looked at the answers to the question How do I change keyboards from the command line?, however I have found that even though they indicate how to switch input-sources through Terminal, they do ...
0
votes
2answers
43 views

Trouble with Shell Script cat | grep

#!/bin/bash mylanip=$(hostname -I | awk '{print $1}') touch /opt/portmapper/0prelims echo `java -jar /opt/portmapper/portmapper.jar -list | grep $mylanip > /opt/portmapper/0prelims` # HTTPS ...
0
votes
0answers
9 views

Can't update from terminal [duplicate]

I'm trying to update my computer from the terminal with: sudo apt-get update I get the following output: E: Malformed line 1 in source list /etc/apt/sources.list.d/virtualbox.list (dist) E: The ...
0
votes
1answer
44 views

Excecutable file command not found

I have been trying to install a tool called MetaACE. I have included the command line below. deebak@ubuntu:~$ cd Downloads/MetaACE_LTD deebak@ubuntu:~/Downloads/MetaACE_LTD$ bash ...
0
votes
0answers
32 views

Record Live Stream on Ubuntu 14.04 LTS

Does anyone know how to record a live stream, specifically, the .swf format? The problem between this and traditional streams is that this is LIVE, and the .swf file is never hosted in full (to the ...
0
votes
1answer
197 views

How can I use abcde to rip to mp3 and embed album art under Trusty?

The version of abcde (the audio cd commandline ripper) under Trusty does not do what I would like: Rip audio cds to mp3 Download and then embed the appropriate album art Can someone show me a ...
1
vote
1answer
55 views

How can I reset ubuntu gnome terminal options?

I have Ubuntu gnome on my laptop and in my terminal all the text is green. However, on another computer my text is green but the bold text is a different color. I already changed the bold text on my ...
-2
votes
0answers
48 views

Warnings while running graphical apps as root

I would like to know which is the recommend way of running GUI applications as root, mainly because what I'm trying isn't running smoothly. I get some annoying warnings that makes me think whether I'm ...
1
vote
2answers
45 views

Does the terminal learn common typos? [duplicate]

This may seem like a stupid question. I'm using Ubuntu 15.10 with GNOME Terminal 3.16.2. When I was new to the system, I often typed 'l' or 'la' instead of 'ls' to list files, and would then be told ...
1
vote
1answer
49 views

Can I re-open a terminal session? [closed]

When I play mulit-player Minecraft, with my family, I use an external server. Everyone once in a while the session drops in my local PC. I can re-open a new terminal and log back into the server. I ...
0
votes
2answers
48 views

How do I highlight a word or a phrase in a command's output?

For example i enter lshw for listing hardware modules; when I hit enter, it gives me a long list of output, but what if I want to highlight one word or phrase in the output?
0
votes
0answers
24 views

Where is stddef.h in Linux?

where is stddef.h in Linux?I use order that locate stddef.h to find the file. But when I open the file,it is empty.I want to know why and where is stddef.h in Linux.Thanks.
0
votes
0answers
34 views

Unexpected problems running GUI applications as root [duplicate]

I would like to know which is the recommend way of running GUI applications as root, mainly because what I'm trying isn't running smoothly. I get some annoying warnings that makes me think whether I'm ...
0
votes
3answers
51 views

What is the correct order for placing flags and parameters in a CLI program [closed]

I have noticed that some programs work differently when the flags are used before the input parameters, rather than adding the flags at the end. So I want to know, what is the conventionally accepted ...
1
vote
1answer
30 views

How to disable the shortcut for New Profile in command line (Terminal)

I was playing around terminal and I came across Terminal Preference. Under that there is a tab called Shortcut where I accidentally enabled shortcut for New Profile as Q. Now whenever I press Q on ...
1
vote
0answers
29 views

script command failing

I am trying to use script command in my script to record my session. But whenever I start it, it gets terminated at the same instant. home@ubuntu-box:~$ script /tmp/myfile.txt Script started, file ...
0
votes
0answers
14 views

GNU GRUB Command Loop! [duplicate]

I need help, im currently on a loop on GNU GRUB command. Ive seen many articles on it but non have help. So i removed ubuntu's space in the Disk Mangment...then I removed the Ubuntu pen drive and ...
-3
votes
0answers
36 views

no wlan0 and no interface on airmon-ng

I am new to linux and terminal. I don't know linux terminal basic behavior. I have backtrack 5 r3 installed on vmware workstation 12 player. I want to install compat wireless driver because there is ...
3
votes
1answer
31 views

Coloring all output from terminal

Is there a way to make all the output of my terminal colored in a personalized way? e.g: If I issue the command: sudo apt-get update - I will get a column of text and what I want is a way to colorize ...
2
votes
1answer
39 views

How do I use variables and non-variables in a single sed command?

I'm trying to use sed to replace some PHP lines. My problem is I want to replace a line with PHP variables with a string including a Bash variable. Here is an example: sudo sed -i 's/$sUrl . ...
1
vote
1answer
31 views

Add winetricks registry key by command line

In some special cases, I have to add a registry key to wine. Is it possible to do so using the command line, and how? Here are the steps I do from GUI: wine regedit On the left, open ...
0
votes
0answers
27 views

Reenter password for pam_mount (Ubuntu 14.04)

I am trying to install pgadmin3 on ubuntu 14.04. By running the following command: sudo apt-get install postgresql 9.5 pgadmin3 While it is proccessing I get this: reenter password for ...
0
votes
0answers
26 views

Block CTRL+ALT+F7 from the local TTY terminal

So I know the: Section "ServerFlags" Option "DontVTSwitch" "true" EndSection But I want something that blocks me from doing Ctrl+Alt+F7 from the TTY (F1-6) forcing users to use sudo chvt to get ...
0
votes
1answer
58 views

gsettings - change privacy settings via command line

I know how to change privacy settings via GUI (System Settings > Security & Privacy), but I'd like to be able to do it from command line. What I did to find out I ran the command: dconf watch ...
0
votes
1answer
46 views

Ubuntu won't run after restart ( image attached )

I downloaded ubuntu 15.10 and erased disk and installed it. Afterwards I ran update and upgrade commands for latest versions and that's it. I have not updated drivers nor anything else. Afterwards I ...
1
vote
2answers
110 views

Upgrading from 10.04 to 16.04 [duplicate]

I have Ubuntu 10.04 and I want to install 16.04. I have created a USB using a lot of programs, even the one came with the distro; when I try to install 16.04 the monitor shows all it is supposed to ...
0
votes
1answer
76 views

Why is the Ubuntu-for-Windows default shell a root shell? [closed]

From day one of using Linux we are told that running as root is extremely dangerous. Here we are though on day one of introducing Linux to a wider audience by enabling it in Windows 10 we provide the ...
0
votes
0answers
16 views

Guake won't display UTF-8 after forced reboot

That's basically it. Sometimes after having to force a reboot Guake won't show any UTF-8 characters. This is especially noticeable since I'm using powerline with a patched font. output from dpkg -l | ...
3
votes
4answers
688 views

Why doesn't ls combined with awk show exact sizes?

I am trying to find the size of the files on my hard drive in exact bytes, but whenever the size gets too big the number turns all weird (like 1.98329e+12). Can I stop it from doing this or convert ...
2
votes
1answer
40 views

How to save the command line output to a file IN REALTIME

I have made a bash script that is designed to backup my PC every night around 4 o'clock. After the backup has finished, my system goes back into sleep. Currently I am using | tee -a $LOGFILE to log ...
-1
votes
1answer
31 views

How to run a command on remote host from a service? [closed]

I have a service in '/etc/init.d'. In that service, I run a command on a remote machine using ssh as a user. Currently I do this in the following way: sudo -u user bash -c "ssh user@172.21.6.70 ...
0
votes
1answer
37 views

sift command not working Ubuntu version 14.04

I'm using the siftDemoV4 for a sift program, but I cannot get the 'sift' command line argument working.Whenever I use the argument: sift <Large.pgm> resultsfile.key It instead asks me this: ...
0
votes
2answers
38 views

searching a file [duplicate]

I want to find in the system a file, and I know part name of it. How could I do that? I tried unsuccessfully the command: find / "*partname*" The problem is probably very easy however I cannot find ...
0
votes
1answer
31 views

Password protection for command-line suspension

I found out how to suspend via command line, namely by sudo pm-suspend. What I miss there is that when the machine wakes back up, the sessions (all of them running in different tty's) are not ...
2
votes
3answers
242 views

String replacement with iterator

I have a file with a character I would like to replace, but I also want to have each instance of the character(s) to be replaced, be iterated with a number inside the sting replacement. SomeFile.txt ...
0
votes
3answers
51 views

Shortcuts to SSH clients

I have many remote machines I need to log in. I need somehow store connection parameters because it is too boring enter them manually. Also I prefer to store password in these shortcuts. Software ...
2
votes
4answers
156 views

How do I join two CSV files but only where 2nd file matches?

I have 2 CSV files: Objects File: IP,MASK,DESCRIPTION 10.10.3.94,255.255.255.255,Rob 10.10.3.95,255.255.255.255,Mark 10.10.3.96,255.255.255.255,John Services File: DESCRIPTION,OrgIP,Service ...
-1
votes
0answers
22 views

What is bash or shell ? Are they interchangeable words? [duplicate]

I am a newbie to Linux environment. By searching tutorials, too many time i heard or saw a bash and some times shell. Are they the same?
0
votes
1answer
23 views

Add output of script to file after it has run

I run a script: python my_script.py. It outputs a bunch of lines in the terminal. I forgot to use the output command: python my_script.py > file.txt. Is it possible to get the recent output to the ...
1
vote
3answers
55 views

How to get current or set wanted regional format in the terminal?

I'm looking for single line terminal commands to: check my current regional format or set the regional format to English US. Currently to change this I have to go to Settings->Language ...
0
votes
2answers
53 views

Improving bash script

I need to improve this script: nmap -PN -p 9292 -sN 192.68.12.14 | grep "open" I need to check connectivity to ip 192.168.15.24 on port 9292. If the port is open, then print "port 9292 is open" ...
1
vote
2answers
45 views

If command to look at specific lines and value in files

I imagine this is a very simple one but I'm really new to Ubuntu. I basically want to command ubuntu to look through files with a certain suffix (QC.fastq.log) and to then look at a value on line 3 in ...
2
votes
2answers
32 views

how to calculate script run time [duplicate]

Consider this shell redirect: telnet towel.blinkenlights.nl >> starWarz when it ends, the session will break, detach from host or something like that. I want to know how long the connection ...
0
votes
1answer
29 views

i need to write a bash script to check a service status and restart

i need to write a bash script to check a service status. I need to look in the command output; /etc/init.d/ipsec status The line "1 tunnels up" indicates the service is up. If the line is not part ...
1
vote
2answers
211 views

Crop a string using sed

I have a command that outputs me a list with the following pattern exp_70_T8_s1 exp_71_T8_s5 exp_72_T8_s10 exp_73_T10_s1 exp_74_T10_s5 exp_75_T10_s10 ... How can I get the numbers after "_T" and ...