Hot answers tagged ubuntu
You're on Ubuntu so try: apache2ctl -M
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 ...
(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 ...
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 ...
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
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 ...
nohup cmd & nohup detaches the process completely (daemonizes it)
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 ...
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
The command to use is eog (Eye of GNOME). And you call it like so: eog filename
Use: chsh Enter your password and state the path to the shell you want to use. For Bash that would be /bin/bash. For Zsh that would be /usr/bin/zsh.
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 # ...
With upstart v1.4, setuid and setgid are supported natively in config file.
Why is it so hard to find a file in Ubuntu? Should a helicopter be expected to work like a hot-air balloon? Do you expect Ubuntu/Linux to function precisely the way you think Windows functions? Windows is its own kind of beast, especially compared with Unix-derived systems. It somewhat akin to troubleshooting a diesel engine using gasoline engine mechanics. ...
Install libsox-fmt-mp3: sudo apt-get install libsox-fmt-mp3
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 % ...
.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 ...
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, ...
&& 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, ...
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 ...
The utility is usermod and is used like: usermod -a -G group1,group2 username Where username is the user you want to modify and group1 and group2 are the new groups you want that user to join. Running the command without the -a argument will remove that user from all groups except group1 and group2. To check a users group memberships use the groups ...
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? ...
Here is one approach: $ ftp -n <<EOF open ftp.example.com user user secret put my-local-file.txt EOF Alternatively, create (or edit) the ~/.netrc file in the home dir of the user that will run the ftp command, give it appropriate perms (chmod 0600 ~/.netrc), and add the following: # ~/.netrc machine ftp.example.com login user password secret ...
Yes, df -h (Disk Free) will show the free space on each of the mounted file systems. So cd to the filesystem that's full, and du -sh * (Disk Usage) will show the total space used by each of the files/directories in the current working directory. The --max-depth option for du may also be useful here. Finding exactly what is responsible for using all the ...
There's a few ways: sudo reboot sudo init 6 sudo shutdown -r now
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...]
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 ...
VBoxManage startvm $VM --type headless will start the specified virtual machine in the background. To shut it down, request the shut down from the guest.
The crontab -e command will check the environment variables $EDITOR and $VISUAL for an override of the default text editor, so... export VISUAL=vim or export EDITOR=vim should do the trick.
Only top voted, non community-wiki answers of a minimum length are eligible