Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
-2
votes
4answers
478 views

Split echo's output on two lines

It is written in the manual that /n will split the output of echo command to the next line. I tried: echo -e 'hello /n world' hello /n world Expecting 'world' on the next line. I failed.
-2
votes
4answers
30k views

permission denied while making a file without asking for password

I'm trying to create a file using cat > list but each time it shows me "Permission denied". xyz@jaishreeram:/home$ sudo cat > list bash: l: Permission denied xyz@jaishreeram:/home$ sudo cat >...
-2
votes
4answers
699 views

Read number of lines containing a particular string

I have this file: adaptec.mib,sCSISmart1,.1.3.6.1.4.1.795.2.5.0.101,CRITICAL, adaptec.mib,sCSISmart2,.1.3.6.1.4.1.795.2.5.0.102,INFORMATIONAL, adaptec.mib,sCSISmart3,.1.3.6.1.4.1.795.2.5.0.107,...
-2
votes
4answers
267 views

When are command options prefixed with two hyphens `--`? [duplicate]

What are the general rules for knowing when command options are prefixed by -- as opposed to -? Edit: An answer referencing a canonical source, such as steeldriver's is preferred. One suggested ...
-2
votes
3answers
528 views

what are the system monitor applications avaliable? [closed]

May I know what are the system monitor applications available in Ubuntu (GUI/CLI)?
-2
votes
4answers
1k views

ls command - switch the output rows to columns [closed]

Is there any way possible to change output of ls? Normally ls displays something like this: something something1 something2 something3 something4 something5 something6 something7 and I want it to ...
-2
votes
1answer
1k views

gfortran: no input files

When I was trying to run gfortran in a terminal, I got the error below: $ gfortran gfortran: fatal error: no input files compilation terminated. Why is this happening? What am I doing wrong?
-2
votes
1answer
4k views

Running python module in gedit embedded terminal [closed]

I'm new to python and i'm trying to run my first module but i can't do that through gedit embedded terminal the code i wrote is def num(b): print("Give A Number") b = b +5 print(b) I ...
-2
votes
1answer
67 views

where does the file saved after you create it in terminal?

I created a script that create a file with the command touch in which directory the file saved? The script is: #!/bin/sh touch abc.txt
-2
votes
2answers
507 views

Adding execute permission in opt folder [duplicate]

I am trying to install oracle database in Ubuntu 16.04 LTS. I had unzipped the oracle database file in opt folder,but now when I am trying to give execute right to the sqldeveloper file using chmod +x ...
-2
votes
1answer
2k views

How to stop error messages appearing in terminal when running programs? [closed]

Lots of Ubuntu programs write error messages all over the terminal. This has been happening for as long as I can remember. If these are bugs like the messages say, why don't they ever get fixed? ...
-2
votes
1answer
2k views

bash: cd: desktop/android: No such file or directory [duplicate]

I am trying to flash 4.4.3 to my Nexus 5. When I enter this cd desktop/android I get this: bash: cd: desktop/android: No such file or directory I am looking right at the folder on my desktop ...
-2
votes
2answers
994 views

How to write zeros in one pass to free space on FAT32 drive? [duplicate]

Most people will think either using dd or sfill to usually wipe free space with zeros... however, the limit with FAT32 drives are that the largest file size can only be 4 GB. How can I create ...
-2
votes
1answer
138 views

What does “sudo apt install” do? (no package name next to it)

Okay so, I just randomly typed in the terminal sudo apt install and hit enter (I was bored, okay) expecting it to tell me that I need to enter a package name to install something. After that the PC ...
-2
votes
1answer
15k views

cp: target … is not a directory - why does this happen? [closed]

alan:~/LIME_SRC/soapySDR$ mkdir mybuild alan:~/LIME_SRC/soapySDR$ cd mybuild alan:~/LIME_SRC/soapySDR/mybuild$ cp /LIME_SRC/soapySDR/name "CMakeLists.txt" /LIME_SRC/soapySDR/mybuild cp: target '/...
-2
votes
2answers
72 views

change multiple file name with script and use the previous names

I want to change multiple file names with their previous names using a script, for example change file names as below: 2015-08-25___LSA_SP_E_txt ---> 20150825.IT.SPE.LSA.txt 2015-08-...
-2
votes
1answer
39 views

What is the solution of following command?

sudo modprobe -r psmouse sudo modprobe psmouse proto=imps I accidentally gave the above command in terminal that results in disabling of two finger scroll. Also cursor is not moving as it used to, ...
-2
votes
3answers
6k views

Help adding directory to PATH environment variable in Ubuntu 16.04

How do I add "/home/me/pycharm-edu-4.0/bin/" to my PATH environment variable? I've tried what's in How to set $PATH in Ubuntu and What is the PATH environment variable and how do I add to it? but I ...
-2
votes
1answer
297 views

Why does my terminal look like this?

When I maximize the terminal, the display becomes like this and text won't expand to entire screen. All the content/text is only visible on top left side of the window while it's maximized. All the ...
-2
votes
2answers
156 views

Command to list only output files of gcc operation? [closed]

I have a directory with many c programs and some other files. After performing gcc -o output_name filename.c on c files i have respective output files in the same folder. What terminal command and ...
-2
votes
1answer
551 views

Why do we have to call `sudo apt-get update` more than once for Ubuntu? [duplicate]

I sometimes see update commands for Ubuntu which make it twice as this sample sudo apt-get update && sudo apt-get upgrade I wonder why do we have to call it twice like that? Why not just ...
-2
votes
2answers
59 views

How to I start ranger directly from my file manager? [closed]

How do I make ranger start directly from my file manager, instead of first opening the terminal and then starting the application? I have written this below code in my .desktop file: #!/bin/bash [...
-2
votes
1answer
3k views

syntax error near unexpected token `newline' in .bashrc [closed]

I'm trying to add script function proxyset() { proxy_enabled=true NO_PROXY_DOMAINS=".abc.com," LOCAL_ADDRESSES="localhost" USER=<USER_ID> PASSWORD=<...
-2
votes
1answer
123 views

Why does `//` only display for first level directories? [duplicate]

For the root directory a // will display in the prompt: ─────────────────────────────────────────────────────────────────────────────── rick@alien:~$ cd / ─────────────────────────────────────────────...
-2
votes
3answers
737 views

How to login to a website from another system through ssh [closed]

I'm new at this system. In my University to access the internet, we need to login to the server using our LDAP id. As in the link: We will automatically get signed out after a particular time. I ...
-2
votes
3answers
103 views

Another “launch program from terminal” question

Answers from previous question are not working for me. When I type: simplenote ./simplenote ./simplenote-1.0.8 /home/quazipseudo/Desktop/simplenote-1.0.8 ./home/quazipseudo/Desktop/simplenote-1.0.8 ...
-2
votes
2answers
11k views

Using APT on Android Termux (terminal emulator) to install Ubuntu packages? [closed]

The Android termimal emulator, Termux, includes APT, but I am not able to install many packages with it. Mostly, I get: E: Unable to locate package (name of packages) I wonder if I can use termux or ...
-2
votes
1answer
10k views

apt-get update and apt-get install update [duplicate]

What is difference between apt-get install update and apt-get update? Also apt-get install update not working for me, don't know why. output of apt-get install update Reading package lists... Done ...
-2
votes
1answer
634 views

When I use the xdg-open command on a particular file it gives me > on the next line

I am opening a program with the command xdg-open file. I use this command a lot so I don't think this is a typing error. When I try to open this file it just gives me > on the next line and no ...
-2
votes
1answer
695 views

How to supply password through command while performing SSH login? [closed]

I want to perform SSH login to a machine by directly supplying password through the command line like the way we do for executing sudo commands as shown below: echo mypass | sudo -S sh -c 'echo "...
-2
votes
1answer
2k views

What xargs does exactly?

I don't understand exactly what xargs does that's why I'm surprised why these 2 return different results: find ~/Downloads -iname *btsync* | ls -al find ~/Downloads -iname *btsync* | xargs ls -al ...
-2
votes
2answers
46 views

Want to understand this permission of /usr/bin/sudo

I was getting below error while running command sudo -s after changing the permission to 777 of /usr/bin/sudo sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set Ii solved this ...
-2
votes
1answer
45 views

Copy files such that individual files gets copied to the folder having file name as a string within complete folder name [closed]

I am using Cygwin as Linux shell, I have following contents in my current working directory: Files : Abc.dat 123.dat 456.dat Directories: W_Abc_w W_123_w W_456_w Now I want to copy files as ...
-2
votes
1answer
131 views

What does -y mean in an apt-get upgrade command, and where can I find a reference on command flags? [duplicate]

I have seen commands like this: sudo apt-get upgrade -y I would like to know the meaning of the -y flag and a reference for Linux command line flags in general.
-2
votes
2answers
249 views

How can I start a video from terminal [closed]

I've been trying to make an executable file that maxes the volume of a person's computer then opens and plays a specific video, but I don't have a command to play the video after it has opened, so the ...
-2
votes
1answer
92 views

problem when the file upload to github repository [closed]

usually i can push my file or folder to github repository , but usually I often upload in excess may be 5 to 8 times the upload in a day
-2
votes
1answer
71 views

How I can verify the domain syntax in a file?

I have tried the script to store the domains with proper syntax. But I didn't got the proper output. Here is what I did and what I got and also this command got stuck: while read -r url; do ...
-2
votes
1answer
148 views

is there a terminal to practice Python language on?

I was hovering on ubuntu software terminal emulator section and saw many terminal apps, which basically i have no idea about the differences ( doesn't matter) but I wonder if there is such a terminal ...
-2
votes
1answer
53 views

Extract specific mimetype in shell [closed]

How can I extract from tar archive just text and executable files? Can I do this somehow with wildcards?
-2
votes
1answer
60 views

Scripting a script that tests a shell [closed]

I have a custom shell and want to test its arithmetic function. I wrote a script to test it and it performs the arithmetic but it is also trying to execute the result as a program. printf "******...
-2
votes
1answer
160 views

I want to install vim but the following error appears [closed]

checking for tgetent()... configure: error: NOT FOUND! You need to install a terminal library; for example ncurses. Or specify the name of the library with --with-tlib.
-2
votes
2answers
102 views

Joining 2 files and comparing them [closed]

I have two files where I want to use something like a left join that is used in SQL. File1: column1 column2 column3 column4 Ab Cd 100 Us Ef Gh 200 Us File2: ...
-2
votes
2answers
1k views

Write a shell script that asks a user for the absolute path to a directory,

Write a shell script that asks a user for the absolute path to a directory, the script should test to see if the directory exists. If it does ls -l the directory. If not tell the user that the ...
-2
votes
1answer
2k views

How can I shutdown multiple systems using terminal?

How can I shutdown multiple systems using the terminal? Also, is it possible to send a message to multiple computers before shutting them down? I cannot login to them via SSH, but all the computers ...
-2
votes
1answer
1k views

Adding Scala to `PATH` in Zsh

I have downloaded Scala to ~/bin for easy access on my machine; but I seem to have some difficulty adding it to the PATH. On my MacBook I simply added the following to ~/.profile and everything just ...
-2
votes
2answers
1k views

program to access files on internal hard drive, windows [closed]

I would like a script that will rename the file Utilman.exe in Windows/System32 to NotUtilman.exe and renames cmd.exe to Utilman.exe . I am not asking for the full script, I am new (-ish) to Ubuntu, ...
-2
votes
3answers
59 views

Can anyone tell me how can this be achieved? [closed]

Prompting a yes no interface to user so as to re-execute a block of code.lets assume that block of code is echo "Hello"
-2
votes
1answer
91 views

i wanna install Intel Compiler. But sudo command does not work

I write the command like this sudo ./install.sh But ubuntu says sudo: ./install.sh: command not found How can I install this program?
-2
votes
2answers
582 views

How do you create custom terminal commands [duplicate]

For instance if I wanted to type $Ctrl+Alt+Delete and it would return the same as $reboot this way when editing custom taskbar launchers we can execute key commands via terminal. Would I write a ...
-2
votes
1answer
806 views

How to absalutely fully change terminal prompt to color

its mind bogglingly supprising how hard it is to TOTALLY change terminal prompt graphic featurs.... Like PS1 Or in my case color features.... I have edited /etc/bash.bashrc and ~/.bashrc and /root/....