Showing posts with label Name. Show all posts
Showing posts with label Name. Show all posts

Thursday, August 13, 2015

Some commands for Ubuntu 14.10 Utopic Unicorn

Change hostname / Computer name

Temporary:-

hostname [NewComputerNameHere]

The command above will last until restart.

Permanently:-

sudo gedit /etc/hostname /etc/hosts
The command above will let you edit two files, /etc/hostname and /etc/hosts

1. For the /etc/hostname file can be easily done.
    Just rename the existing name to the new computer name you want.
    Then make sure you save your file.

2. For the /etc/hosts file, you have to look for the following line in the file.
    127.0.1.1 YOUR-HOSTNAME
    Replace your new computer name with the old name.
    Then make sure you save your file.
    Finally, reboot your system to let it take effect.

Check your network IP address

hostname -I

The command above will show all addresses for the host.

ifconfig

The command above will show quite an amount of information. For this section, we are interested in the network IP address, therefore, we will lookout for the keyword "inet addr". Beside this will be the IP address for this network interface. 

You might had notice that there are multiple inet addr on your terminal. 
One under wlan0, one under eth0 or one under lo.
1. wlan0 will normally be the first wireless network card that your system have.
2. eth0 will normally be the first wired network port that your system have.
3. lo is a loopback interface on your system that is normally use for testing and troubleshooting for
    software developers.

Check which account you are currently using

whoami
The command above will show which user are you currently. This command is useful when you switch users frequently using the su command and you had lost track of which account are you in currently.





Sunday, December 22, 2013

Linux Command: Find Out My Linux Distribution Name and Version

Normally these are the 2 commonly used command to be used. You can use any one of the following command to find out your Linux distribution and name:

cat /etc/*-release

or

lsb_release -a

In case you need the kernel information, these are the command commonly used.

uname -a

or

uname -mrs

here are a few more different ways to get some info:-

- In GUI Menu -> System  Settings -> System Info
- inxi -F
- lsb_release -a
- cat /etc/linuxmint/info
- cat /etc/issue
cat /etc/os-release

cat /etc/issue
cat /etc/issue