Skip to main content

Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

Filter by
Sorted by
Tagged with
10 votes
2 answers
2k views

No output for a "who am i" command

I've been using Ubuntu 24.04 on VirtualBox 7.0.16 on Windows 10 for only 3 days now. I've used several commands on a terminal and they worked fine. But who am i gave no response. But grep [username] /...
Kumara Senadheera's user avatar
0 votes
0 answers
93 views

How to access files on phone from command line Gnome 42.9 Ubuntu 22.04

This gvfs thing is giving me problems, and the gvfs documentation is little help. There doesn't seem to be a way to access my Moto one 5G ace, except at gnome/gvfs/nautilitis I can plug in USB drives ...
HiTechHiTouch's user avatar
3 votes
1 answer
309 views

lscpu vulnerabilities and mitigation

I recently learned about lscpu command and was excited to know the architecture information. However, there is a section at the end where it shows lots of vulnerabilities. Did some google search and ...
learner_account's user avatar
3 votes
1 answer
251 views

Sort files and folders in ascending order of size

How can I use du -h to sort the displayed files and directories in ascending order of size?
D-T's user avatar
  • 487
6 votes
1 answer
331 views

`command echo --help` invokes bash internal echo function

According to help command, the help of bash, command can be used to trigger the external program x, if x exists as a builtin function too: command: command [-pVv] command [arg ...] Execute a ...
user unknown's user avatar
  • 6,825
3 votes
1 answer
35 views

Condense multiple similar alias

I have been working on creating new alias to use at work and noticed my .csh file filling with similar alias that go to different sub-directories but everything else is the same. I am newer at ...
Michael's user avatar
  • 31
1 vote
0 answers
112 views

Installing Ubuntu on an x86 Android tablet (Lenovo Yoga tablet 2)

Yes, as the title suggests, TWRP is in Teamwin recovery project. I dug out my old x86 tablet (a Lenovo Yoga Tablet 2) the other day and wondered if Ubuntu could be installed on it. It has 16GB of SSD ...
Nick P's user avatar
  • 19
0 votes
1 answer
42 views

Can't login at terminal after purge and auto remove

I was using Ubuntu 22.04.4, I installed an app/program that didn't work but wouldn't uninstall. I ran a purge and auto remove command and when the computer rebooted, I knew I borked it! I get a ...
yeochief2002's user avatar
11 votes
4 answers
3k views

Given MAC address, how to tell if interface is wifi

Is there a way, on the command line, given a MAC address of a local network interface on the current machine (e.g. 01:23:45:67:89:ab), to determine if that interface is WiFi vs wired? I'm trying to do ...
Jason C's user avatar
  • 838
0 votes
1 answer
176 views

How to safely extend Logical Volume in production server

I have 4 LVs, type is ext4. I want to know how to safely extend them since they are all used for production. From what I know the steps are. unmount extend resize FS mount again Are these steps ...
TrealFaisal's user avatar
0 votes
1 answer
73 views

Bash script not launching correctly

Right now I am working on a project for which there is a custom conda environment. I created the environment and the project works, so I created a bash script to activate the conda environment, launch ...
Samuel Kostadinov's user avatar
1 vote
0 answers
237 views

error 2147942402 (0x80070002) when launching `ubuntu2404.exe' error while launching ubuntu in terminal windows

recently I downloaded Ubuntu- 24.04 LTS in my windows pc through terminal wsl --install -d Ubuntu-24.04 it downloaded successfully and then it launched with an error error 2147942402 (0x80070002) when ...
yudhishithira's user avatar
0 votes
0 answers
57 views

Vim does not work properly

I just installed vim on my ubuntu. When I open a text file in terminal with Vim by vim <fileName>.txt, the data inside text file shows up. Here is the problem. When I try to move the cursor ...
Tran Hung Anh's user avatar
-1 votes
2 answers
100 views

I in linux system I geting many same exported path variable

In my ubuntu system I getting same env variable many times This is the output of echo $PATH | tr ':' '\n' | less command in zsh shell /opt/some/bin <<< /Users/pritam/Developer/system_script /...
Pritam's user avatar
  • 1
3 votes
1 answer
153 views

color variable does not work with PS1 assignment in bashrc file

below is my current PS string in .bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[00;37m\]\u@\h\[\033[01;32m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ which works fine ...
xkeshav's user avatar
  • 645
0 votes
1 answer
174 views

Problem with booting on new HP 14-ep053sa

I'm trying to install the new Ubuntu 24.04 to my new laptop, a HP 14-ep0523sa Pavilion. Unfortunately, after installation, it boots straight to a command-line interface, but not the usual one, just ...
ben's user avatar
  • 1
0 votes
0 answers
35 views

sudo su gets hung in Ubuntu 20.04

When trying to run the sudo su command it gets hung. If I press Ctrl zz then after 2 minutes it goes to sudo. When I checked the permissions, it is OK and there is no output from it.
Hiral Tanna's user avatar
0 votes
0 answers
66 views

Ubuntu Server 22.04 installation from command line

I'd like to create a ubuntu server 22.04 with the root and boot on an ssd raid 1 without encryption and a raid 6 with 10 drives with luks encryption. How can i do this from a command prompt? Thanks in ...
hank744's user avatar
0 votes
1 answer
68 views

Redirect Std-output to a file and Err-output another file simultaneously

I want to get the std output and err out to be written in both files simultaneously by one command echo $((1/0)) $((1+2)) > out.txt 2> err.txt it print only the output to the shell not event to ...
Ahmed's user avatar
  • 1
1 vote
2 answers
182 views

Concatenate string after grabbing environment variable

I'm trying to concatenate a string with a variable which is in .env file. My .env is this: API_URL=http://localhost:3030 NODE_ENV=development And here is my code: [ ! -f .env ] || export $(grep -v '^#...
sundowatch's user avatar
0 votes
0 answers
37 views

When a foreground process is running and ssh connection is terminated,In default behavior The foreground Process receives SIGHUP,but mine kept running

In Ubuntu 22.04, foreground processes may not receive the SIGHUP signal when the terminal is closed, especially if they are backgrounded or detached. This behavior differs from expectations, where ...
Ansh Gautam's user avatar
0 votes
0 answers
39 views

What's the difference between closing and exiting the terminal

I'm discovering the signals sent by the terminal when it exits. However, I found that there's a difference between typing exit to quit the terminal and directly clicking the x button. Type Exit to ...
Kartone's user avatar
4 votes
2 answers
1k views

ls -la gives strange output

What could be the reason for this?
D-T's user avatar
  • 487
3 votes
1 answer
336 views

Is there a way to know if a file was copied?

I'm using Ubuntu 22.04, and I'm making a bash program (script) to run scripts at startup, shutdown and/or reboot. These things are sensitive and, if poorly done, it could be dangerous for the user/pc, ...
Carlos González's user avatar
0 votes
1 answer
420 views

Getting Error in shell script "unexpected EOF while looking for matching `''"

I wrote a simple shell script in /bin/sh and getting the issue below. /tmp/a.sh: line 14: unexpected EOF while looking for matching `'' /tmp/a.sh: line 17: syntax error: unexpected end of file *******...
Atul Jain's user avatar
0 votes
0 answers
29 views

Terminal crashes when running command to install Spike and Verilator

Everytime I run the command to install custom spike and Verilator, my terminal crashes. I can't seem to make it work. Below are the commands I am running: export DV_SIMULATORS=veri-testharness,spike ...
Keith Dsouza's user avatar
0 votes
0 answers
60 views

Reset Ubuntu dotfiles?

I recently ran and installed someone's dotfiles (it was like a popular one, from awesome-dotfiles github repo) and my terminal seems like this How can I reset it?
Ashish Agarwal's user avatar
4 votes
3 answers
675 views

Mounting a Disk Image

I'm trying to create a disk image and mount the partition for further work, but I'm encountering a frustrating error message: "wrong fs type, bad option, bad superblock." Here's the steps I ...
Yuki San's user avatar
0 votes
0 answers
56 views

How to install gnome extensions? [duplicate]

I was trying to install gnome extensions but when i was trying to install chrome gnome extensions a error was coming. Please help. anshul@Anshul:~$ sudo apt-get update [sudo] password for anshul: Hit:...
Anshul's user avatar
  • 1
0 votes
1 answer
76 views

What is an efficient way to listen on all ports?

I have a requirement that all ports 1-65535 are open however i don't have access to the network and so my workaround before this i.e. opening port 22 (and a few others) involved opening ports on vpn ...
Samir Fink's user avatar
0 votes
0 answers
69 views

No terminals launch on Ubuntu 22.04

I got an unmanaged VPS from Hostinger a week ago and accessed it via mRemoteNG RDP. I find a few terminals installed including gnome, but none of them work. Every attempt to start a terminal ends with ...
mgl's user avatar
  • 1
0 votes
0 answers
37 views

Ternimal of VSCode

When I start to run code for the second time in VSCode, the terminal seems to appear >> and stops me from inputting or even can't get the program to start.
龚健翔's user avatar
1 vote
0 answers
62 views

How to make ports listening with the ncat command in a script since i always times out?

This is the script opening multiple ports. However without me doing a single thing it times out after a while. How can i make the scripts stay open indefinitely or atleast for a long time. Would ...
Samir Fink's user avatar
0 votes
0 answers
117 views

I cannot open anaconda navigator in Ubuntu

Can anyone give me a suggestion to solve this problem? I installed Anaconda in Ubuntu and ran anaconda-navigator but it doesn't work and shows this error: Thanks so much for your help.
Giang Hoàng's user avatar
2 votes
1 answer
445 views

What's wrong with my use of the netcat command?

I can run this netcat command to listen to ports only when I'm listing a single port, for example: sudo ncat -lp 80 -w 10 However when I attempt to enter multiple port numbers it says the port number ...
Samir Fink's user avatar
0 votes
1 answer
213 views

Can I enable Wayland sharing from the command line?

Is there any way to enable Wayland sharing from the command line? When I try to access Ubuntu 22.04 LTS with Teamviewer it's blocked because of this popup on the target: Note that removing a monitor ...
parsley72's user avatar
  • 368
0 votes
1 answer
187 views

virt-manager Error connecting to graphical console

I've had this problem now for several months and haven't been able to find a suitable solution. When searching I find a lot of very old posts about the problem but none seem to related. Mostly talk ...
FeedTheChunk's user avatar
1 vote
1 answer
23 views

Fixing title of xterm even during editing a file inside it

To write a document I need to put a picture that I can capture from the screen. The picture is supposed to have an xterm which displayout uart output during rtl simulation. But I didn't capture it ...
Chan Kim's user avatar
  • 2,111
0 votes
0 answers
73 views

How do I call an executable as root without the need of using sudo?

I've created an app that also uses TPM for signing/encryption/decryption (with the tss2-fapi library)... But I am a newbie when it comes to Linux (Ubuntu) permissions. Now, when I am running the app I ...
Croksie's user avatar
0 votes
0 answers
51 views

Adding ++ctrl+enter++ key combination in bash (to allow for nvim enter key combinations)

I'm trying to make the ++ctrl+enter+ key work in nvim to be able to create a new line above in incert mode without leaving <ESC>oi similar to vscode but the following don't work: keymap("i&...
Mike's user avatar
  • 11
5 votes
2 answers
567 views

What is the signal sent when the charger is unplugged/plugged

I would like to know which signal is sent to the kernel when I unplug my laptop. I need this information to make a program to switch my power mode automatically. I am currently on Ubuntu 23.10.
Stanislas Martin's user avatar
0 votes
2 answers
199 views

Installing Java

I am trying to install Java. but I am getting following Issue: - I downloaded jdk-8u201-linux-i586.tar.gz from oracle web site. Then I created directories as sudo mkdir /usr/local/java After that i ...
khushvinder singh Jasrotia's user avatar
0 votes
0 answers
20 views

I have a problem with the Java path on my computer not being compatible with the bucket dependencies for Gradle Android Studio

Unsupported Java Your build is currently configured to use Java 20.0.1 and Gradle 8.0
Zozo Zizi's user avatar
0 votes
0 answers
35 views

Remove docx metadata with Linux command line? [duplicate]

How to delete hidden information (metadata) from a Microsoft Word document (.docx) on a Linux system using terminal commands. Can any suggest me some good tools for that as exiftool not supported docx ...
Pratham's user avatar
-1 votes
1 answer
58 views

My terminal prompt is "PC%" - How can I fix this? [duplicate]

My terminal prompt looks like this: PC% How can I fix this? Here is picture of my terminal.
Hayk Ghazaryan's user avatar
-1 votes
1 answer
68 views

How do I find files of a certain extension(s) except in paths that contain certain strings and then print the result to a file?

Upon a little search, I came up with this command: > find . -type f \( -name "*.exe" \) | egrep -v > 'games_1|rei|games|tor|jogos|mods|text' > 1 What I wanted to do was find files ...
Nuno Fonseca's user avatar
0 votes
0 answers
255 views

Nmcli and nmtui can't read password for wifi network

Ubuntu 23.10 here. When using Network Manager in KDE, I can connect to the wifi network via the Network Manager applet. Connections are saved with passwords so I don't need to enter a password for ...
QkiZ's user avatar
  • 1,225
0 votes
1 answer
55 views

Mail command line

I am using a application called Mail but i can't send to my own email-adresses? But i can't send any emails what is wrong? mail -s "Test Email" [email protected] Cc: Testing jonathan@jonathan-...
Jonte YH's user avatar
  • 1,977
0 votes
0 answers
20 views

Shell script doesn't recognize Python even after setting its path [duplicate]

I'm having trouble calling Python code from a shell script on Ubuntu. First of all, I confirm that Python is installed: username@Ubuntu22:~/Documents/Script$ python Python 3.10.12 (main, Nov 20 2023, ...
Ogiad's user avatar
  • 1
1 vote
1 answer
1k views

Bash terminal has become extremely slow. 22.04 [duplicate]

My bash terminal has become extremely slow, I until 22.04. I don't have any extensions installed but I think it might be related to some form of auto complete/search. Additionally gnome-shell has high ...
FourierFlux's user avatar