Open a Terminal Session and type in the following command
eject or eject /dev/cdrom
If you need to close the CD Rom use the command below
eject -t
Open a Terminal Session and type in the following command
eject or eject /dev/cdrom
If you need to close the CD Rom use the command below
eject -t
NOTE: Tested and tried on Ubuntu 9.04 Answer: By using the ‘stat‘ command. stat = Display file or file system status Example: Input: stat photos-20090916-0.db Output: File: `photos-20090916-0.db' Size: 3072 Blocks: 8 IO Block: 4096 regular file Device: 807h/2055d Inode: 529743 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ user) Gid: ( 1000/ ...
There are a number of ways to find the IP address. Examples below ifconfig – Deprecated, rather use the ‘”ip'” command Input: {codecitation style=”brush: shell;”}ifconfig{/codecitation} Output: {codecitation style=”brush: shell;”} eth0 Link encap:Ethernet HWaddr 00:0c:6e:c5:67:89 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0...
NOTE: Received this error on a Centos 5 environment while trying to run a PHP script that makes use of the DOMDocument class
In the CLI (Command Line Interface) run the following command
{codecitation class=”brush: shell;”}
yum install php-xml
{/codecitation}
This will install XML support and will solve the DOMDocument issue
We accomplish this by using the “mv” (move command) Example: File Example: {codecitation class=”brush: bash;”}mv old_file new_file{/codecitation} Directory Example: {codecitation class=”brush: bash;”}mv old_directory new_directory{/codecitation} NOTE: mv can move several files into a destination folder, or a single file. mv renaming will contain the original...
Open a new Terminal Window
Type in the following command and press enter
sudo apt-get autoremove gnome-do
This will remove gnome-do and all dependencies
Definition: autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.
NOTE: Has been tested on Ubuntu 9.10 In Ubuntu open Synaptic Package Manager ‘System->Administration->Synaptic Package Manager‘ Now we need to install 2 apps called alien and fakeroot alien – Convert and install rpm and other packages fakeroot – Gives a fake root environment To install them simply type alien in the Quick search box and mark for installation and do...
In the command line type the following command within the desired directory {codecitation class=”brush: bash;”}du -c{/codecitation} This will give you the usage/size of all the folders within that particular directory. du = estimate file space usage -c = total To get the size/usage in a Human readable format eg. Megabytes/Gigabites append the -h option to the command above. Example...
This could come in handy if your Desktop machine is at a Remote Location and you need to gain access to it. NOTE: SSH = Secure Shell Open a new Terminal Window (CLI) and type in the following command to install SSH {codecitation class=”brush: bash;”}sudo apt-get install ssh{/codecitation} After installation you can test it to SSH to your localhost (use your standard username and...
NOTE: Tested on Ubuntu 9.10 Open a new Terminal Window Download the following file using the wget command{codecitation class=”brush: bash;”}wget {/codecitation} Save the file in your Home Directory or any other Directory Give the file executable privelages by using the following command {codecitation class=”brush: bash;”}chmod +x AdobeAIRInstaller.bin{/codecitation} Now...
NOTE: Tested with Ubuntu 9.10
Click on System->Preferences->Screensaver
Click on Power Management
Under the heading Display adjust the slider next to the label Set display brightness to: in order to adjust the brightness of the screen.
NOTE: Experienced this problem with Google Chrome 5.0.342.9 beta on Ubuntu 9.10 Answer: First make a backup of all you personal settings eg. Bookmarks Close Google Chrome (Press the key combination Ctrl+e in order to close Chrome) Open a new Terminal Window and type in the following command rm -rf ~/.config/google-chrome or rm -rf /home/YOURNAME/.config/google-chrome Start Google Chrome and...
In the Command Line Interface type in the uptime command and hit enter
uptime
Now the uptime information should display eg. The time, how long the system has been running, the amount of users logged in and the load average
22:59:30 up 1:36, 2 users, load average: 0.13, 0.09, 0.08
By using the wc command.
wc = print newline, word, and byte counts for each file
In the CLI type in the following command:
wc -wcl < /home/user/textfile.txt
textfile.txt = The file that we need to get the information from
-w = print the word count
-c = print the character count
-l = print the line count
How to install Apache together with PHP5 on Ubuntu? This becomes very handy if you wish to do some PHP development on Ubuntu. Open a new terminal window (CLI) Execute the following commands: sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 Now we need to restart Apache so that our changes can take effect. There are two commands for you to...
NOTE: Tried and tested on Ubuntu 10.04
Open a new Command Line Window
Execute the following command to install MySql Server 5
sudo apt-get install mysql-server
If you wish to use MySql together with PHP 5 you will need to install the PHPmodule for MySql 5. To do this open a Command Line Window and execute the following command
sudo apt-get install php5-mysql
This can be accomplished by using the sed command. sed = stream editor for filtering and transforming text For this example we will have a file called test.txt that contains the following text “This is a test file with some test information, containing some test data.“ We want to replace all instances of test in the file with cool and save the output to a new file called cool...
Open a new Terminal Session if not already in the command line.
Enter the following command. Replace UNAME with the name of the user.
id -u UNAME
This will output the User Id for the Username specified.
Open a new Terminal Window
Type in the following command
date -d fri
Description:
date = print or set the system date and time
-d = display time described by STRING, not `now’
Replace fri with any day of the week you prefer.
This will output something similar as below
Fri Aug 6 00:00:00 SAST 2010