Tag Info

Hot answers tagged

174

Ports are a concept of UDP and TCP. Ping messages are technically referred to as ICMP Echo Request and ICMP Echo Reply which are part of ICMP. ICMP, TCP, and UDP are "siblings"; they are not based on each other, but are three separate protocols that run on top of IP. Therefore you can not ping a port. What you can do, is use a port scanner like nmap. nmap ...


143

First of all; once you've started a process, you can background it by first stopping it (hit Ctrl-Z) and then typing bg to let it resume in the background. It's now a "job", and its stdout/stderr/stdin are still connected to your terminal. You can start a process as backgrounded immediately by appending a "&" to the end of it: firefox & To run ...


129

You're on Ubuntu so try: apache2ctl -M


120

I run apt-cache policy <package name>: $ apt-cache policy wajig wajig: Installed: 2.1 Candidate: 2.1 Version table: *** 2.1 0 100 /var/lib/dpkg/status 2.0.47 0 500 file:/home/wena/.repo_bin/ squeeze/main i386 Packages 500 ftp://ftp.is.co.za/debian/ squeeze/main i386 Packages That means that there are three wajig ...


103

First, make sure that you have hfsprogs installed. Example installation command: sudo apt-get install hfsprogs Next, mount or remount the HFS+ drive; commands need to be as follows: sudo mount -t hfsplus -o force,rw /dev/sdx# /media/mntpoint or sudo mount -t hfsplus -o remount,force,rw /dev/sdx# /mount/point Finally, if the drive was improperly ...


103

NOTE: Some of the contents of this answer might have become obsolete and there are some comments where people have reported problems. You're advised to read through the comments first. -- Ubuntu 11.10 Oneric sudo apt-get install python-software-properties sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jdk ...


97

apt-file search filename or apt-file search /path/to/file To install apt-file, use: sudo apt-get install apt-file You will need to update its database before you can use it: sudo apt-file update


96

(Debian/Ubuntu) Discover what package a file belongs to: dpkg -S /usr/bin/ls 'dpkg -S' just matches the string you supply it, so just using 'ls' as an argument matches any file from any package that has 'ls' anywhere in the filename. So usually it's a good idea to use an absolute path. You can see in the second example that 12 thousand ...


78

nohup cmd & nohup detaches the process completely (daemonizes it)


77

Why is it so hard to find a file in Ubuntu? It is clear that you're trying to use it as though it were a completely different system. Windows is its own kind of beast, especially compared with Unix-derived systems. Playing with a cat as though it were a dog, seldom leads to gratification. You must adjust your paradigm to accommodate your platform. ...


75

&& is a logical operator. ; is simple sequencing. In cmd1 && cmd2, cmd2 will only be run if cmd1 exits with a successful return code. Whereas in cmd1; cmd2, cmd2 will run regardless of the exit status of cmd1 (assuming you haven't set your shell to exit on all failure in your script or something). On a related note, with cmd1 || cmd2, ...


74

First, install PEAR. sudo apt-get install php-pear Next, tell PEAR to update its own channel. sudo pear channel-update pear.php.net Then, tell PEAR to upgrade itself to the newest version. sudo pear upgrade-all You should now have the newest version of PEAR installed. To install PHPUnit, let PEAR know where to find PHPUnit. sudo pear ...


68

As others have noted, you need the lm-sensors package. I thought I should mention that in addition to installing the package, you should run the sensors-detect command to identify the kernel modules that need to be loaded. If you haven't done this, manually run this once and check if it detects any sensors on board your computer. $ sudo sensors-detect # ...


68

Nevermind, the command is eog filename


65

Check out the arp-scan command - you will probably have to install it eg: sudo apt-get install arp-scan http://manpages.ubuntu.com/manpages/hardy/man1/arp-scan.1.html And to give further detail: sudo arp-scan --interface=eth0 --localnet Where eth0 is your device. You can find your device with: ifconfig


64

Your friend does not know what he's talking about. Dual booting can be done on any computer regardless of CPU. And dual or triple or quadruple booting will not slow your computer down, it only runs one OS at a time. Dual booting is when you have multiple OS's installed on the same computer and you choose what OS to boot when you power it up. The only way ...


62

Use: chsh Enter your password and state the path to the shell you want to use. For Bash that would be /bin/bash.


62

There's a few ways: sudo reboot sudo init 6 sudo shutdown -r now


61

aptitude and apt-get work the same for many tasks, but for the most tricky cases, such as distribution upgrades (apt-get dist-upgrade vs. aptitude full-upgrade), they have different rules, and aptitude's rules are nearly always better in practice where they disagree. The reason you see more documentation for apt-get over aptitude is mostly inertia: aptitude ...


61

.profile vs. .zprofile Zsh runs ~/.zprofile, not ~/.profile, when it is invoked as a login shell. The reason is that zsh has enough incompatibilities with standard shells to break scripts. Zsh does run ~/.profile if it is called as sh or ksh. But if your objective is to get a zsh prompt when you log in, that's no help. You can make /bin/sh your login ...


61

With upstart v1.4, setuid and setgid are supported natively in config file.


60

First, create the user with: sudo adduser <username> You can read more about this command in the man pages of your system with man adduser. You can then add a user to the sudo group with with the command: sudo adduser <username> sudo Note that versions of Ubuntu until 11.10 will use admin as group instead of sudo: Until Ubuntu 11.10, ...


60

There's one more thing you need to know of: GNU. GNU stands for "GNU's Not Unix", and it is an attempt to create a free, independent version of Unix, developed by the Free Software Foundation. They got very far, they made a C compiler, a C library, a linker, editors, shells, all the commands you'd expect in a typical Unix shell, lots of stuff. But the ...


59

Linux is a kernel, Debian is a distribution of that kernel and a bunch of software to actually interact with the system. I can now take Debian and change the logo on the boot screen to my own logo and then my distribution is based on Debian (in a very primitive way). Usually, the adjustments that are made in a derived distribution are more substantial. ...


58

Warning: Modern disk/SSD hardware and modern filesystems may squirrel away data in places where you cannot delete them, so this process may still leave data on the disk. The only safe ways of wiping data are the ATA Secure Erase command (if implemented correctly), or physical destruction. Also see How can I reliably erase all information on a hard drive? ...


57

Asking on the #upstart channel on freenode, the official take on the matter is: A future release of Upstart will have native support for that, but for now, you can use something like: exec su -s /bin/sh -c 'exec "$0" "$@"' username -- /path/to/command [parameters...]


56

Your friend is incorrect. Dual booting has nothing to do with anything except the boot commands written to the hard drive. It doesn't matter how many cores your CPU has, physical or virtual. It doesn't matter how many hard drives you have. Technically, you can run more than one OS even on the same partition, though this usually only works with OSes of the ...


56

I think it's referring to apt-get moo: $ apt-get moo (__) (oo) /------\/ / | || * /\---/\ ~~ ~~ ...."Have you mooed today?"... To quote Wikipedia: aptitude states that, unlike Advanced Packaging Tool, it "does not have Super Cow Powers". In apt-get "super cow powers" can be found by issuing the command ...


55

you have to apply the unix-philosophy to this task: one tool for each task. tarring and compression is a job for tar and gzip or bzip2, crypto is a job for either gpg or openssl: Encrypt % tar cz folder_to_encrypt | \ openssl enc -aes-256-cbc -e > out.tar.gz.enc Decrypt % openssl aes-256-cbc -d -in out.tar.gz.enc | tar xz Or using gpg % ...


54

Note for Ubuntu Server 11.10: This script fails on Ubuntu Server 11.10 due to the obsolete vol_id command. vol_id has been superseded by blkid. To fix the script, replace "vol_id" by "blkid -o udev" in the udev-auto-mount.sh script. I've been banging my head around this for a while now, and I think I've found a working solution. This is developed and ...



Only top voted, non community-wiki answers of a minimum length are eligible