Most Popular

1500 questions
445
votes
4 answers

How to make a file (e.g. a .sh script) executable, so it can be run from a terminal

I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?
Ziyaddin Sadygly
  • 7,329
  • 6
  • 26
  • 34
444
votes
7 answers

How to show line numbering in nano when opening a file

Is there a way to tell nano to automatically show line numbering each time I open a file?
Luis Alvarado
  • 211,503
435
votes
6 answers

How can I change the date modified/created of a file?

Is there a way to change the date when a file was modified/created (which is shown in Nautilus or with the ls -l command)? Ideally I am looking for a command which can change the date/time stamps of a whole bunch of files to a certain amount of time…
snej
  • 4,351
435
votes
5 answers

How can I see all versions of a package that are available in the archive?

Is there a way I can see all the versions that are in the archives that I have configured in sources.list. I can see the last version of each archive withapt-get policy, but how can I see them all? Is there any way that this can also include PPA and…
txwikinger
  • 28,462
434
votes
10 answers

How to enable hibernation?

In Ubuntu 12.04 and newer, hibernation has been disabled by default in policykit. How can I enable this back?
Dima
  • 9,857
433
votes
15 answers

How do I start applications automatically on login?

How can I make an application automatically start when I have logged in?
Lincity
  • 25,371
430
votes
6 answers

How to downgrade a package via apt-get?

How can I downgrade a package to an older version via apt-get? Other tools are also acceptable but apt-get is preferred.
user61928
428
votes
10 answers

Convert a directory of JPEG files to a single PDF document

I have many JPEG files in a directory, and I want to convert them to PDF and concatenate them together to make a single document. How can this be done? I would prefer using the command line, as this process will be faster.
lovespeed
  • 4,431
426
votes
14 answers

How can I repair grub? (How to get Ubuntu back after installing Windows?)

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back?
Salahuddin
  • 4,811
426
votes
7 answers

How to download an MP3 track from a YouTube video

There are several Q&A threads that explain how to download youtube videos using the terminal. However, I would also like to learn how to extract the video's soundtracks as MP3 files--also using only the terminal. Answers briefly explaining how to…
siraj
  • 5,307
420
votes
30 answers

What kinds of desktop environments and shells are available?

This question exists as it fills a specific criterion. While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the FAQ. More…
Amith KK
  • 13,412
416
votes
4 answers

What is the difference between #!/bin/sh and #!/bin/bash?

if I write, #!/bin/bash echo "foo" or #!/bin/sh echo "foo" both yields same. I have seen some scripts starting with #!/bin/sh or #!/bin/bash. Is there any difference between them?
Rahul Virpara
  • 11,720
409
votes
12 answers

How can I stop being prompted to unlock the 'default' keyring on boot?

Whenever Ubuntu boots up, a dialogue pops up asking me to unlock my default keyring. Is there some way this can unlock automatically through PAM or some other magical way?
Oli
  • 293,335
408
votes
11 answers

How do I disable mouse magnet on middle edge with multi monitors?

I use Ubuntu 12.04 on a two screen setup. Multiscreen on 12.04 has generally become much better, but there is one thing that really gets on my nerves: there's a mouse magnet of sorts on the middle edge (between the two screens). It's undoubtedly…
406
votes
5 answers

What does 2>/dev/null mean?

I would like a brief explanation of the following command line: grep -i 'abc' content 2>/dev/null
Naive
  • 4,825
  • 11
  • 27
  • 35