Upgrade Ubuntu Linux using command line

August 6th, 2019 No comments

To upgrade Ubuntu Linux open up a terminal and type:

do-release-upgrade

The old way using apt isn’t needed in Ubuntu to upgrade the system. dist-upgrade has been superseded in Ubuntu by full-upgrade.

The do-release-upgrade command can be run as an user with admin rights without sudo. The user password will be asked when starting the command. The system will then make different checks before the upgrade starts. If using SSH an additional port will be opened on port 1022 that can be used if the ordinary SSH-tunnel are broken during the update.

Categories: Bash, Linux, Ubuntu Tags:

Linux dist “Chapeau”

July 12th, 2019 No comments

Chapeau is a high-performance, cutting-edge operating system built from the GNU/Linux distribution Fedora Workstation with the GNOME desktop environment. In comparison to Fedora, Chapeau adopts a more relaxed approach to software licences and is intended to be just as useful for advanced users as it is easy for those new to using a Linux system. There is built-in access to third-party software and sources repositories not included in Fedora such as RPMFusion, DropBox, Steam, Adobe Flash and Oracle VirtualBox. Chapeau also includes pre-installed core packages to make the installation of new kernel modules pain-free, built-in remote and virtual system management tools, a selection of maintenance tools that come in especially handy when running Chapeau’s live image on a DVD or USB drive to analyse and fix broken systems.

DistributionChapeau
Home Pagehttp://chapeaulinux.org/
User Forumshttp://chapeaulinux.org/forums
Categories: Linux, Okategoriserade Tags:

Add “Open command window here” option to Win10 context menu

June 3rd, 2019 No comments
  1. Open regedit, go to HKEY_CLASSES_ROOT\Directory\shell\cmd
  2. Right-click the cmd (folder) key, and click Permissions.
  3. Click the Advanced button.
  4. On “Advanced Security Settings,” click the Change link next to “Owner”.
  5. Type your account name in the provided field, click Check Names to verify you’re typing the account name correctly, and click OK.
  6. Check the Replace owner on subcontainers and objects option.
  7. Click Apply. Click OK.
  8. On “Permissions,” select the Administrators group.
  9. Under “Permissions for Administrators,” select Allow for the Full Control option.
  10. Click Apply. Click OK.
  11. Inside the cmd (folder) key, right-click the HideBasedOnVelocityId DWORD, and click Rename.
  12. Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId, and press Enter.

Once you complete these steps, using the Shift + Right-click combo on a folder will display the “Open command window here” option.

At any time, you can revert the changes following the same instructions, but on step No. 11, make sure to rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId.

Categories: Programmering, Windows Tags:

Formattera en USB-pinne i Ubuntu

August 11th, 2012 No comments

Kolla först vilken enhetsnamn pinnen har. Starta ett terminalfönster och skriv:

sudo fdisk -l

eller

mount

Sedan när du kollat namnet måste du avmontera pinnen. I mitt fall hette enheten för USB-pinnen /dev/sdb

umount /dev/sdb

Formattera nu pinnen. Jag väljer att formattera den med VFAT så den går att använda i Windows m.fl. operativsystem.

sudo mkfs.vfat /dev/sdb1

Om du vill döpa om namnet på pinnen i kommandoradsläge kan du installera mtools

sudo apt-get install mtools

Sedan kan det vara bra idé att hoppa över mtoolskontrollen av pinnen då man ibland får ett felmeddelande not a multiple of sectors per track (62)

echo mtools_skip_check=1 >> ~/.mtoolsrc

Döp sedan om USB-pinnen med följande kommando

sudo mlabel -i /dev/sdb1 ::namn

Klart!

Referenser:

http://www.cyberciti.biz/faq/howto-format-usb-pen-drive/

https://help.ubuntu.com/community/RenameUSBDrive

Categories: Bash, Linux Tags:

Installera VM-ware Tools i Ubuntu Server

August 11th, 2012 No comments

Installing VMware Tools in Ubuntu Server 9.10

1. Install software needed by VMware Tools

Install packages to build the kernel modules

sudo apt-get install autoconf automake binutils make cpp gcc linux-headers-$(uname -r)

2. Find out where the kernel headers are (you may need this later)

ls -d /usr/src/linux-headers-$(uname -r)*/include

i.e. /usr/src/linux-headers-2.6.31-14-generic-pae/include

i.e. /lib/modules/2.6.31-14-generic-pae/build/include

3. Get the kernel source

sudo apt-get build-dep linux-image-$(uname -r)

sudo apt-get source linux-image-$(uname -r)

2. Prepare and install VMware Tools

1. From VMware Workstation: go to VM> Install VMware Tools

2. From the VM: mount the virtual cd drive

sudo mount /dev/cdrom /mnt/

3. Extract VMware Tools to /tmp/

tar -C /tmp -zxvf /mnt/VMwareTools-5.5.3-34685.tar.gz

4. Unmount the virtual cd drive

sudo umount /mnt/

5. Now run the installer

cd /tmp/vmware-tools-distrib

sudo ./vmware-install.pl

6. When asked Do you want to run vmware-config-tools.pl?, answer “Yes”.

3. Run VMware Tools from X

1. Run /usr/bin/vmware-toolbox

Ref: http://www.thoughtpolice.co.uk/vmware/howto/ubuntu-server-6.10-edgy-eft-vmware-tools-install.html

Ref: https://help.ubuntu.com/community/Kernel/Compile

Categories: Linux Tags:

Prepare Linux for source compile

August 11th, 2012 No comments

1. Install packages to build the kernel modules

sudo apt-get install autoconf automake binutils make cpp gcc linux-headers-$(uname -r)

2. Find out where the kernel headers are (you may need this later)

ls -d /usr/src/linux-headers-$(uname -r)*/include

i.e. /usr/src/linux-headers-2.6.31-14-generic-pae/include

i.e. /lib/modules/2.6.31-14-generic-pae/build/include

3. Get the kernel source

sudo apt-get build-dep linux-image-$(uname -r)

sudo apt-get source linux-image-$(uname -r)

Categories: Bash, Linux, Programmering, Ubuntu Tags:

Bra Linuxkommandon

August 11th, 2012 No comments

top -s (Visar vilka processer som tar mest processorkraft)

ps (Visar aktuella processer)

ps -A|more (Visar alla processer)

ps -eaf | grep -i smb (visar vilken användare/rättighet en process (smb) körs med)

find / -name foo (Sök efter en fil i alla mappar)

hostname (visar hostname / ändrar temporärt hostname)

/etc/hostname (textfil med hostname i Debian, ändra för att ändra host perm.)

sudo /etc/init.d/hostname.sh (kör detta skript för att ladda in hostnamn, Debian)

setxkbmap se (Byter till svenskt tangentbord i Ubuntu)

tail -f file.log (Visar en textfil kontinuerligt. Avbryt med CTRL+C)

iostat -x 5 (visar hårddisk prestanda var 5e sekund) kräver paket “sysstat”

lsusb – listar USB enheter

lshal – info om hårdvara

lsattr – lista filattribut i ext2 filsystem

lshw – lista HW info, kör som root

lshw -html > datorinfo.htm – skapar HTML sida med HW info

lsmod – listar vilka kärnmoduler som laddats

lsof – listar öppna filer

lspcmcia – listar PC-Card

Ref: http://webtools.live2support.com/linux/top.php

Förnya DHCP-adress: sudo dhclient

alt.2: sudo /etc/init.d/networking restart

alt.3: ifdown eth0 && ifup eth0

—————————————-

Byt till statisk IP på Ubuntu server:

Ref: http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/

Edit file: sudo nano /etc/network/interfaces

Change to your info:

auto eth0

iface eth0 inet static

address 192.168.1.100

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.255

gateway 192.168.1.1

Add in the DNS: sudo nano /etc/resolv.conf

Remove the dhcp client: sudo apt-get remove dhcp3-client (or dhcp-client)

Restart net: sudo /etc/init.d/networking restart

—————————————-

Omkonfig Ubuntu Desktop: sudo dpkg –configure -a

Konfig X grafik: sudo dpkg-reconfigure xserver-xorg

Kolla Direct Rendering: glxinfo | grep rendering

Starta run-level 1 Recovery mode: sudo init 1

Avsluta Recovery mode: init 2

Uppdatera program och Ubuntu:

apt-get update (synkroniserar lista över program)

apt-get upgrade (uppdaterar alla installerade program till senaste versionen

apt-get dist-upgrade (uppdaterar till senaste, stabila versionen av Ubuntu)

Ändra grafikinställningar i Ubuntu: http://ubuntuforums.org/showthread.php?t=83973

Categories: Linux Tags:

Computer Inventory with PowerShell

August 11th, 2012 No comments
Categories: Windows Tags:

Retrieve data from Lotus Notes with PowerShell

August 11th, 2012 No comments
Categories: Windows Tags:

Pash PowerShell open source reimplementation

August 11th, 2012 No comments

For Mac, Linux, Solaris, etc… and Windows (including Windows Mobile and Windows CE):

http://pash.sourceforge.net/

Categories: Linux, Mac Tags: