Most Popular
1500 questions
340
votes
7 answers
How to run the SSH server on a port other than 22
I have two computers behind the same router. Let's call them A and B.
A can SSH to B in the following manner: ssh usr@
B can SSH to A by doing the same, but the external IP must be used. I have forwarded port 22 of my router…
Gary
- 4,042
339
votes
4 answers
What's the difference between <<, <<< and < < in bash?
What's the difference between <<, <<< and < < in bash?
Searene
- 4,550
339
votes
5 answers
Give specific user permission to write to a folder using +w notation
I know I can assign the permission to write to an owner/group/others like this:
chmod u+w myfolder
Can I specify the specific user here? Some like this:
chmod username u+w myfolder
Max Koretskyi
- 3,851
339
votes
9 answers
How do I add SSH Keys to authorized_keys file?
I have an Ubuntu server on Amazon EC2, that I use for development, and today I stupidly cleared everything out of my ~/.ssh/authorized_keys file. Luckily I have an SSH open, so I am still connected, and can fix the file, but when I try to put my…
Dave Long
- 3,776
339
votes
18 answers
How to restart the networking service?
I tried to use
sudo service networking restart
and
sudo /etc/init.d/network restart
but they both crash the window manager and I can no longer use my keyboard for input into X.
when I use the /etc/init.d/ method it complains saying that I should…
waspinator
- 4,942
337
votes
7 answers
How to make partitions mount at startup?
How do you make HDDs and partitions mount at startup on Ubuntu?
I always keep my media and data files on separate partitions - one 2tb HDD and a 400 odd gig partition. I have been trying to swap the default folder location for the home directory to…
Harley Baker
- 3,471
337
votes
7 answers
Is it okay to delete the ~/.cache folder?
When I use disk usage analyzer and scan my home folder, the .cache folder in my home directory always shows up with a decent bit of things in it.
Would it be okay for me to delete the contents of this folder or would it damage something?
Aner
- 3,371
336
votes
8 answers
How can I create a zip archive of a whole directory via terminal without hidden files?
I have a project with lots of hidden folders / files in it. I want to create a zip-archive of it, but in the archive shouldn't be any hidden folders / files. If files in a hidden folder are not hidden, they should also not be included.
I know that…
Martin Thoma
- 20,535
335
votes
23 answers
I have 16GB RAM. Do I need 32GB swap?
I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM?
Tamás Szelei
- 4,192
334
votes
7 answers
How to access a usb flash drive from the terminal?
I only have access to the command line.
I need to backup my data (on the user folder) to a pen (USB DOK).
How can I mount a flash drive manually?
What should be the copy command?
MEM
- 11,255
332
votes
12 answers
How to uninstall a .deb package?
Suppose I download a .deb package from a website and install it. (I assume that when I double click the .deb file, the package is installed through a GUI that interfaces with dpkg right?)
How can I uninstall it?
Olivier Lalonde
- 60,581
332
votes
8 answers
Simple image editor?
I want something similar to "preview" in macs. For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and…
mandy
- 3,341
331
votes
9 answers
Find a file by name using command-line
I would like to determine the location of a file using command-line. I have tried:
find . -type f -name "postgis-2.0.0"
and
locate postgis-2.0.0
to no avail. What is the command to determine the file's directory, provided its name?
Sam007
- 4,653
329
votes
13 answers
How do you restart Apache?
I switched from SLES to Ubuntu and now I want to restart my local server.
In SLES I used:
rcapache2 restart
but this seems not to work in Ubuntu.
How do I restart Apache?
Jai Puri
- 4,089
328
votes
10 answers
How do I find my internal ip address?
I have Ubuntu server 12.04 installed, so I have no GUI. When I do the command ifconfig, I cannot find my internal IP address. It says: inet addr: 127.0.0.1.
Here is the output of ifconfig -a:
eth0 link encap:Ethernet HWaddr 00:06:4f:4a:66:f0
…
Cam Jones
- 3,891